ソースを参照

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

胡轶钦 5 年 前
コミット
6d165c0135

+ 1
- 1
pom.xml ファイルの表示

@@ -10,7 +10,7 @@
10 10
 	</parent>
11 11
 	<groupId>com.huiju</groupId>
12 12
 	<artifactId>estateagents</artifactId>
13
-	<version>v3.0.0</version>
13
+	<version>v3.4.1</version>
14 14
 	<name>estateages</name>
15 15
 	<description>置业经纪人</description>
16 16
 

+ 11
- 2
src/main/java/com/huiju/estateagents/controller/HelpActivityController.java ファイルの表示

@@ -272,11 +272,11 @@ public class HelpActivityController extends BaseController {
272 272
             @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query", value = "第几页"),
273 273
             @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query", value = "一页多少行"),
274 274
             @ApiImplicitParam(dataTypeClass = String.class, name = "helpRecordInitiateId", paramType = "query", value = "发起助力ID"),
275
-            @ApiImplicitParam(dataTypeClass = Integer.class, name = "verifyCode", paramType = "query", value = "核销码"),
275
+            @ApiImplicitParam(dataTypeClass = String.class, name = "verifyCode", paramType = "query", value = "核销码"),
276 276
     })
277 277
     @RequestMapping(value = "admin/helpInitiateRecordVerify", method = RequestMethod.POST)
278 278
     public ResponseBean helpInitiateRecordVerify(@RequestParam(value = "helpRecordInitiateId", required = false) Integer helpRecordInitiateId,
279
-                                                 @RequestParam(value = "verifyCode", required = false) Integer verifyCode) {
279
+                                                 @RequestParam(value = "verifyCode", required = false) String verifyCode) {
280 280
         ResponseBean helpRecord = taHelpActivityService.helpInitiateRecordVerify(helpRecordInitiateId, verifyCode);
281 281
         return helpRecord;
282 282
     }
@@ -477,5 +477,14 @@ public class HelpActivityController extends BaseController {
477 477
         }
478 478
         return responseBean;
479 479
     }
480
+    @ApiOperation(value = "微信端查询拼团和助力推首页的活动的", notes = "微信端查询拼团和助力推首页的活动的")
481
+    @ApiImplicitParams({
482
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "helpActivityId", paramType = "path", value = "活动状态")
483
+    })
484
+    @RequestMapping(value = "/wx/helpActivityAndGroup", method = RequestMethod.GET)
485
+    public ResponseBean wxhelpActivityAndGroup(HttpServletRequest request) {
486
+            ResponseBean lsit = taHelpActivityService.wxhelpActivityAndGroup(getOrgId(request));
487
+                return lsit;
488
+        }
480 489
 
481 490
 }

+ 2
- 1
src/main/java/com/huiju/estateagents/controller/HelpInitiateRecordController.java ファイルの表示

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.huiju.estateagents.base.BaseController;
7 7
 import com.huiju.estateagents.base.ResponseBean;
8
+import com.huiju.estateagents.common.CommConstant;
8 9
 import com.huiju.estateagents.entity.HelpInitiateRecord;
9 10
 import com.huiju.estateagents.entity.TaPerson;
10 11
 import com.huiju.estateagents.service.IHelpInitiateRecordService;
@@ -216,7 +217,7 @@ public class HelpInitiateRecordController extends BaseController {
216 217
             }
217 218
  
218 219
             helpInitiateRecord.setPersonId(person.getPersonId());
219
- 
220
+            helpInitiateRecord.setVerificationStatus(CommConstant.STATUS_UNACCALIMED);
220 221
             helpInitiateRecord.setCreateDate(LocalDateTime.now());
221 222
             helpInitiateRecord.setOrgId(orgId);
222 223
             helpInitiateRecord.setStatus(1);

+ 1
- 3
src/main/java/com/huiju/estateagents/controller/TaGoodsController.java ファイルの表示

@@ -238,9 +238,7 @@ public class TaGoodsController extends BaseController {
238 238
     @ApiOperation(value = "微信 查询有商品的项目", notes = "微信 查询有商品的项目")
239 239
     @GetMapping(value = "/wx/goodsToBuilding")
240 240
     public ResponseBean wxGoodsToBuilding(HttpServletRequest request) {
241
-        ResponseBean responseBean = new ResponseBean();
242
-
243
-        return responseBean;
241
+        return iTaBuildingService.getBuildingListById(getOrgId(request));
244 242
     }
245 243
 
246 244
     /**

+ 13
- 0
src/main/java/com/huiju/estateagents/entity/HelpActivity.java ファイルの表示

@@ -134,4 +134,17 @@ public class HelpActivity implements Serializable {
134 134
     @TableField(exist = false)
135 135
     private Integer successNum;
136 136
 
137
+    /**
138
+     * 助力拼团2表和1活动ID
139
+     * activityId
140
+     */
141
+    @TableField(exist = false)
142
+    private Integer activityId;
143
+
144
+    /**
145
+     * 助力拼团2表和1
146
+     * type(1助力,2拼团)
147
+     */
148
+    @TableField(exist = false)
149
+    private Integer type;
137 150
 }

+ 21
- 1
src/main/java/com/huiju/estateagents/entity/TaShareRecord.java ファイルの表示

@@ -1,6 +1,7 @@
1 1
 package com.huiju.estateagents.entity;
2 2
 
3 3
 import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
4 5
 import com.baomidou.mybatisplus.annotation.TableId;
5 6
 import lombok.Data;
6 7
 import lombok.EqualsAndHashCode;
@@ -90,5 +91,24 @@ public class TaShareRecord implements Serializable {
90 91
      */
91 92
     private String verificationCode;
92 93
 
93
-
94
+    @TableField(exist = false)
95
+    private String activityName;
96
+    
97
+    @TableField(exist = false)
98
+    private String mainImg;
99
+    
100
+    @TableField(exist = false)
101
+    private Integer activityStatus;
102
+    
103
+    @TableField(exist = false)
104
+    private LocalDateTime endDate;
105
+    
106
+    @TableField(exist = false)
107
+    private Integer id;
108
+    
109
+    /**
110
+     * 是否发起者
111
+     */
112
+    @TableField(exist = false)
113
+    private boolean groupStatus;
94 114
 }

+ 7
- 0
src/main/java/com/huiju/estateagents/mapper/HelpActivityMapper.java ファイルの表示

@@ -36,4 +36,11 @@ public interface HelpActivityMapper extends BaseMapper<HelpActivity> {
36 36
     void updateUnStartHelpActivity(@Param("list") List<Integer> startHelpActivityId);
37 37
 
38 38
     void updateEndHelpActivity(@Param("list")List<Integer> endHelpActivityId);
39
+
40
+    /**
41
+     * 微信端查询拼团和助力推首页的活动的
42
+     * @param orgId
43
+     * @return
44
+     */
45
+    List<HelpActivity> selectWxhelpActivityAndGroup(Integer orgId);
39 46
 }

+ 1
- 0
src/main/java/com/huiju/estateagents/mapper/TaBuildingMapper.java ファイルの表示

@@ -43,6 +43,7 @@ public interface TaBuildingMapper extends BaseMapper<TaBuilding> {
43 43
 
44 44
     List<TaBuilding> buildingAll(@Param("orgId") Integer orgId);
45 45
 
46
+    List<TaBuilding> getBuildingListById(@Param("orgId") Integer orgId);
46 47
     /**
47 48
      * 查询当前楼盘
48 49
      * @param buildingId

+ 8
- 1
src/main/java/com/huiju/estateagents/service/IHelpActivityService.java ファイルの表示

@@ -69,7 +69,7 @@ public interface IHelpActivityService extends IService<HelpActivity> {
69 69
      * @param verifyCode
70 70
      * @return
71 71
      */
72
-    ResponseBean helpInitiateRecordVerify(Integer helpRecordInitiateId, Integer verifyCode);
72
+    ResponseBean helpInitiateRecordVerify(Integer helpRecordInitiateId, String verifyCode);
73 73
 
74 74
     /**
75 75
      * 查询当前导出数据的总数
@@ -125,4 +125,11 @@ public interface IHelpActivityService extends IService<HelpActivity> {
125 125
      * @param endGroupActivityIds
126 126
      */
127 127
     void updateEndActivity(List<Integer> endGroupActivityIds);
128
+
129
+    /**
130
+     * 微信端查询拼团和助力推首页的活动的
131
+     * @param orgId
132
+     * @return
133
+     */
134
+    ResponseBean wxhelpActivityAndGroup(Integer orgId);
128 135
 }

+ 2
- 0
src/main/java/com/huiju/estateagents/service/ITaBuildingService.java ファイルの表示

@@ -158,4 +158,6 @@ public interface ITaBuildingService extends IService<TaBuilding> {
158 158
     ResponseBean buildingAll(Integer orgId);
159 159
 
160 160
     Integer getCityById(String buildingId);
161
+
162
+    ResponseBean getBuildingListById(Integer orgId);
161 163
 }

+ 10
- 2
src/main/java/com/huiju/estateagents/service/impl/HelpActivityServiceImpl.java ファイルの表示

@@ -130,7 +130,7 @@ public class HelpActivityServiceImpl extends ServiceImpl<HelpActivityMapper, Hel
130 130
     }
131 131
 
132 132
     @Override
133
-    public ResponseBean helpInitiateRecordVerify(Integer helpRecordInitiateId, Integer verifyCode) {
133
+    public ResponseBean helpInitiateRecordVerify(Integer helpRecordInitiateId, String verifyCode) {
134 134
         ResponseBean responseBean = new ResponseBean<>();
135 135
         HelpInitiateRecord helpInitiateRecord = helpInitiateRecordMapper.selectById(helpRecordInitiateId);
136 136
         if (null ==verifyCode || "".equals(verifyCode)){
@@ -144,7 +144,7 @@ public class HelpActivityServiceImpl extends ServiceImpl<HelpActivityMapper, Hel
144 144
             return responseBean;
145 145
         }
146 146
 
147
-        if (verifyCode.equals(Integer.valueOf(helpInitiateRecord.getVerification()))){
147
+        if (verifyCode.equals(String.valueOf(helpInitiateRecord.getVerification()))){
148 148
             helpInitiateRecord.setVerificationStatus(1);
149 149
             helpInitiateRecordMapper.updateById(helpInitiateRecord);
150 150
 
@@ -204,4 +204,12 @@ public class HelpActivityServiceImpl extends ServiceImpl<HelpActivityMapper, Hel
204 204
             taHelpActivityMapper.updateEndHelpActivity(endHelpActivityIds);
205 205
         }
206 206
     }
207
+
208
+    @Override
209
+    public ResponseBean wxhelpActivityAndGroup(Integer orgId) {
210
+        ResponseBean responseBean = new ResponseBean<>();
211
+        List<HelpActivity> HelpActivity = taHelpActivityMapper.selectWxhelpActivityAndGroup(orgId);
212
+        responseBean.addSuccess(HelpActivity);
213
+        return responseBean;
214
+    }
207 215
 }

+ 6
- 0
src/main/java/com/huiju/estateagents/service/impl/TaBuildingServiceImpl.java ファイルの表示

@@ -618,6 +618,12 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
618 618
         return taBuilding.getCityId();
619 619
     }
620 620
 
621
+    @Override
622
+    public ResponseBean getBuildingListById(Integer orgId) {
623
+        List<TaBuilding> buildings = taBuildingMapper.getBuildingListById(orgId);
624
+        return ResponseBean.success(buildings);
625
+    }
626
+
621 627
 
622 628
     int insertImgBatch(List<TaBuildingImg> imgs, String buildingId) {
623 629
         int rows = 0;

+ 23
- 1
src/main/resources/mapper/HelpActivityMapper.xml ファイルの表示

@@ -52,5 +52,27 @@
52 52
             #{item}
53 53
         </foreach>
54 54
     </update>
55
-
55
+    <select id="selectWxhelpActivityAndGroup" resultType="com.huiju.estateagents.entity.HelpActivity">
56
+		(
57
+			SELECT
58
+				a.help_activity_id as activityId,
59
+				a.img as img,
60
+				1 AS type
61
+			FROM
62
+				ta_help_activity a
63
+				WHERE a.is_main = 1
64
+				and org_id =#{orgId}
65
+		)
66
+		UNION ALL
67
+			(
68
+				SELECT
69
+					s.group_activity_id as activityId,
70
+					s.main_img as img,
71
+					2 AS type
72
+				FROM
73
+					ta_share_activity s
74
+					WHERE s.sort = 1
75
+					and org_id =#{orgId}
76
+			)
77
+    </select>
56 78
 </mapper>

+ 6
- 0
src/main/resources/mapper/TaBuildingMapper.xml ファイルの表示

@@ -194,4 +194,10 @@
194 194
 
195 195
     </select>
196 196
 
197
+    <select id="getBuildingListById" resultType="com.huiju.estateagents.entity.TaBuilding">
198
+      select * from ta_building t where t.building_id in (
199
+	    select t.building_id from ta_goods t where t.org_id = #{orgId} group by t.building_id
200
+      )
201
+    </select>
202
+
197 203
 </mapper>

+ 35
- 3
src/main/resources/mapper/TaShareRecordMapper.xml ファイルの表示

@@ -57,7 +57,6 @@
57 57
         t.phone,
58 58
         t.create_time,
59 59
         a.group_buy_people,
60
-        a.join_people,
61 60
         t.status,
62 61
         t.verification_status,
63 62
         t.verification_code
@@ -114,16 +113,49 @@
114 113
     </select>
115 114
     <select id="getShareRecordList" resultType="com.huiju.estateagents.entity.TaShareRecord">
116 115
         SELECT
117
-            t.*,
116
+            t.record_id AS id,
117
+            t.group_activity_id,
118
+            t.nickname,
119
+            t.phone,
120
+            t.avatarurl,
121
+            t.create_time,
122
+            t.end_time,
123
+            t.STATUS,
124
+            t.verification_status,
125
+            t.verification_code,
118 126
             a.activity_name,
119 127
             a.main_img,
120 128
             a.activity_status,
121
-            a.end_time AS end_date
129
+            a.end_time AS end_date,
130
+            1 as groupStatus
122 131
         FROM
123 132
             ta_share_record t
124 133
             LEFT JOIN ta_share_activity a ON t.group_activity_id = a.group_activity_id
125 134
         WHERE
126 135
             t.org_id = #{orgId}
127 136
             AND t.person_id = #{personId}
137
+	UNION ALL
138
+        SELECT
139
+            t.child_record_id AS id,
140
+            t.group_activity_id,
141
+            t.nickname,
142
+            t.phone,
143
+            t.avatarurl,
144
+            t.create_time,
145
+            t.end_time,
146
+            t.STATUS,
147
+            t.verification_status,
148
+            t.verification_code,
149
+            a.activity_name,
150
+            a.main_img,
151
+            a.activity_status,
152
+            a.end_time AS end_date,
153
+            0 as groupStatus
154
+        FROM
155
+            ta_share_child_record t
156
+            LEFT JOIN ta_share_activity a ON t.group_activity_id = a.group_activity_id
157
+        WHERE
158
+            t.org_id = #{orgId}
159
+            AND t.person_id = #{personId}
128 160
     </select>
129 161
 </mapper>