Browse Source

查询app是否为审核版本

liujunchi 2 years ago
parent
commit
c74edf4642

+ 13 - 0
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/open/OpenClient.java

@@ -70,6 +70,9 @@ public class OpenClient extends BaseController {
     @Autowired
     private LiveRoomService liveRoomService;
 
+    @Autowired
+    private AppVersionInfoService appVersionInfoService;
+
     @ApiOperation(value = "查询老师头像昵称信息")
     @GetMapping("/getTeacher")
     public HttpResponseResult<TeacherVo> getTeacher(@ApiParam(value = "老师ID", required = true) @RequestParam("userId") Long userId) {
@@ -191,4 +194,14 @@ public class OpenClient extends BaseController {
 
         return succeed(LiveRoomVO.from(roomWrapper.jsonString()));
     }
+
+
+    @PostMapping("/appVersion")
+    @ApiOperation(value = "查询app是否为审核版本")
+    public HttpResponseResult<CheckVo> appVersion(@RequestBody Map<String,String> obj) {
+        YesOrNoEnum appAuditVersion = appVersionInfoService.getAppAuditVersion(obj.get("platform"), obj.get("version"));
+        CheckVo checkVo = new CheckVo();
+        checkVo.setCheck(appAuditVersion);
+        return succeed(checkVo);
+    }
 }

+ 12 - 0
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/open/OpenShareController.java

@@ -52,6 +52,8 @@ public class OpenShareController extends BaseController {
     @Autowired
     private MusicAlbumService musicAlbumService;
 
+    @Autowired
+    private AppVersionInfoService appVersionInfoService;
 
 
     @ApiOperation(value = "新增曲谱渲染图")
@@ -152,4 +154,14 @@ public class OpenShareController extends BaseController {
         List<SysConfig> configs = sysConfigService.findAll(params);
         return succeed(configs);
     }
+
+
+    @PostMapping("/appVersion")
+    @ApiOperation(value = "查询app是否为审核版本")
+    public HttpResponseResult<CheckVo> appVersion(@RequestBody Map<String,String> obj) {
+        YesOrNoEnum appAuditVersion = appVersionInfoService.getAppAuditVersion(obj.get("platform"), obj.get("version"));
+        CheckVo checkVo = new CheckVo();
+        checkVo.setCheck(appAuditVersion);
+        return succeed(checkVo);
+    }
 }