dingxin 5 年之前
父節點
當前提交
f186610960

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

@@ -508,12 +508,14 @@ public class HelpActivityController extends BaseController {
508 508
     @ApiOperation(value = "微信端查询拼团和助力推首页的活动的", notes = "微信端查询拼团和助力推首页的活动的")
509 509
     @ApiImplicitParams({
510 510
             @ApiImplicitParam(dataTypeClass = Integer.class, name = "buildingId", paramType = "query", value = "活动状态"),
511
-            @ApiImplicitParam(dataTypeClass = Integer.class, name = "type", paramType = "query", value = "1助力,2拼团")
511
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "type", paramType = "query", value = "1助力,2拼团"),
512
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "type", paramType = "query", value = "cityId首页专用")
512 513
     })
513 514
     @RequestMapping(value = "/wx/helpActivityAndGroup", method = RequestMethod.GET)
514 515
     public ResponseBean wxhelpActivityAndGroup(HttpServletRequest request,
515
-                                               @RequestParam(value = "buildingId",required = false) String buildingId) {
516
-            ResponseBean lsit = taHelpActivityService.wxhelpActivityAndGroup(getOrgId(request),buildingId);
516
+                                               @RequestParam(value = "buildingId",required = false) String buildingId,
517
+                                               @RequestParam(value = "cityId",required = false) String cityId) {
518
+            ResponseBean lsit = taHelpActivityService.wxhelpActivityAndGroup(getOrgId(request),buildingId,cityId);
517 519
                 return lsit;
518 520
         }
519 521
 

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

@@ -43,7 +43,7 @@ public interface HelpActivityMapper extends BaseMapper<HelpActivity> {
43 43
      * @param buildingId
44 44
      * @return
45 45
      */
46
-    List<HelpActivity> selectWxhelpActivityAndGroup(@Param("orgId")Integer orgId,@Param("buildingId") String buildingId);
46
+    List<HelpActivity> selectWxhelpActivityAndGroup(@Param("orgId")Integer orgId,@Param("buildingId") String buildingId,@Param("cityID") String cityID);
47 47
 
48 48
     /**
49 49
      * 列表 已开始 和 未开始

+ 1
- 1
src/main/java/com/huiju/estateagents/service/IHelpActivityService.java 查看文件

@@ -130,7 +130,7 @@ public interface IHelpActivityService extends IService<HelpActivity> {
130 130
      * @param orgId
131 131
      * @return
132 132
      */
133
-    ResponseBean wxhelpActivityAndGroup(Integer orgId,String buildingId);
133
+    ResponseBean wxhelpActivityAndGroup(Integer orgId,String buildingId,String cityID);
134 134
 
135 135
     /**
136 136
      * 列表  已开始 和 未开始

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

@@ -207,10 +207,10 @@ public class HelpActivityServiceImpl extends ServiceImpl<HelpActivityMapper, Hel
207 207
     }
208 208
 
209 209
     @Override
210
-    public ResponseBean wxhelpActivityAndGroup(Integer orgId,String buildingId) {
210
+    public ResponseBean wxhelpActivityAndGroup(Integer orgId,String buildingId,String cityID) {
211 211
         ResponseBean responseBean = new ResponseBean<>();
212 212
         // buildingId 楼盘ID为空时首页只查置顶的活动,楼盘ID不为空查所有拼团和助力
213
-        List<HelpActivity> HelpActivity = taHelpActivityMapper.selectWxhelpActivityAndGroup(orgId,buildingId);
213
+        List<HelpActivity> HelpActivity = taHelpActivityMapper.selectWxhelpActivityAndGroup(orgId,buildingId,cityID);
214 214
         responseBean.addSuccess(HelpActivity);
215 215
         return responseBean;
216 216
     }

+ 4
- 0
src/main/resources/mapper/HelpActivityMapper.xml 查看文件

@@ -55,6 +55,7 @@
55 55
     <select id="selectWxhelpActivityAndGroup" resultType="com.huiju.estateagents.entity.HelpActivity">
56 56
 		(
57 57
 			SELECT
58
+                a.city_id as cityId,
58 59
 				a.help_activity_id as activityId,
59 60
 				a.img as img,
60 61
 				1 AS type
@@ -64,6 +65,7 @@
64 65
                   org_id =#{orgId}
65 66
                 <if test="buildingId  == null ">
66 67
                   and  a.is_main = 1
68
+                  and  a.city_id = #{cityID}
67 69
                 </if>
68 70
                 <if test="buildingId != null and buildingId != ''">
69 71
                   and a.building_id = #{buildingId}
@@ -72,6 +74,7 @@
72 74
 		UNION ALL
73 75
 			(
74 76
 				SELECT
77
+                    s.city_id as cityId,
75 78
 					s.group_activity_id as activityId,
76 79
 					s.main_img as img,
77 80
 					2 AS type
@@ -81,6 +84,7 @@
81 84
                         org_id =#{orgId}
82 85
                 <if test="buildingId  == null ">
83 86
                     and  s.sort = 1
87
+                    and  s.city_id = #{cityID}
84 88
                 </if>
85 89
                 <if test="buildingId != null and buildingId != ''">
86 90
                     and s.building_id = #{buildingId}