Selaa lähdekoodia

检查会员有效

刘俊驰 9 kuukautta sitten
vanhempi
commit
c64bf68b44

+ 17 - 0
cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/MemberPriceSettingsController.java

@@ -48,6 +48,23 @@ public class MemberPriceSettingsController extends BaseController {
 		return succeed(memberPriceVo);
 	}
 
+
+
+    /**
+     * 查询单条
+     */
+    @GetMapping("/check/{id}")
+    @ApiOperation(value = "检查会员是否有效", notes = "传入id")
+    public HttpResponseResult<Boolean> check(@PathVariable("id") Long id) {
+        MemberPriceSettingsVo detail = memberPriceSettingsService.detail(id);
+        if (detail == null) {
+            return succeed(false);
+        }else if (Boolean.FALSE.equals(detail.getStatus())) {
+            return succeed(false);
+        }
+        return succeed(true);
+    }
+
 	@PostMapping("/vipPermissions")
 	@ApiOperation(value = "查询vip权限")
 	public HttpResponseResult<List<SysConfig>> vipPermissions() {