傅行帆 5 yıl önce
ebeveyn
işleme
ebf5ac0832

+ 2
- 0
src/main/java/com/huiju/estateagents/service/impl/TaBuildingDynamicServiceImpl.java Dosyayı Görüntüle

@@ -398,6 +398,8 @@ public class TaBuildingDynamicServiceImpl extends ServiceImpl<TaBuildingDynamicM
398 398
                 taBuildingDynamic.setPosters(taPosterService.getPostersForTarget(taBuildingDynamic.getDynamicId(), CommConstant.POSTER_CONTENT_TYPE_ACTIVITY));
399 399
                 taBuildingDynamic.setShareContents(taShareContentService.getPostersForTarget(taBuildingDynamic.getDynamicId(), CommConstant.POSTER_CONTENT_TYPE_ACTIVITY));
400 400
 
401
+                //更改状态为已参与
402
+                taBuildingDynamic.setActivityStatus(CommConstant.ACTIVITY_STATUS_PARTNER);
401 403
 
402 404
             }
403 405
             return result;

+ 11
- 3
src/main/resources/mapper/HelpActivityMapper.xml Dosyayı Görüntüle

@@ -62,9 +62,13 @@
62 62
 			FROM
63 63
 				ta_help_activity a
64 64
 				WHERE
65
-                  a.org_id =#{orgId}
65
+                    a.org_id =#{orgId}
66
+                <if test="buildingId  == null ">
66 67
                   and  a.is_main = 1
67
-                  and  a.city_id = #{cityID}
68
+                </if>
69
+                <if test="cityID != null and cityID != ''">
70
+                      and  a.city_id = #{cityID}
71
+                </if>
68 72
                 <if test="buildingId != null and buildingId != ''">
69 73
                   and a.building_id = #{buildingId}
70 74
                 </if>
@@ -79,9 +83,13 @@
79 83
 				FROM
80 84
 					ta_share_activity s
81 85
 					WHERE
82
-                        s.org_id =#{orgId}
86
+                    s.org_id =#{orgId}
87
+                <if test="buildingId  == null ">
83 88
                     and  s.sort = 1
89
+                </if>
90
+                <if test="cityID != null and cityID != ''">
84 91
                     and  s.city_id = #{cityID}
92
+                </if>
85 93
                 <if test="buildingId != null and buildingId != ''">
86 94
                     and s.building_id = #{buildingId}
87 95
                 </if>