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

+ 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.5</version>
13
+	<version>v3.5.1</version>
14 14
 	<name>estateages</name>
15 15
 	<description>置业经纪人</description>
16 16
 

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

@@ -142,9 +142,10 @@ public class HelpActivityController extends BaseController {
142 142
     public ResponseBean helpActivityEffectiveList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
143 143
                                          @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
144 144
                                          @RequestParam(value = "cityId", required = false) Integer cityId,
145
+                                         @RequestParam(value = "buildingId", required = false) String buildingId,
145 146
                                          HttpServletRequest request) {
146 147
         Integer orgId = getOrgId(request);
147
-        ResponseBean helpActivityList = taHelpActivityService.helpActivityEffectiveList(pageNum, pageSize, cityId, orgId);
148
+        ResponseBean helpActivityList = taHelpActivityService.helpActivityEffectiveList(pageNum, pageSize, cityId, orgId, buildingId);
148 149
         return helpActivityList;
149 150
     }
150 151
 

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

@@ -54,5 +54,5 @@ public interface HelpActivityMapper extends BaseMapper<HelpActivity> {
54 54
      * @param orgId
55 55
      * @return
56 56
      */
57
-    IPage<HelpActivity> helpActivityListEffectivePage(IPage<HelpActivity> pg, Integer cityId, Integer orgId);
57
+    IPage<HelpActivity> helpActivityListEffectivePage(IPage<HelpActivity> pg, Integer cityId, Integer orgId, String buildingId);
58 58
 }

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

@@ -145,5 +145,5 @@ public interface IHelpActivityService extends IService<HelpActivity> {
145 145
      * @param orgId
146 146
      * @return
147 147
      */
148
-    ResponseBean helpActivityEffectiveList(Integer pageNum, Integer pageSize, Integer cityId, Integer orgId);
148
+    ResponseBean helpActivityEffectiveList(Integer pageNum, Integer pageSize, Integer cityId, Integer orgId, String buildingId);
149 149
 }

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

@@ -221,10 +221,10 @@ public class HelpActivityServiceImpl extends ServiceImpl<HelpActivityMapper, Hel
221 221
     }
222 222
 
223 223
     @Override
224
-    public ResponseBean helpActivityEffectiveList(Integer pageNum, Integer pageSize, Integer cityId, Integer orgId) {
224
+    public ResponseBean helpActivityEffectiveList(Integer pageNum, Integer pageSize, Integer cityId, Integer orgId, String buildingId) {
225 225
         ResponseBean responseBean = new ResponseBean<>();
226 226
         IPage<HelpActivity> pg = new Page<>(pageNum, pageSize);
227
-        IPage<HelpActivity> result = taHelpActivityMapper.helpActivityListEffectivePage(pg, cityId, orgId);
227
+        IPage<HelpActivity> result = taHelpActivityMapper.helpActivityListEffectivePage(pg, cityId, orgId, buildingId);
228 228
         responseBean.addSuccess(result);
229 229
         return responseBean;
230 230
     }

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

@@ -98,6 +98,7 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
98 98
                 queryWrapper.eq("building_id", taBuilding.getBuildingId());
99 99
                 queryWrapper.eq("img_type", "banner");
100 100
                 queryWrapper.orderByAsc("create_date");
101
+
101 102
                 List<TaBuildingImg> buildingImg = taBuildingImgMapper.selectList(queryWrapper);
102 103
                 taBuilding.setBuildingImg(buildingImg);
103 104
             }
@@ -322,9 +323,6 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
322 323
         String imgStr = object.getString("img");
323 324
         List<TaBuildingImg> buildingImgs = JSONObject.parseArray(imgStr, TaBuildingImg.class);
324 325
 
325
-//        building.setOpeningDate(DateUtils.date2LocalDateTime(object.getDate("openingDate")));
326
-//        building.setCreateDate(LocalDateTime.now());
327
-//        building.setStatus(0);
328 326
         if (CollectionUtils.isNotEmpty(buildingImgs)) {
329 327
             insertImgBatch(buildingImgs, building.getBuildingId());
330 328
         }

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

@@ -111,6 +111,9 @@
111 111
             <if test="cityId != null and cityId != ''">
112 112
                 and ha.city_id = #{cityId}
113 113
             </if>
114
+            <if test="buildingId != null">
115
+                and building_id = #{buildingId}
116
+            </if>
114 117
             and ha.org_id=#{orgId}
115 118
             and ha.activity_status in (0, 1)
116 119
         </where>

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

@@ -4,7 +4,7 @@
4 4
     <select id="buildingList" resultType="com.huiju.estateagents.entity.TaBuilding">
5 5
         SELECT * FROM ta_building
6 6
         <where>
7
-            status > -1
7
+            status > 0
8 8
             <if test="Name != null and Name != ''">
9 9
                 and  (ta_building.name like concat('%',#{Name,jdbcType=VARCHAR},'%') or ta_building.building_name like concat('%',#{Name,jdbcType=VARCHAR},'%'))
10 10
             </if>
@@ -30,7 +30,7 @@
30 30
                 and  ta_building.org_id = #{orgId}
31 31
             </if>
32 32
         </where>
33
-        ORDER BY create_date DESC
33
+        ORDER BY status ASC, create_date DESC
34 34
     </select>
35 35
 
36 36
     <select id="buildingListSelect" resultType="com.huiju.estateagents.entity.TaBuilding">

+ 5
- 5
src/main/resources/mapper/TaPersonMapper.xml 查看文件

@@ -418,7 +418,7 @@ FROM
418 418
         FROM
419 419
         (
420 420
             SELECT
421
-            DATE_FORMAT( DATE_SUB( now( ), INTERVAL a.rownum DAY ), '%Y-%m-%d' ) AS date,
421
+            DATE_FORMAT( DATE_SUB( <if test="endDate != null">#{endDate}</if><if test="endDate == null">now()</if>, INTERVAL a.rownum DAY ), '%Y-%m-%d' ) AS date,
422 422
             tempf.from_name as from_name,
423 423
             tempf.from_code as from_code
424 424
             FROM
@@ -438,7 +438,7 @@ FROM
438 438
         (
439 439
             SELECT
440 440
                 ifnull(COUNT(1), 0) as count,
441
-                tps.create_date as create_date,
441
+                DATE_FORMAT( tps.create_date, '%Y-%m-%d' ) as create_date,
442 442
                 tpfs.from_code as from_code,
443 443
                 tpfs.from_name as from_name
444 444
             FROM ta_person tps
@@ -449,14 +449,14 @@ FROM
449 449
             and tps.person_type IN ('customer','drift','estate agent')
450 450
             AND tps.create_date BETWEEN #{startDate} AND #{endDate}
451 451
 
452
-            GROUP BY tpfs.from_code
452
+            GROUP BY tpfs.from_code, DATE_FORMAT( tps.create_date, '%Y-%m-%d' )
453 453
         ) as user_count
454 454
         ON DATE_FORMAT(user_count.create_date,'%Y-%m-%d') =  temp_date.date and temp_date.from_code = user_count.from_code
455 455
         LEFT JOIN
456 456
         (
457 457
             SELECT
458 458
                 ifnull(COUNT(1), 0) as count,
459
-                tps.create_date as create_date,
459
+                DATE_FORMAT( tps.create_date, '%Y-%m-%d' ) as create_date,
460 460
                 tpfs.from_code as from_code,
461 461
                 tpfs.from_name as from_name
462 462
             FROM ta_person tps
@@ -467,7 +467,7 @@ FROM
467 467
                 and tps.person_type IN ('customer','drift','estate agent')
468 468
                 AND tps.create_date BETWEEN #{startDate} AND #{endDate}
469 469
                 and tps.phone is not null
470
-            GROUP BY tpfs.from_code
470
+            GROUP BY tpfs.from_code,DATE_FORMAT( tps.create_date, '%Y-%m-%d' )
471 471
         ) as registered_count
472 472
         ON DATE_FORMAT(user_count.create_date,'%Y-%m-%d') =  temp_date.date and temp_date.from_code = registered_count.from_code
473 473
         order by temp_date.date DESC