魏超 před 5 roky
rodič
revize
c8c9298ab6

+ 3
- 1
src/main/java/com/huiju/estateagents/controller/TaShareActivityController.java Zobrazit soubor

70
     
70
     
71
     @Autowired
71
     @Autowired
72
     private ITdPosterTemplateService tdPosterTemplateService;
72
     private ITdPosterTemplateService tdPosterTemplateService;
73
-    
73
+
74
 
74
 
75
     /**
75
     /**
76
      * 分页查询列表
76
      * 分页查询列表
259
             //0:进行中 1:未开始 2:已结束
259
             //0:进行中 1:未开始 2:已结束
260
             taShareActivity.setActivityStatus(2);
260
             taShareActivity.setActivityStatus(2);
261
             taShareActivity.setGroupActivityId(id);
261
             taShareActivity.setGroupActivityId(id);
262
+            taShareRecordService.updateActivityProcessToEndByGroupActivityId(id);
263
+            taShareChildRecordService.updateActivityProcessToEndByGroupActivityId(id);
262
             if (iTaShareActivityService.updateById(taShareActivity)){
264
             if (iTaShareActivityService.updateById(taShareActivity)){
263
                 responseBean.addSuccess(taShareActivity);
265
                 responseBean.addSuccess(taShareActivity);
264
             }else {
266
             }else {

+ 1
- 0
src/main/java/com/huiju/estateagents/mapper/TaShareChildRecordMapper.java Zobrazit soubor

22
     IPage<TaShareChildRecord> getList(IPage<TaShareChildRecord> pg, @Param("groupActivityId") Integer groupActivityId, @Param("status") Integer status, @Param("recordId") Integer recordId, @Param("orgId") Integer orgId);
22
     IPage<TaShareChildRecord> getList(IPage<TaShareChildRecord> pg, @Param("groupActivityId") Integer groupActivityId, @Param("status") Integer status, @Param("recordId") Integer recordId, @Param("orgId") Integer orgId);
23
     List<ShareChildRecordExport> getShareRecordExportList(@Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize, @Param("recordId") Integer recordId , @Param("status")Integer status, @Param("groupActivityId") Integer groupActivityId);
23
     List<ShareChildRecordExport> getShareRecordExportList(@Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize, @Param("recordId") Integer recordId , @Param("status")Integer status, @Param("groupActivityId") Integer groupActivityId);
24
     void updateEndGroupActivity();
24
     void updateEndGroupActivity();
25
+    void updateActivityProcessToEndByGroupActivityId(@Param("groupActivityId") Integer groupActivityId);
25
 }
26
 }

+ 1
- 1
src/main/java/com/huiju/estateagents/mapper/TaShareRecordMapper.java Zobrazit soubor

29
     List<ShareRecordFailExport> getShareRecordFailExportList(@Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize, @Param("recordId") Integer recordId , @Param("status")Integer status, @Param("groupActivityId") Integer groupActivityId);
29
     List<ShareRecordFailExport> getShareRecordFailExportList(@Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize, @Param("recordId") Integer recordId , @Param("status")Integer status, @Param("groupActivityId") Integer groupActivityId);
30
 	List<TaShareRecord> getShareRecordList(Page<TaShareRecord> pg,@Param("orgId") Integer orgId,@Param("personId") String personId);
30
 	List<TaShareRecord> getShareRecordList(Page<TaShareRecord> pg,@Param("orgId") Integer orgId,@Param("personId") String personId);
31
     void updateEndGroupActivity();
31
     void updateEndGroupActivity();
32
-
32
+    void updateEndGroupActivityByGroupActivityId(@Param("groupActivityId")Integer groupActivityId);
33
     /**
33
     /**
34
      * 计算成团数
34
      * 计算成团数
35
      * @param groupActivityId
35
      * @param groupActivityId

+ 7
- 0
src/main/java/com/huiju/estateagents/service/ITaShareChildRecordService.java Zobrazit soubor

23
     Integer getShareRecord(Integer recordId, Integer status);
23
     Integer getShareRecord(Integer recordId, Integer status);
24
     List<ShareChildRecordExport> getShareRecordExportList(Integer pageCode, Integer pageSize, Integer recordId, Integer status, Integer groupActivityId);
24
     List<ShareChildRecordExport> getShareRecordExportList(Integer pageCode, Integer pageSize, Integer recordId, Integer status, Integer groupActivityId);
25
 	void updateActivityProcessToEnd();
25
 	void updateActivityProcessToEnd();
26
+
27
+	/**
28
+	 * 根据拼团活动id更新参团者拼团失败
29
+	 * @param groupActivityId
30
+	 */
31
+	void updateActivityProcessToEndByGroupActivityId(Integer groupActivityId);
32
+
26
 	/**
33
 	/**
27
 	 * 微信端成为团员
34
 	 * 微信端成为团员
28
 	 *
35
 	 *

+ 6
- 0
src/main/java/com/huiju/estateagents/service/ITaShareRecordService.java Zobrazit soubor

30
     List<ShareRecordSuccessExport>  getShareRecordSuccessExportList(Integer pageCode, Integer pageSize, Integer recordId, Integer status, Integer groupActivityId);
30
     List<ShareRecordSuccessExport>  getShareRecordSuccessExportList(Integer pageCode, Integer pageSize, Integer recordId, Integer status, Integer groupActivityId);
31
     List<ShareRecordFailExport>  getShareRecordFailExportList(Integer pageCode, Integer pageSize, Integer recordId, Integer status, Integer groupActivityId);
31
     List<ShareRecordFailExport>  getShareRecordFailExportList(Integer pageCode, Integer pageSize, Integer recordId, Integer status, Integer groupActivityId);
32
 	void updateActivityProcessToEnd();
32
 	void updateActivityProcessToEnd();
33
+
34
+	/**
35
+	 * 根据拼团活动id更新发团者拼团失败
36
+	 */
37
+	void updateActivityProcessToEndByGroupActivityId(Integer groupActivityId);
38
+
33
     /**
39
     /**
34
 	 * 分页获取微信端发起拼团记录
40
 	 * 分页获取微信端发起拼团记录
35
 	 * @param pageNum
41
 	 * @param pageNum

+ 5
- 0
src/main/java/com/huiju/estateagents/service/impl/TaShareChildRecordServiceImpl.java Zobrazit soubor

115
         taShareChildRecordMapper.updateEndGroupActivity();
115
         taShareChildRecordMapper.updateEndGroupActivity();
116
     }
116
     }
117
 
117
 
118
+    @Override
119
+    public void updateActivityProcessToEndByGroupActivityId(Integer groupActivityId) {
120
+        taShareChildRecordMapper.updateActivityProcessToEndByGroupActivityId(groupActivityId);
121
+    }
122
+
118
     /**
123
     /**
119
      * 微信端成为团员
124
      * 微信端成为团员
120
      *
125
      *

+ 5
- 0
src/main/java/com/huiju/estateagents/service/impl/TaShareRecordServiceImpl.java Zobrazit soubor

162
         taShareRecordMapper.updateEndGroupActivity();
162
         taShareRecordMapper.updateEndGroupActivity();
163
     }
163
     }
164
 
164
 
165
+    @Override
166
+    public void updateActivityProcessToEndByGroupActivityId(Integer groupActivityId) {
167
+        taShareRecordMapper.updateEndGroupActivityByGroupActivityId(groupActivityId);
168
+    }
169
+
165
     /**
170
     /**
166
      * 分页获取微信端发起拼团记录
171
      * 分页获取微信端发起拼团记录
167
      *
172
      *

+ 6
- 0
src/main/resources/mapper/TaShareChildRecordMapper.xml Zobrazit soubor

9
         where (NOW() > b.end_time or b.activity_status = '2') and a.`status` = '1' and a.status != '0'
9
         where (NOW() > b.end_time or b.activity_status = '2') and a.`status` = '1' and a.status != '0'
10
     </update>
10
     </update>
11
 
11
 
12
+    <update id="updateActivityProcessToEndByGroupActivityId">
13
+      <if test="groupActivityId != null and groupActivityId != ''">
14
+          update ta_share_child_record a set a.status = '2' where a.group_activity_id = #{groupActivityId}
15
+      </if>
16
+    </update>
17
+
12
     <select id="getList" resultType="com.huiju.estateagents.entity.TaShareChildRecord">
18
     <select id="getList" resultType="com.huiju.estateagents.entity.TaShareChildRecord">
13
         select
19
         select
14
           t.nickname,
20
           t.nickname,

+ 6
- 0
src/main/resources/mapper/TaShareRecordMapper.xml Zobrazit soubor

9
         where (NOW() > b.end_time or b.activity_status = '2') and a.`status` = '1' and a.status != '0'
9
         where (NOW() > b.end_time or b.activity_status = '2') and a.`status` = '1' and a.status != '0'
10
     </update>
10
     </update>
11
 
11
 
12
+    <update id="updateEndGroupActivityByGroupActivityId">
13
+        <if test="groupActivityId != '' and groupActivityId != null">
14
+            update ta_share_record a set a.status = '2' where a.group_activity_id = #{groupActivityId}
15
+        </if>
16
+    </update>
17
+
12
     <select id="recordSuccessList" resultType="com.huiju.estateagents.entity.TaShareRecord">
18
     <select id="recordSuccessList" resultType="com.huiju.estateagents.entity.TaShareRecord">
13
         (select
19
         (select
14
         t.record_id,
20
         t.record_id,