Explorar el Código

bug修复调整

dzx hace 1 año
padre
commit
d3944d69a4

+ 12 - 1
src/main/java/com/xjrsoft/module/activity/dto/ActivityInfoPageDto.java

@@ -19,10 +19,21 @@ public class ActivityInfoPageDto extends PageInput {
     @ApiModelProperty("活动类别(1:校企合作活动 2:赛事活动)")
     private Integer category;
 
-
     @ApiModelProperty("是否有效活动(1:是 0:否)")
     private Integer isEffective;
 
     @ApiModelProperty("登录者id")
     private Long loginUserId;
+
+    @ApiModelProperty("活动名称")
+    private String name;
+
+    @ApiModelProperty("活动类型(xjr_dictionary_detail[match_activity_type])")
+    private String type;
+
+    @ApiModelProperty("组织部门(xjr_department)")
+    private Long orgId;
+
+    @ApiModelProperty("状态(0:未发布 1:报名中 2:报名结束 3:活动结束)")
+    private Integer status;
 }

+ 0 - 30
src/main/java/com/xjrsoft/module/activity/service/impl/ActivityInfoServiceImpl.java

@@ -88,36 +88,6 @@ public class ActivityInfoServiceImpl extends MPJBaseServiceImpl<ActivityInfoMapp
             }
         }
         //********************************* ActivityEnrollRange  增删改  结束 *******************************************/
-
-        //********************************* ActivityEnroll  增删改  开始 *******************************************/
-        {
-            // 查出所有子级的id
-            List<ActivityEnroll> activityEnrollList = activityInfoActivityEnrollMapper.selectList(Wrappers.lambdaQuery(ActivityEnroll.class).eq(ActivityEnroll::getActivityInfoId, activityInfo.getId()).select(ActivityEnroll::getId));
-            List<Long> activityEnrollIds = activityEnrollList.stream().map(ActivityEnroll::getId).collect(Collectors.toList());
-            //原有子表单 没有被删除的主键
-            List<Long> activityEnrollOldIds = activityInfo.getActivityEnrollList().stream().map(ActivityEnroll::getId).filter(Objects::nonNull).collect(Collectors.toList());
-            //找到需要删除的id
-            List<Long> activityEnrollRemoveIds = activityEnrollIds.stream().filter(item -> !activityEnrollOldIds.contains(item)).collect(Collectors.toList());
-
-            for (ActivityEnroll activityEnroll : activityInfo.getActivityEnrollList()) {
-                //如果不等于空则修改
-                if (activityEnroll.getId() != null) {
-                    activityInfoActivityEnrollMapper.updateById(activityEnroll);
-                }
-                //如果等于空 则新增
-                else {
-                    //已经不存在的id 删除
-                    activityEnroll.setActivityInfoId(activityInfo.getId());
-                    activityInfoActivityEnrollMapper.insert(activityEnroll);
-                }
-            }
-            //已经不存在的id 删除
-            if(activityEnrollRemoveIds.size() > 0){
-                activityInfoActivityEnrollMapper.deleteBatchIds(activityEnrollRemoveIds);
-            }
-        }
-        //********************************* ActivityEnroll  增删改  结束 *******************************************/
-
         return true;
     }
 

+ 12 - 0
src/main/resources/mapper/activity/ActivityInfoMapper.xml

@@ -18,6 +18,18 @@
         <if test="dto.isEffective != null and dto.isEffective == 1">
             and (t1.status = 1 or t1.status = 2) and NOW() between t1.start_date and t1.end_date
         </if>
+        <if test="dto.name != null and dto.name != ''">
+            and t1.name like concat('%', #{dto.name},'%')
+        </if>
+        <if test="dto.type != null and dto.type != ''">
+            and t1.type = #{dto.type}
+        </if>
+        <if test="dto.orgId != null">
+            and t1.org_id = #{dto.orgId}
+        </if>
+        <if test="dto.status != null ">
+            and t1.status = #{dto.status}
+        </if>
     </select>
     <select id="getMyPage" parameterType="com.xjrsoft.module.activity.dto.ActivityInfoPageDto" resultType="com.xjrsoft.module.activity.vo.ActivityInfoPageVo">
         SELECT t1.id,t2.name AS type_cn,t3.company_name AS enterprise_name,t1.name,t1.place,t1.start_date,t1.end_date,