Преглед изворни кода

Merge remote-tracking branch 'origin/saas_2022_05_17_activity' into saas_2022_05_17_activity

zouxuan пре 3 година
родитељ
комит
73616064d5

+ 1 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImLiveBroadcastRoomServiceImpl.java

@@ -445,6 +445,7 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
         //向聊天室发自定义消息踢出所有人
         try {
             ImRoomMessage message = new ImRoomMessage();
+            message.setIsIncludeSender(1);
             message.setFromUserId(speakerId.toString());
             message.setToChatroomId(roomUid);
             message.setObjectName(ImRoomMessage.FORCED_OFFLINE);

+ 17 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TempLittleArtistTrainingCampServiceImpl.java

@@ -231,12 +231,27 @@ public class TempLittleArtistTrainingCampServiceImpl extends ServiceImpl<TempLit
      */
     @Override
     public PageInfo<TempCampUserTrainingDetailVo> queryUserTrainingDetail(Map<String, Object> param) {
+        //训练营详情-查询条件时间设置
+        queryUserTrainingDetailOpsParam(param);
         Page<TempCampUserTrainingDetailVo> page = PageUtil.getPageInfo(param);
         page.setDesc("b.playDay");
         return PageUtil.pageInfo(baseMapper.queryUserTrainingDetail(page, param));
     }
 
     /**
+     * 训练营详情-查询条件时间设置
+     */
+    private void queryUserTrainingDetailOpsParam(Map<String, Object> param) {
+        Integer campId = WrapperUtil.toInt(param, "campId", "训练营id不能为空");
+        TempLittleArtistTrainingCamp camp = this.getOne(Wrappers.<TempLittleArtistTrainingCamp>lambdaQuery()
+                .eq(TempLittleArtistTrainingCamp::getId, campId)
+                .eq(TempLittleArtistTrainingCamp::getDelFlag, 0));
+        param.put("startTime", camp.getTrainStartDate());
+        param.put("endTime", camp.getTrainEndDate());
+        param.put("state", TempLittleArtistTrainingCampUserRelation.APPLY);
+    }
+
+    /**
      * 根据群组Id查询群组信息
      *
      * @param imGroupIds 群组id,多个用逗号隔开
@@ -262,9 +277,6 @@ public class TempLittleArtistTrainingCampServiceImpl extends ServiceImpl<TempLit
         //查询该学员是否购买过该训练营
         TempLittleArtistTrainingCampUserRelation userRelation = tempLittleArtistTrainingCampUserRelationService.getOne(Wrappers.<TempLittleArtistTrainingCampUserRelation>lambdaQuery()
                 .eq(TempLittleArtistTrainingCampUserRelation::getUserId, user.getId()));
-        if (Objects.isNull(userRelation)) {
-            throw new BizException("没有参与资格!");
-        }
         Map<String, Object> result = new HashMap<>();
         result.put("user", userRelation);
         if (CollectionUtils.isNotEmpty(campList)) {
@@ -359,6 +371,8 @@ public class TempLittleArtistTrainingCampServiceImpl extends ServiceImpl<TempLit
      * 导出小小训练营想详情
      */
     public void exportUserTrainingDetail(Map<String, Object> param, HttpServletResponse response) throws IOException {
+        //训练营详情-查询条件时间设置
+        queryUserTrainingDetailOpsParam(param);
         List<TempCampUserTrainingDetailVo> list = baseMapper.queryUserTrainingDetail(param);
         OutputStream outputStream = response.getOutputStream();
         HSSFWorkbook workbook = null;

+ 1 - 0
mec-biz/src/main/resources/config/mybatis/TempLittleArtistTrainingCampMapper.xml

@@ -124,6 +124,7 @@
         left join sys_user as d on d.id_ = a.user_id_
         left join im_group as e on a.im_group_id_ = e.id_
         <where>
+            a.activity_id_ = #{param.campId} and a.state_ = #{param.state}
             <if test="param.imGroupId != null">
                 AND e.im_group_id_ = #{param.imGroupId}
             </if>

+ 1 - 39
mec-student/src/main/java/com/ym/mec/student/controller/TempLittleArtistTrainingCampController.java

@@ -35,27 +35,6 @@ public class TempLittleArtistTrainingCampController extends BaseController {
     @Resource
     private TempLittleArtistTrainingCampUserRelationService tempLittleArtistTrainingCampUserRelationService;
 
-    @ApiOperation("添加训练营")
-    @PostMapping(value = "/add")
-    public HttpResponseResult<Object> add(@Valid @RequestBody TempLittleArtistTrainingCampDto dto) {
-        tempLittleArtistTrainingCampService.add(dto);
-        return succeed();
-    }
-
-    @ApiOperation("修改训练营")
-    @PostMapping(value = "/update")
-    public HttpResponseResult<Object> update(@Valid @RequestBody TempLittleArtistTrainingCampDto dto) {
-        tempLittleArtistTrainingCampService.update(dto);
-        return succeed();
-    }
-
-    @ApiOperation("修改机构启用停用状态")
-    @GetMapping(value = "/delete/{id}")
-    public HttpResponseResult<Object> opsState(@ApiParam(value = "训练营ID", required = true) @PathVariable("id") Integer id) {
-        tempLittleArtistTrainingCampService.delete(id);
-        return succeed();
-    }
-
     @ApiImplicitParams({
             @ApiImplicitParam(name = "name", dataType = "String", value = "训练营标题-模糊搜索"),
             @ApiImplicitParam(name = "state", dataType = "String", value = "筹备中 READY,报名中 APPLY,未开始 NOT_START,进行中 ING,已结束 END"),
@@ -73,18 +52,6 @@ public class TempLittleArtistTrainingCampController extends BaseController {
     }
 
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "search", dataType = "String", value = "学员姓名/手机号/编号-模糊搜索"),
-            @ApiImplicitParam(name = "state", dataType = "String", value = "状态:未报名NOT_APPLY ,已报名 APPLY"),
-            @ApiImplicitParam(name = "page", dataType = "Integer", required = true, value = "页数"),
-            @ApiImplicitParam(name = "rows", dataType = "Integer", required = true, value = "每页数量"),
-    })
-    @ApiOperation("分页查询-参与名单")
-    @PostMapping(value = "/queryPageTrainingCampUser")
-    public HttpResponseResult<PageInfo<TempCampUserVo>> queryPageTrainingCampUser(@RequestBody Map<String, Object> param) {
-        return succeed(tempLittleArtistTrainingCampService.queryPageTrainingCampUser(param));
-    }
-
-    @ApiImplicitParams({
             @ApiImplicitParam(name = "userId", dataType = "Integer", required = true, value = "用户id"),
     })
     @ApiOperation("查询指定学生-训练营每日训练时长")
@@ -96,6 +63,7 @@ public class TempLittleArtistTrainingCampController extends BaseController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "search", dataType = "String", value = "学员姓名/手机号/编号-模糊搜索"),
             @ApiImplicitParam(name = "imGroupId", dataType = "Integer", value = "所在群组Id"),
+            @ApiImplicitParam(name = "campId", dataType = "Integer", value = "训练营id"),
             @ApiImplicitParam(name = "page", dataType = "Integer", required = true, value = "页数"),
             @ApiImplicitParam(name = "rows", dataType = "Integer", required = true, value = "每页数量"),
     })
@@ -105,12 +73,6 @@ public class TempLittleArtistTrainingCampController extends BaseController {
         return succeed(tempLittleArtistTrainingCampService.queryUserTrainingDetail(param));
     }
 
-    @ApiOperation("根据群组Id查询群组信息")
-    @GetMapping(value = "/queryCampImGroup")
-    public HttpResponseResult<List<ImGroup>> queryCampImGroup(@ApiParam(value = "群组id,多个用逗号隔开 imGroupIds", required = true) String imGroupIds){
-        return succeed(tempLittleArtistTrainingCampService.queryCampImGroup(imGroupIds));
-    }
-
     /**
      * 查询训练营周期表
      *

+ 2 - 0
mec-web/src/main/java/com/ym/mec/web/controller/TempLittleArtistTrainingCampController.java

@@ -98,6 +98,7 @@ public class TempLittleArtistTrainingCampController extends BaseController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "search", dataType = "String", value = "学员姓名/手机号/编号-模糊搜索"),
             @ApiImplicitParam(name = "imGroupId", dataType = "Integer", value = "所在群组Id"),
+            @ApiImplicitParam(name = "campId", dataType = "Integer", value = "训练营id"),
             @ApiImplicitParam(name = "page", dataType = "Integer", required = true, value = "页数"),
             @ApiImplicitParam(name = "rows", dataType = "Integer", required = true, value = "每页数量"),
     })
@@ -148,6 +149,7 @@ public class TempLittleArtistTrainingCampController extends BaseController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "search", dataType = "String", value = "学员姓名/手机号/编号-模糊搜索"),
             @ApiImplicitParam(name = "imGroupId", dataType = "Integer", value = "所在群组Id"),
+            @ApiImplicitParam(name = "campId", dataType = "Integer", value = "训练营id"),
     })
     @ApiOperation(value="导出训练营详情")
     @PostMapping(value = "/exportUserTrainingDetail")