Selaa lähdekoodia

Merge branch 'v3.5' of http://git.ycjcjy.com/zhiyuxing/estateagents into v3.5

胡轶钦 5 vuotta sitten
vanhempi
commit
296b677a11

+ 5
- 2
src/main/java/com/huiju/estateagents/controller/HelpActivityController.java Näytä tiedosto

@@ -251,8 +251,11 @@ public class HelpActivityController extends BaseController {
251 251
             helpInitiateRecordQuery.eq("help_activity_id",helpActivityId);
252 252
                 List<HelpInitiateRecord> list= helpInitiateRecordMapper.selectList(helpInitiateRecordQuery);
253 253
                 for (HelpInitiateRecord helpInitiateRecord:list){
254
-                    helpInitiateRecord.setStatus(2);
255
-                    helpInitiateRecordMapper.updateById(helpInitiateRecord);
254
+                    // 助力成功的不更新。
255
+                    if (!helpInitiateRecord.getStatus().equals(0)) {
256
+                        helpInitiateRecord.setStatus(2);
257
+                        helpInitiateRecordMapper.updateById(helpInitiateRecord);
258
+                    }
256 259
                 }
257 260
         }
258 261
         Boolean isA = taHelpActivityService.updateById(helpActivity);

+ 18
- 3
src/main/resources/mapper/Activity.xml Näytä tiedosto

@@ -3,11 +3,26 @@
3 3
 <mapper namespace="com.huiju.estateagents.activity.mapper.ActivityMapper">
4 4
 
5 5
     <select id="getActivityList" resultType="com.huiju.estateagents.activity.entity.Activity">
6
-        SELECT dynamic_id as id,img_url as main_img,title,start_date as start_date,enlist_end as end_date,weight,activity_status,'dynamic' as type FROM ta_building_dynamic WHERE org_id = #{orgId}  and `status` = #{status} and city_id = #{cityId}
6
+        SELECT dynamic_id as id,img_url as main_img,title,start_date as start_date,enlist_end as end_date,weight,activity_status,'dynamic' as type
7
+        FROM ta_building_dynamic
8
+        WHERE org_id = #{orgId}  and `status` = #{status}
9
+        <if test="cityId != null and cityId != ''">
10
+          and city_id = #{cityId}
11
+        </if>
7 12
         UNION  all
8
-        SELECT group_activity_id as id,main_img,activity_name as title,start_time as start_date,end_time as end_date,weight,activity_status,'group' as type from ta_share_activity WHERE org_id = #{orgId} and `status` = #{status} and city_id = #{cityId}
13
+        SELECT group_activity_id as id,main_img,activity_name as title,start_time as start_date,end_time as end_date,weight,activity_status,'group' as type
14
+        from ta_share_activity
15
+        WHERE org_id = #{orgId} and `status` = #{status}
16
+        <if test="cityId != null and cityId != ''">
17
+            and city_id = #{cityId}
18
+        </if>
9 19
         UNION  all
10
-        SELECT help_activity_id as id,img as main_img,title,start_date,end_date,weight,activity_status,'help' as type from ta_help_activity WHERE org_id = #{orgId} and `status` = #{status} and city_id = #{cityId}
20
+        SELECT help_activity_id as id,img as main_img,title,start_date,end_date,weight,activity_status,'help' as type
21
+        from ta_help_activity
22
+        WHERE org_id = #{orgId} and `status` = #{status}
23
+        <if test="cityId != null and cityId != ''">
24
+            and city_id = #{cityId}
25
+        </if>
11 26
         ORDER BY weight desc,activity_status,start_date
12 27
     </select>
13 28
 </mapper>

+ 1
- 1
src/main/resources/mapper/TaRecommendCustomerMapper.xml Näytä tiedosto

@@ -247,7 +247,7 @@ FROM
247 247
         if(a.sex = 1, '男',if(a.sex = 2, '女', '未知')) as sex,
248 248
         c.nickname as recommend,
249 249
         c.phone as recommendTel,
250
-        if(a.verify_status = 0, '未通过', if(a.verify_status = 1, '已通过', if(a.verify_status = 2, '已驳回', ''))) as verifyStatusName
250
+        if(a.verify_status = 0, '待审核', if(a.verify_status = 1, '已通过', if(a.verify_status = 2, '未通过', ''))) as verifyStatusName
251 251
         FROM
252 252
         ta_recommend_customer a
253 253
         LEFT JOIN ta_person c on a.recommend_person = c.person_id