Browse Source

Merge branch 'dev_1_3_4_20220825'

liujunchi 2 năm trước cách đây
mục cha
commit
e0716f0616

+ 18 - 4
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/open/OpenClient.java

@@ -1,5 +1,7 @@
 package com.yonge.cooleshow.student.controller.open;
 
+import com.yonge.cooleshow.biz.dal.vo.CheckVo;
+import com.yonge.cooleshow.common.enums.YesOrNoEnum;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -55,6 +57,10 @@ public class OpenClient extends BaseController {
     @Autowired
     private StudentService studentService;
 
+
+    @Autowired
+    private ActivityPlanService activityPlanService;
+
     @ApiOperation(value = "查询老师头像昵称信息")
     @GetMapping("/getTeacher")
     public HttpResponseResult<TeacherVo> getTeacher(@ApiParam(value = "老师ID", required = true) @RequestParam("userId") Long userId) {
@@ -86,10 +92,6 @@ public class OpenClient extends BaseController {
 
 
 
-    @Autowired
-    private ActivityPlanService activityPlanService;
-
-
     @ApiOperation(value = "活动信息", notes = "活动id")
     @PostMapping(value = "/activity/info/{id}")
     public HttpResponseResult<MusicActivityVo> getDetail(@PathVariable Long id) {
@@ -129,4 +131,16 @@ public class OpenClient extends BaseController {
     public HttpResponseResult<PostObjectFormFields> getUploadSign(@RequestBody UploadSign uploadSign) {
         return succeed(uploadFileService.getUploadSign(uploadSign));
     }
+
+    @ApiOperation(value = "检查活动状态", notes = "活动id")
+    @PostMapping(value = "/activity/state/{id}")
+    public HttpResponseResult<CheckVo> state(@PathVariable Long id) {
+        // SysUser user = sysUserFeignService.queryUserInfo();
+
+        YesOrNoEnum state = activityPlanService.state(id);
+
+        CheckVo checkVo = new CheckVo();
+        checkVo.setCheck(state);
+        return succeed(checkVo);
+    }
 }