浏览代码

合并终结版

dingxin 5 年前
父节点
当前提交
948356656a

+ 12
- 2
src/main/java/com/huiju/estateagents/controller/HelpActivityController.java 查看文件

85
     @Autowired
85
     @Autowired
86
     private TaShareContentService taShareContentService;
86
     private TaShareContentService taShareContentService;
87
 
87
 
88
+    @Autowired
89
+    private HelpInitiateRecordMapper helpInitiateRecordMapper;
88
     /**
90
     /**
89
      * 活动助力列表
91
      * 活动助力列表
90
      *
92
      *
130
         Integer cityId = iTaBuildingService.getCityById(helpActivity.getBuildingId());
132
         Integer cityId = iTaBuildingService.getCityById(helpActivity.getBuildingId());
131
         helpActivity.setCityId(cityId);
133
         helpActivity.setCityId(cityId);
132
         // 活动暂且定位为未开始
134
         // 活动暂且定位为未开始
133
-        helpActivity.setActivityStatus(0);
135
+        helpActivity.setActivityStatus(1);
136
+        helpActivity.setStatus(0);
134
         helpActivity.setWeight(0);
137
         helpActivity.setWeight(0);
135
         helpActivity.setIsMain(false);
138
         helpActivity.setIsMain(false);
136
         taHelpActivityService.helpActivityAdd(helpActivity, orgId);
139
         taHelpActivityService.helpActivityAdd(helpActivity, orgId);
214
         // 结束活动操作
217
         // 结束活动操作
215
         if (activityStatus.equals("2")) {
218
         if (activityStatus.equals("2")) {
216
             helpActivity.setActivityStatus(2);
219
             helpActivity.setActivityStatus(2);
220
+            QueryWrapper<HelpInitiateRecord> helpInitiateRecordQuery= new QueryWrapper<>();
221
+            helpInitiateRecordQuery.eq("help_activity_id",helpActivityId);
222
+                List<HelpInitiateRecord> list= helpInitiateRecordMapper.selectList(helpInitiateRecordQuery);
223
+                for (HelpInitiateRecord helpInitiateRecord:list){
224
+                    helpInitiateRecord.setStatus(2);
225
+                    helpInitiateRecordMapper.updateById(helpInitiateRecord);
226
+                }
217
         }
227
         }
218
         Boolean isA = taHelpActivityService.updateById(helpActivity);
228
         Boolean isA = taHelpActivityService.updateById(helpActivity);
219
         responseBean.addSuccess(isA);
229
         responseBean.addSuccess(isA);
331
     }
341
     }
332
 
342
 
333
     /**
343
     /**
334
-     * 导出数据 客户列表 公客/私客
344
+     * 助力活动发起人
335
      *
345
      *
336
      * @param request
346
      * @param request
337
      * @param response
347
      * @param response

+ 2
- 2
src/main/java/com/huiju/estateagents/service/impl/HelpActivityServiceImpl.java 查看文件

92
                 }
92
                 }
93
             }
93
             }
94
             // 助力进行中(活动进行中,未结束)
94
             // 助力进行中(活动进行中,未结束)
95
-            if ("helpUnderway".equals(status) && helpActivity.getStatus().equals(1)) {
95
+            if ("helpUnderway".equals(status) && helpInitiateRecord.getStatus().equals(1)) {
96
                 if (persionNumCount > helpRecordCount) {
96
                 if (persionNumCount > helpRecordCount) {
97
                     helpInitiateRecord.setHelpCount(helpRecordCount);
97
                     helpInitiateRecord.setHelpCount(helpRecordCount);
98
                 }
98
                 }
99
             }
99
             }
100
             // 活动助力失败
100
             // 活动助力失败
101
             // 活动进行中(活动已结束)
101
             // 活动进行中(活动已结束)
102
-            if ("helpUnfinished".equals(status) && helpActivity.getStatus().equals(2)) {
102
+            if ("helpUnfinished".equals(status) && helpInitiateRecord.getStatus().equals(2)) {
103
                 if (persionNumCount > helpRecordCount) {
103
                 if (persionNumCount > helpRecordCount) {
104
                     helpInitiateRecord.setHelpCount(helpRecordCount);
104
                     helpInitiateRecord.setHelpCount(helpRecordCount);
105
                 }
105
                 }

+ 2
- 2
src/main/resources/mapper/HelpInitiateRecordMapper.xml 查看文件

15
         </if>
15
         </if>
16
        <if test="status == 'helpUnderway'">
16
        <if test="status == 'helpUnderway'">
17
            and (hi.verification = 'null' OR hi.verification = '')
17
            and (hi.verification = 'null' OR hi.verification = '')
18
-           AND ha.`activity_status` = 1
18
+           AND hi.`status` = 1
19
        </if>
19
        </if>
20
 
20
 
21
        <if test="status == 'helpUnfinished '">
21
        <if test="status == 'helpUnfinished '">
22
            and (hi.verification = 'null' OR hi.verification = '')
22
            and (hi.verification = 'null' OR hi.verification = '')
23
-           AND ha.`activity_status` = 2
23
+           AND hi.`status` =  2
24
        </if>
24
        </if>
25
        </where>
25
        </where>
26
     </select>
26
     </select>