瀏覽代碼

新需求

weichaochao 5 年之前
父節點
當前提交
ba6a2080d4

+ 6
- 3
src/main/java/com/huiju/estateagents/entity/TaLiveActivity.java 查看文件

@@ -1,5 +1,6 @@
1 1
 package com.huiju.estateagents.entity;
2 2
 
3
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
3 4
 import com.baomidou.mybatisplus.annotation.IdType;
4 5
 import com.baomidou.mybatisplus.annotation.TableField;
5 6
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -13,7 +14,7 @@ import java.util.List;
13 14
 
14 15
 /**
15 16
  * <p>
16
- *  
17
+ *
17 18
  * </p>
18 19
  *
19 20
  * @author jobob
@@ -45,11 +46,13 @@ public class TaLiveActivity implements Serializable {
45 46
     /**
46 47
      * 所属城市
47 48
      */
49
+    @TableField(strategy = FieldStrategy.IGNORED)
48 50
     private Integer cityId;
49 51
 
50 52
     /**
51 53
      * 所属楼盘
52 54
      */
55
+    @TableField(strategy = FieldStrategy.IGNORED)
53 56
     private String buildingId;
54 57
 
55 58
     /**
@@ -100,12 +103,12 @@ public class TaLiveActivity implements Serializable {
100 103
     /**
101 104
      * 直播开始时间
102 105
      */
103
-    private String liveStartDate;
106
+    private LocalDateTime liveStartDate;
104 107
 
105 108
     /**
106 109
      * 直播结束时间
107 110
      */
108
-    private String liveEndDate;
111
+    private LocalDateTime liveEndDate;
109 112
 
110 113
     /**
111 114
      * 创建时间

+ 6
- 0
src/main/java/com/huiju/estateagents/entity/TaShare.java 查看文件

@@ -102,4 +102,10 @@ public class TaShare implements Serializable {
102 102
      */
103 103
     @TableField(exist = false)
104 104
     private String shareContent;
105
+
106
+    /**
107
+     * 直播活动名称
108
+     */
109
+    @TableField(exist = false)
110
+    private String liveActivityTitle;
105 111
 }

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

@@ -81,6 +81,9 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
81 81
     @Autowired
82 82
     private TaShareActivityMapper taShareActivityMapper;
83 83
 
84
+    @Autowired
85
+    private TaLiveActivityMapper taLiveActivityMapper;
86
+
84 87
     @Autowired
85 88
     private TaExtendContentMapper taExtendContentMapper;
86 89
 
@@ -108,9 +111,6 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
108 111
     @Autowired
109 112
     private ITaSalesBatchService iTaSalesBatchService;
110 113
 
111
-    @Autowired
112
-    private TaLiveActivityMapper taLiveActivityMapper;
113
-
114 114
     @Override
115 115
     public ResponseBean buildingList(Integer pageNum, Integer pageSize, String name, String code, LocalDateTime startDate, String buildingStatus, String marketStatus, Integer cityId, Integer isMain, Integer orgId, List<TaPersonBuilding> taPersonBuildingList) {
116 116
         Page<TaBuilding> page = new Page<>();
@@ -437,6 +437,13 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
437 437
             taShareActivityQueryWrapper.eq("building_id", building.getBuildingId());
438 438
             taShareActivityMapper.update(taShareActivity, taShareActivityQueryWrapper);
439 439
 
440
+            //更新直播城市
441
+            TaLiveActivity taLiveActivity = new TaLiveActivity();
442
+            taLiveActivity.setCityId(building.getCityId());
443
+            QueryWrapper<TaLiveActivity> taLiveActivityQueryWrapper = new QueryWrapper<>();
444
+            taLiveActivityQueryWrapper.eq("building_id", building.getBuildingId());
445
+            taLiveActivityMapper.update(taLiveActivity, taLiveActivityQueryWrapper);
446
+
440 447
             //更新首页轮播、开屏广告、宣传位
441 448
             TaExtendContent taExtendContent = new TaExtendContent();
442 449
             taExtendContent.setCityId(building.getCityId());
@@ -618,6 +625,13 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
618 625
         building.setStatus(-1);
619 626
         taBuildingMapper.update(building, buildingIdQueryWrapper);
620 627
 
628
+        TaLiveActivity taLiveActivity = new TaLiveActivity();
629
+        QueryWrapper<TaLiveActivity> queryWrapper = new QueryWrapper<>();
630
+        queryWrapper.eq("building_id", id);
631
+        taLiveActivity.setStatus(0);
632
+        taLiveActivity.setCityId(null);
633
+        taLiveActivity.setBuildingId(null);
634
+        taLiveActivityMapper.update(taLiveActivity, queryWrapper);
621 635
         return ResponseBean.success("");
622 636
     }
623 637
 

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

@@ -208,7 +208,7 @@ public class TaShareServiceImpl extends ServiceImpl<TaShareMapper, TaShare> impl
208 208
         List<TaShare> list = taShareMapper.listLiveShare(page, orgId, personType, shareType, phone, liveActivityId);
209 209
         TaLiveActivity taLiveActivity = taLiveActivityMapper.selectById(liveActivityId);
210 210
         list.forEach(e -> {
211
-            e.setSalesBatchName(taLiveActivity.getLiveActivityTitle());
211
+            e.setLiveActivityTitle(taLiveActivity.getLiveActivityTitle());
212 212
         });
213 213
         page.setRecords(list);
214 214
         return ResponseBean.success(page);

+ 1
- 1
src/main/resources/mapper/TaLiveActivityMapper.xml 查看文件

@@ -30,7 +30,7 @@
30 30
          and t.status = #{status}
31 31
      </if>
32 32
      <if test="liveActivityTitle != null and liveActivityTitle != ''">
33
-         and t.liveActivityTitle like CONCAT('%', #{liveActivityTitle}, '%')
33
+         and t.live_Activity_Title like CONCAT('%', #{liveActivityTitle}, '%')
34 34
      </if>
35 35
      <if test="cityId != null and cityId != ''">
36 36
          and t.city_id = #{cityId}