瀏覽代碼

结束活动

魏超 5 年之前
父節點
當前提交
c8c9298ab6

+ 3
- 1
src/main/java/com/huiju/estateagents/controller/TaShareActivityController.java 查看文件

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

+ 1
- 0
src/main/java/com/huiju/estateagents/mapper/TaShareChildRecordMapper.java 查看文件

@@ -22,4 +22,5 @@ public interface TaShareChildRecordMapper extends BaseMapper<TaShareChildRecord>
22 22
     IPage<TaShareChildRecord> getList(IPage<TaShareChildRecord> pg, @Param("groupActivityId") Integer groupActivityId, @Param("status") Integer status, @Param("recordId") Integer recordId, @Param("orgId") Integer orgId);
23 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 24
     void updateEndGroupActivity();
25
+    void updateActivityProcessToEndByGroupActivityId(@Param("groupActivityId") Integer groupActivityId);
25 26
 }

+ 1
- 1
src/main/java/com/huiju/estateagents/mapper/TaShareRecordMapper.java 查看文件

@@ -29,7 +29,7 @@ public interface TaShareRecordMapper extends BaseMapper<TaShareRecord> {
29 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 30
 	List<TaShareRecord> getShareRecordList(Page<TaShareRecord> pg,@Param("orgId") Integer orgId,@Param("personId") String personId);
31 31
     void updateEndGroupActivity();
32
-
32
+    void updateEndGroupActivityByGroupActivityId(@Param("groupActivityId")Integer groupActivityId);
33 33
     /**
34 34
      * 计算成团数
35 35
      * @param groupActivityId

+ 7
- 0
src/main/java/com/huiju/estateagents/service/ITaShareChildRecordService.java 查看文件

@@ -23,6 +23,13 @@ public interface ITaShareChildRecordService extends IService<TaShareChildRecord>
23 23
     Integer getShareRecord(Integer recordId, Integer status);
24 24
     List<ShareChildRecordExport> getShareRecordExportList(Integer pageCode, Integer pageSize, Integer recordId, Integer status, Integer groupActivityId);
25 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 查看文件

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

+ 5
- 0
src/main/java/com/huiju/estateagents/service/impl/TaShareChildRecordServiceImpl.java 查看文件

@@ -115,6 +115,11 @@ public class TaShareChildRecordServiceImpl extends ServiceImpl<TaShareChildRecor
115 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 查看文件

@@ -162,6 +162,11 @@ public class TaShareRecordServiceImpl extends ServiceImpl<TaShareRecordMapper, T
162 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 查看文件

@@ -9,6 +9,12 @@
9 9
         where (NOW() > b.end_time or b.activity_status = '2') and a.`status` = '1' and a.status != '0'
10 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 18
     <select id="getList" resultType="com.huiju.estateagents.entity.TaShareChildRecord">
13 19
         select
14 20
           t.nickname,

+ 6
- 0
src/main/resources/mapper/TaShareRecordMapper.xml 查看文件

@@ -9,6 +9,12 @@
9 9
         where (NOW() > b.end_time or b.activity_status = '2') and a.`status` = '1' and a.status != '0'
10 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 18
     <select id="recordSuccessList" resultType="com.huiju.estateagents.entity.TaShareRecord">
13 19
         (select
14 20
         t.record_id,