Просмотр исходного кода

Merge branch 'develop' of http://git.ycjcjy.com/marketing/services into develop

张延森 3 лет назад
Родитель
Сommit
83952581c0
31 измененных файлов: 1045 добавлений и 30 удалений
  1. 28
    28
      src/main/java/com/yunzhi/marketing/config/CorsConfig.java
  2. 15
    0
      src/main/java/com/yunzhi/marketing/controller/TaPersonController.java
  3. 9
    0
      src/main/java/com/yunzhi/marketing/dto/PersonMarketingDTO.java
  4. 13
    0
      src/main/java/com/yunzhi/marketing/entity/TaBuilding.java
  5. 1
    1
      src/main/java/com/yunzhi/marketing/entity/TaBuildingApartment.java
  6. 2
    0
      src/main/java/com/yunzhi/marketing/po/LiveAndVideoVO.java
  7. 9
    0
      src/main/java/com/yunzhi/marketing/service/ITaPersonService.java
  8. 44
    0
      src/main/java/com/yunzhi/marketing/service/impl/TaBuildingServiceImpl.java
  9. 38
    0
      src/main/java/com/yunzhi/marketing/service/impl/TaPersonServiceImpl.java
  10. 175
    0
      src/main/java/com/yunzhi/marketing/xlk/controller/BuildingSpecialRoomController.java
  11. 70
    0
      src/main/java/com/yunzhi/marketing/xlk/controller/CurriculumController.java
  12. 23
    1
      src/main/java/com/yunzhi/marketing/xlk/controller/SearchHouseController.java
  13. 174
    0
      src/main/java/com/yunzhi/marketing/xlk/controller/TrendController.java
  14. 73
    0
      src/main/java/com/yunzhi/marketing/xlk/dto/BuildingSpecialRoomDTO.java
  15. 48
    0
      src/main/java/com/yunzhi/marketing/xlk/dto/TrendDTO.java
  16. 91
    0
      src/main/java/com/yunzhi/marketing/xlk/entity/BuildingSpecialRoom.java
  17. 66
    0
      src/main/java/com/yunzhi/marketing/xlk/entity/Trend.java
  18. 18
    0
      src/main/java/com/yunzhi/marketing/xlk/mapper/BuildingSpecialRoomMapper.java
  19. 3
    0
      src/main/java/com/yunzhi/marketing/xlk/mapper/CurriculumMapper.java
  20. 18
    0
      src/main/java/com/yunzhi/marketing/xlk/mapper/TrendMapper.java
  21. 16
    0
      src/main/java/com/yunzhi/marketing/xlk/service/IBuildingSpecialRoomService.java
  22. 11
    0
      src/main/java/com/yunzhi/marketing/xlk/service/ICurriculumService.java
  23. 16
    0
      src/main/java/com/yunzhi/marketing/xlk/service/ITrendService.java
  24. 20
    0
      src/main/java/com/yunzhi/marketing/xlk/service/impl/BuildingSpecialRoomServiceImpl.java
  25. 18
    0
      src/main/java/com/yunzhi/marketing/xlk/service/impl/CurriculumServiceImpl.java
  26. 20
    0
      src/main/java/com/yunzhi/marketing/xlk/service/impl/TrendServiceImpl.java
  27. 4
    0
      src/main/java/com/yunzhi/marketing/xlk/vo/SearchHouseVO.java
  28. 2
    0
      src/main/resources/mapper/TaLiveActivityMapper.xml
  29. 5
    0
      src/main/resources/mapper/xlk/BuildingSpecialRoomMapper.xml
  30. 10
    0
      src/main/resources/mapper/xlk/CurriculumMapper.xml
  31. 5
    0
      src/main/resources/mapper/xlk/TrendMapper.xml

+ 28
- 28
src/main/java/com/yunzhi/marketing/config/CorsConfig.java Просмотреть файл

@@ -1,28 +1,28 @@
1
-package com.yunzhi.marketing.config;
2
-
3
-import org.springframework.context.annotation.Bean;
4
-import org.springframework.context.annotation.Configuration;
5
-import org.springframework.web.cors.CorsConfiguration;
6
-import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
7
-import org.springframework.web.filter.CorsFilter;
8
-
9
-/**
10
- * 解决跨域问题
11
- */
12
-@Configuration
13
-public class CorsConfig {
14
-    private CorsConfiguration buildConfig() {
15
-        CorsConfiguration corsConfiguration = new CorsConfiguration();
16
-        corsConfiguration.addAllowedOrigin("*"); // 1 允许任何域名使用
17
-        corsConfiguration.addAllowedHeader("*"); // 2 允许任何头
18
-        corsConfiguration.addAllowedMethod("*"); // 3 允许任何方法(post、get等)
19
-        return corsConfiguration;
20
-    }
21
-
22
-    @Bean
23
-    public CorsFilter corsFilter() {
24
-        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
25
-        source.registerCorsConfiguration("/**", buildConfig()); // 4
26
-        return new CorsFilter(source);
27
-    }
28
-}
1
+//package com.yunzhi.marketing.config;
2
+//
3
+//import org.springframework.context.annotation.Bean;
4
+//import org.springframework.context.annotation.Configuration;
5
+//import org.springframework.web.cors.CorsConfiguration;
6
+//import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
7
+//import org.springframework.web.filter.CorsFilter;
8
+//
9
+///**
10
+// * 解决跨域问题
11
+// */
12
+//@Configuration
13
+//public class CorsConfig {
14
+//    private CorsConfiguration buildConfig() {
15
+//        CorsConfiguration corsConfiguration = new CorsConfiguration();
16
+//        corsConfiguration.addAllowedOrigin("*"); // 1 允许任何域名使用
17
+//        corsConfiguration.addAllowedHeader("*"); // 2 允许任何头
18
+//        corsConfiguration.addAllowedMethod("*"); // 3 允许任何方法(post、get等)
19
+//        return corsConfiguration;
20
+//    }
21
+//
22
+//    @Bean
23
+//    public CorsFilter corsFilter() {
24
+//        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
25
+//        source.registerCorsConfiguration("/**", buildConfig()); // 4
26
+//        return new CorsFilter(source);
27
+//    }
28
+//}

+ 15
- 0
src/main/java/com/yunzhi/marketing/controller/TaPersonController.java Просмотреть файл

@@ -12,6 +12,7 @@ import com.yunzhi.marketing.center.taUser.service.ITaUserService;
12 12
 import com.yunzhi.marketing.common.CommConstant;
13 13
 import com.yunzhi.marketing.common.SMSUtils;
14 14
 import com.yunzhi.marketing.common.StringUtils;
15
+import com.yunzhi.marketing.dto.PersonMarketingDTO;
15 16
 import com.yunzhi.marketing.entity.TaChannel;
16 17
 import com.yunzhi.marketing.entity.TaChannelPerson;
17 18
 import com.yunzhi.marketing.entity.TaPerson;
@@ -22,6 +23,8 @@ import com.yunzhi.marketing.service.TaChannelPersonService;
22 23
 import com.yunzhi.marketing.service.TaChannelService;
23 24
 import com.yunzhi.marketing.third.entity.TaThirdPartyMiniappConfig;
24 25
 import com.yunzhi.marketing.third.service.ITaThirdPartyMiniappConfigService;
26
+import io.swagger.annotations.Api;
27
+import io.swagger.annotations.ApiOperation;
25 28
 import org.springframework.beans.factory.annotation.Autowired;
26 29
 import org.springframework.web.bind.annotation.*;
27 30
 import org.springframework.web.client.RestTemplate;
@@ -43,6 +46,7 @@ import java.util.Map;
43 46
  */
44 47
 @RestController
45 48
 @RequestMapping("/api")
49
+@Api(value = "微信用户表", tags = "xlk-微信用户表")
46 50
 public class TaPersonController extends BaseController {
47 51
     @Autowired
48 52
     ITaPersonService taPersonService;
@@ -377,6 +381,17 @@ public class TaPersonController extends BaseController {
377 381
         return null;
378 382
     }
379 383
 
384
+    /**
385
+     * 成为驻场顾问
386
+     *
387
+     */
388
+    @ApiOperation(value = "wx-成为驻场顾问", notes = "admin-成为驻场顾问")
389
+    @PostMapping("/wx/marketing")
390
+    public ResponseBean marketing(@RequestBody PersonMarketingDTO marketingDTO, HttpServletRequest request) {
391
+        // 当前人员
392
+        String openid = getOpenId(request);
393
+        return taPersonService.marketing(marketingDTO,openid);
394
+    }
380 395
 
381 396
     /**
382 397
      *

+ 9
- 0
src/main/java/com/yunzhi/marketing/dto/PersonMarketingDTO.java Просмотреть файл

@@ -0,0 +1,9 @@
1
+package com.yunzhi.marketing.dto;
2
+
3
+import lombok.Data;
4
+
5
+@Data
6
+public class PersonMarketingDTO {
7
+
8
+    private String marketingCode;
9
+}

+ 13
- 0
src/main/java/com/yunzhi/marketing/entity/TaBuilding.java Просмотреть файл

@@ -10,6 +10,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
10 10
 import com.baomidou.mybatisplus.annotation.TableField;
11 11
 import com.baomidou.mybatisplus.annotation.TableId;
12 12
 import com.baomidou.mybatisplus.core.metadata.IPage;
13
+import com.yunzhi.marketing.xlk.entity.BuildingSpecialRoom;
14
+import com.yunzhi.marketing.xlk.entity.Trend;
13 15
 import lombok.Data;
14 16
 import lombok.EqualsAndHashCode;
15 17
 import lombok.experimental.Accessors;
@@ -365,6 +367,11 @@ public class TaBuilding implements Serializable {
365 367
     /** 供暖 */
366 368
     private String heatingSupply ;
367 369
 
370
+    /**
371
+     * 驻场code
372
+     */
373
+    private String marketingCode;
374
+
368 375
     /**
369 376
      * 项目亮点封面
370 377
      */
@@ -376,4 +383,10 @@ public class TaBuilding implements Serializable {
376 383
 
377 384
     @TableField(exist = false)
378 385
     private List<ExtendContent> extendContent;
386
+
387
+    @TableField(exist = false)
388
+    private List<BuildingSpecialRoom> specialRoomList;
389
+
390
+    @TableField(exist = false)
391
+    private List<Trend> trendList;
379 392
 }

+ 1
- 1
src/main/java/com/yunzhi/marketing/entity/TaBuildingApartment.java Просмотреть файл

@@ -65,7 +65,7 @@ public class TaBuildingApartment implements Serializable {
65 65
     /**
66 66
      * 销售状态
67 67
      */
68
-    private Integer marketStatus;
68
+    private String marketStatus;
69 69
 
70 70
     private Double insideArea;
71 71
 

+ 2
- 0
src/main/java/com/yunzhi/marketing/po/LiveAndVideoVO.java Просмотреть файл

@@ -20,4 +20,6 @@ public class LiveAndVideoVO {
20 20
     private String type;
21 21
 
22 22
     private String kind;
23
+
24
+    private String images;
23 25
 }

+ 9
- 0
src/main/java/com/yunzhi/marketing/service/ITaPersonService.java Просмотреть файл

@@ -4,6 +4,7 @@ import cn.binarywang.wx.miniapp.bean.WxMaUserInfo;
4 4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.yunzhi.marketing.base.ResponseBean;
6 6
 import com.yunzhi.marketing.center.taUser.entity.TaUser;
7
+import com.yunzhi.marketing.dto.PersonMarketingDTO;
7 8
 import com.yunzhi.marketing.entity.TaCustomerFrom;
8 9
 import com.yunzhi.marketing.entity.TaPerson;
9 10
 import com.baomidou.mybatisplus.extension.service.IService;
@@ -121,4 +122,12 @@ public interface ITaPersonService extends IService<TaPerson> {
121 122
                    TaCustomerFrom customerFrom) throws Exception;
122 123
 
123 124
     ResponseBean updateUserPhoto(String photoUrl, String openId);
125
+
126
+    /**
127
+     * 成为驻场顾问
128
+     * @param marketingDTO
129
+     * @param openid
130
+     * @return
131
+     */
132
+    ResponseBean marketing(PersonMarketingDTO marketingDTO, String openid);
124 133
 }

+ 44
- 0
src/main/java/com/yunzhi/marketing/service/impl/TaBuildingServiceImpl.java Просмотреть файл

@@ -2,6 +2,7 @@ package com.yunzhi.marketing.service.impl;
2 2
 
3 3
 import com.alibaba.fastjson.JSONArray;
4 4
 import com.alibaba.fastjson.JSONObject;
5
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
5 6
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
6 7
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
7 8
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -15,6 +16,10 @@ import com.yunzhi.marketing.common.StringUtils;
15 16
 import com.yunzhi.marketing.entity.*;
16 17
 import com.yunzhi.marketing.mapper.*;
17 18
 import com.yunzhi.marketing.service.*;
19
+import com.yunzhi.marketing.xlk.entity.BuildingSpecialRoom;
20
+import com.yunzhi.marketing.xlk.entity.Trend;
21
+import com.yunzhi.marketing.xlk.mapper.BuildingSpecialRoomMapper;
22
+import com.yunzhi.marketing.xlk.mapper.TrendMapper;
18 23
 import org.apache.commons.collections.CollectionUtils;
19 24
 import org.springframework.beans.factory.annotation.Autowired;
20 25
 import org.springframework.stereotype.Service;
@@ -126,6 +131,13 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
126 131
     @Autowired
127 132
     private IExtendContentService iExtendContentService;
128 133
 
134
+    @Autowired
135
+    private BuildingSpecialRoomMapper buildingSpecialRoomMapper;
136
+
137
+    @Autowired
138
+    private TrendMapper trendMapper;
139
+
140
+    private String MARKETING_CODE;
129 141
     @Override
130 142
     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) {
131 143
         Page<TaBuilding> page = new Page<>();
@@ -356,6 +368,19 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
356 368
         List<ExtendContent> taExtendContents = iExtendContentService.list(taExtendContentQueryWrapper);
357 369
         building.setExtendContent(taExtendContents);
358 370
 
371
+        // 添加楼盘特价房源
372
+        LambdaQueryWrapper<BuildingSpecialRoom> specialRoomLambdaQueryWrapper = new LambdaQueryWrapper<>();
373
+        specialRoomLambdaQueryWrapper.eq(BuildingSpecialRoom::getBuildingId,id);
374
+        specialRoomLambdaQueryWrapper.orderByDesc(BuildingSpecialRoom::getCreateDate);
375
+        List<BuildingSpecialRoom> buildingSpecialRooms = buildingSpecialRoomMapper.selectList(specialRoomLambdaQueryWrapper);
376
+        building.setSpecialRoomList(buildingSpecialRooms);
377
+
378
+        // 添加楼盘项目动态
379
+        LambdaQueryWrapper<Trend> lambdaQueryWrapper =new LambdaQueryWrapper<>();
380
+        lambdaQueryWrapper.eq(Trend::getBuildingId,id);
381
+        lambdaQueryWrapper.orderByDesc(Trend::getCreateDate);
382
+        List<Trend> trends = trendMapper.selectList(lambdaQueryWrapper);
383
+        building.setTrendList(trends);
359 384
 
360 385
         List<TaSalesBatch> resultSalesBatchList = new ArrayList<>();
361 386
         taSalesBatch.stream().forEach(record -> {
@@ -574,6 +599,9 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
574 599
         building.setStatus(2);
575 600
         building.setOrgId(orgId);
576 601
         building.setName(building.getBuildingName());
602
+        // 生成楼盘驻场码
603
+        getMyMarktingCode();
604
+        building.setMarketingCode(MARKETING_CODE);
577 605
         if (taBuildingMapper.insert(building) < 1) {
578 606
             return ResponseBean.error("添加项目楼栋失败", ResponseBean.ERROR_UNAVAILABLE);
579 607
         }
@@ -681,6 +709,22 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
681 709
         return ResponseBean.success("");
682 710
     }
683 711
 
712
+    /**
713
+     * 生成六位推荐码 重复重新生成
714
+     * @return
715
+     */
716
+    private void getMyMarktingCode() {
717
+        String code = String.valueOf((int) ((Math.random() * 9 + 1) * Math.pow(10, 5)));
718
+        // 查询这个code 在库里存不存在
719
+        LambdaQueryWrapper<TaBuilding> queryWrapper = new LambdaQueryWrapper<>();
720
+        queryWrapper.eq(TaBuilding::getMarketingCode,code);
721
+        List<TaBuilding> userInfos = taBuildingMapper.selectList(queryWrapper);
722
+        if (userInfos.size() > 0){
723
+            getMyMarktingCode();
724
+        }
725
+        MARKETING_CODE = code;
726
+    }
727
+
684 728
     @Override
685 729
     public ResponseBean buildingdelete(String id, Integer orgId) {
686 730
         TaBuilding building = new TaBuilding();

+ 38
- 0
src/main/java/com/yunzhi/marketing/service/impl/TaPersonServiceImpl.java Просмотреть файл

@@ -2,6 +2,7 @@ package com.yunzhi.marketing.service.impl;
2 2
 
3 3
 import cn.binarywang.wx.miniapp.bean.WxMaUserInfo;
4 4
 import com.alibaba.fastjson.JSONObject;
5
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
5 6
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
6 7
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
7 8
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -14,6 +15,7 @@ import com.yunzhi.marketing.common.CommConstant;
14 15
 import com.yunzhi.marketing.common.DateUtils;
15 16
 import com.yunzhi.marketing.common.MD5Utils;
16 17
 import com.yunzhi.marketing.common.StringUtils;
18
+import com.yunzhi.marketing.dto.PersonMarketingDTO;
17 19
 import com.yunzhi.marketing.event.EventBus;
18 20
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
19 21
 import com.yunzhi.marketing.entity.*;
@@ -1292,4 +1294,40 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
1292 1294
         responseBean.addSuccess("修改成功");
1293 1295
         return responseBean;
1294 1296
     }
1297
+
1298
+    /**
1299
+     * 成为驻场顾问
1300
+     *
1301
+     * @param marketingDTO
1302
+     * @param openid
1303
+     * @return
1304
+     */
1305
+    @Override
1306
+    public ResponseBean marketing(PersonMarketingDTO marketingDTO, String openid) {
1307
+        List<TaPerson> taPersons = getPersonsByOpenId(openid);
1308
+        if (null == taPersons || taPersons.size() != 1) {
1309
+            return ResponseBean.error("验证当前人员信息失败", ResponseBean.ERROR_UNAVAILABLE);
1310
+        }
1311
+
1312
+        TaPerson taPerson = taPersons.get(0);
1313
+
1314
+        // 校验marketingCode 是否正确
1315
+        LambdaQueryWrapper<TaBuilding> taBuildingLambdaQueryWrapper = new LambdaQueryWrapper<>();
1316
+        taBuildingLambdaQueryWrapper.eq(TaBuilding::getMarketingCode,marketingDTO.getMarketingCode());
1317
+        TaBuilding taBuilding = taBuildingMapper.selectOne(taBuildingLambdaQueryWrapper);
1318
+        if (null == taBuilding){
1319
+            return ResponseBean.error("不合法的驻场码", ResponseBean.ERROR_UNAVAILABLE);
1320
+        }
1321
+        // 成为驻场顾问并绑定楼盘
1322
+        taPerson.setPersonType("marketing");
1323
+        taPersonMapper.updateById(taPerson);
1324
+
1325
+        TaPersonBuilding taPersonBuilding = new TaPersonBuilding();
1326
+        taPersonBuilding.setBuildingId(taBuilding.getBuildingId());
1327
+        taPersonBuilding.setPersonId(taPerson.getPersonId());
1328
+        taPersonBuilding.setCreateDate(LocalDateTime.now());
1329
+        taPersonBuildingMapper.insert(taPersonBuilding);
1330
+
1331
+        return ResponseBean.success("绑定成功");
1332
+    }
1295 1333
 }

+ 175
- 0
src/main/java/com/yunzhi/marketing/xlk/controller/BuildingSpecialRoomController.java Просмотреть файл

@@ -0,0 +1,175 @@
1
+package com.yunzhi.marketing.xlk.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.yunzhi.marketing.base.BaseController;
7
+import com.yunzhi.marketing.base.ResponseBean;
8
+import com.yunzhi.marketing.xlk.dto.BuildingSpecialRoomDTO;
9
+import com.yunzhi.marketing.xlk.entity.BuildingSpecialRoom;
10
+import com.yunzhi.marketing.xlk.service.IBuildingSpecialRoomService;
11
+import io.swagger.annotations.Api;
12
+import io.swagger.annotations.ApiOperation;
13
+import org.slf4j.Logger;
14
+import org.slf4j.LoggerFactory;
15
+import org.springframework.beans.BeanUtils;
16
+import org.springframework.beans.factory.annotation.Autowired;
17
+import org.springframework.web.bind.annotation.PathVariable;
18
+import org.springframework.web.bind.annotation.RequestBody;
19
+import org.springframework.web.bind.annotation.RequestHeader;
20
+import org.springframework.web.bind.annotation.RequestMapping;
21
+import org.springframework.web.bind.annotation.RequestMethod;
22
+import org.springframework.web.bind.annotation.RequestParam;
23
+import org.springframework.web.bind.annotation.ResponseBody;
24
+import org.springframework.web.bind.annotation.RestController;
25
+
26
+import javax.servlet.http.HttpServletRequest;
27
+import java.time.LocalDateTime;
28
+
29
+/**
30
+ * <p>
31
+    * 特价房源表  前端控制器
32
+    * </p>
33
+ *
34
+ * @author jobob
35
+ * @since 2021-07-12
36
+ */
37
+@RestController
38
+@RequestMapping("/api")
39
+@Api(value = "特价房源表", tags = "xlk-特价房源表")
40
+public class BuildingSpecialRoomController extends BaseController {
41
+
42
+    private final Logger logger = LoggerFactory.getLogger(BuildingSpecialRoomController.class);
43
+
44
+    @Autowired
45
+    public IBuildingSpecialRoomService iBuildingSpecialRoomService;
46
+
47
+
48
+    /**
49
+     * 分页查询列表
50
+     * @param pageNum
51
+     * @param pageSize
52
+     * @return
53
+     */
54
+    @ApiOperation(value = "admin-查询特价房源列表", notes = "admin-查询特价房源列表")
55
+    @RequestMapping(value="/buildingSpecialRoom",method= RequestMethod.GET)
56
+    public ResponseBean buildingSpecialRoomList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
57
+                                                @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
58
+                                                @RequestParam(value ="buildingId") String buildingId,
59
+                                                @RequestHeader("authorization") String token, HttpServletRequest request){
60
+        ResponseBean responseBean = new ResponseBean();
61
+        try {
62
+            //使用分页插件
63
+		    IPage<BuildingSpecialRoom> pg = new Page<>(pageNum, pageSize);
64
+            LambdaQueryWrapper<BuildingSpecialRoom> queryWrapper = new LambdaQueryWrapper<>();
65
+            queryWrapper.eq(BuildingSpecialRoom::getOrgId,getOrgId(request));
66
+            queryWrapper.eq(BuildingSpecialRoom::getBuildingId,buildingId);
67
+            queryWrapper.orderByDesc(BuildingSpecialRoom::getCreateDate);
68
+
69
+            IPage<BuildingSpecialRoom> result = iBuildingSpecialRoomService.page(pg, queryWrapper);
70
+            responseBean.addSuccess(result);
71
+        }catch (Exception e){
72
+            e.printStackTrace();
73
+            logger.error("buildingSpecialRoomList -=- {}",e.toString());
74
+            responseBean.addError(e.getMessage());
75
+        }
76
+        return responseBean;
77
+    }
78
+
79
+    /**
80
+     * 保存对象
81
+     * @param buildingSpecialRoomDTO 实体对象
82
+     * @return
83
+     */
84
+    @ApiOperation(value = "admin-保存特价房源", notes = "admin-保存特价房源")
85
+    @RequestMapping(value="/buildingSpecialRoom",method= RequestMethod.POST)
86
+    public ResponseBean buildingSpecialRoomAdd(@RequestBody BuildingSpecialRoomDTO buildingSpecialRoomDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
87
+        ResponseBean responseBean = new ResponseBean();
88
+        try {
89
+            Integer orgId = getOrgId(request);
90
+            BuildingSpecialRoom buildingSpecialRoom = new BuildingSpecialRoom();
91
+            BeanUtils.copyProperties(buildingSpecialRoomDTO,buildingSpecialRoom);
92
+            buildingSpecialRoom.setOrgId(orgId);
93
+            buildingSpecialRoom.setCreateDate(LocalDateTime.now());
94
+            if (iBuildingSpecialRoomService.save(buildingSpecialRoom)){
95
+                responseBean.addSuccess(buildingSpecialRoom);
96
+            }else {
97
+                responseBean.addError("fail");
98
+            }
99
+        }catch (Exception e){
100
+            e.printStackTrace();
101
+            logger.error("buildingSpecialRoomAdd -=- {}",e.toString());
102
+            responseBean.addError(e.getMessage());
103
+        }
104
+        return responseBean;
105
+    }
106
+
107
+    /**
108
+     * 根据id删除对象
109
+     * @param id  实体ID
110
+     */
111
+    @ApiOperation(value = "admin-删除特价房源", notes = "admin-删除特价房源")
112
+    @ResponseBody
113
+    @RequestMapping(value="/buildingSpecialRoom/{id}", method= RequestMethod.DELETE)
114
+    public ResponseBean buildingSpecialRoomDelete(@PathVariable String id, @RequestHeader("authorization") String token, HttpServletRequest request){
115
+        ResponseBean responseBean = new ResponseBean();
116
+        try {
117
+            if(iBuildingSpecialRoomService.removeById(id)){
118
+                responseBean.addSuccess("success");
119
+            }else {
120
+                responseBean.addError("fail");
121
+            }
122
+        }catch (Exception e){
123
+            e.printStackTrace();
124
+            logger.error("buildingSpecialRoomDelete -=- {}",e.toString());
125
+            responseBean.addError(e.getMessage());
126
+        }
127
+        return responseBean;
128
+    }
129
+
130
+    /**
131
+     * 修改对象
132
+     * @param id  实体ID
133
+     * @param buildingSpecialRoomDTO 实体对象
134
+     * @return
135
+     */
136
+    @ApiOperation(value = "admin-修改特价房源", notes = "admin-修改特价房源")
137
+    @RequestMapping(value="/buildingSpecialRoom/{id}",method= RequestMethod.PUT)
138
+    public ResponseBean buildingSpecialRoomUpdate(@PathVariable String id,
139
+                                                  @RequestBody BuildingSpecialRoomDTO buildingSpecialRoomDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
140
+        ResponseBean responseBean = new ResponseBean();
141
+        try {
142
+            BuildingSpecialRoom buildingSpecialRoom = new BuildingSpecialRoom();
143
+            BeanUtils.copyProperties(buildingSpecialRoomDTO,buildingSpecialRoom);
144
+            buildingSpecialRoom.setSpecialRoomId(id);
145
+            if (iBuildingSpecialRoomService.updateById(buildingSpecialRoom)){
146
+                responseBean.addSuccess(buildingSpecialRoom);
147
+            }else {
148
+                responseBean.addError("fail");
149
+            }
150
+        }catch (Exception e){
151
+            e.printStackTrace();
152
+            logger.error("buildingSpecialRoomUpdate -=- {}",e.toString());
153
+            responseBean.addError(e.getMessage());
154
+        }
155
+        return responseBean;
156
+    }
157
+
158
+    /**
159
+     * 根据id查询对象
160
+     * @param id  实体ID
161
+     */
162
+    @ApiOperation(value = "admin-获取特价房源详情", notes = "admin-获取特价房源详情")
163
+    @RequestMapping(value="/buildingSpecialRoom/{id}",method= RequestMethod.GET)
164
+    public ResponseBean buildingSpecialRoomGet(@PathVariable String id, @RequestHeader("authorization") String token, HttpServletRequest request){
165
+        ResponseBean responseBean = new ResponseBean();
166
+        try {
167
+            responseBean.addSuccess(iBuildingSpecialRoomService.getById(id));
168
+        }catch (Exception e){
169
+            e.printStackTrace();
170
+            logger.error("buildingSpecialRoomDelete -=- {}",e.toString());
171
+            responseBean.addError(e.getMessage());
172
+        }
173
+        return responseBean;
174
+    }
175
+}

+ 70
- 0
src/main/java/com/yunzhi/marketing/xlk/controller/CurriculumController.java Просмотреть файл

@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7 7
 import com.yunzhi.marketing.base.BaseController;
8 8
 import com.yunzhi.marketing.base.ResponseBean;
9 9
 import com.yunzhi.marketing.common.StringUtils;
10
+import com.yunzhi.marketing.entity.TaPerson;
11
+import com.yunzhi.marketing.service.ITaPersonService;
10 12
 import com.yunzhi.marketing.xlk.dto.CurriculumDTO;
11 13
 import com.yunzhi.marketing.xlk.entity.Brand;
12 14
 import com.yunzhi.marketing.xlk.entity.Video;
@@ -29,6 +31,7 @@ import org.springframework.web.bind.annotation.RestController;
29 31
 
30 32
 import javax.servlet.http.HttpServletRequest;
31 33
 import java.time.LocalDateTime;
34
+import java.util.List;
32 35
 
33 36
 /**
34 37
  * <p>
@@ -48,6 +51,9 @@ public class CurriculumController extends BaseController {
48 51
     @Autowired
49 52
     public ICurriculumService iCurriculumService;
50 53
 
54
+    @Autowired
55
+    public ITaPersonService taPersonService;
56
+
51 57
 
52 58
     /**
53 59
      * 分页查询列表
@@ -183,4 +189,68 @@ public class CurriculumController extends BaseController {
183 189
         }
184 190
         return responseBean;
185 191
     }
192
+
193
+    /**
194
+     * 分页查询列表
195
+     * @param pageNum
196
+     * @param pageSize
197
+     * @return
198
+     */
199
+    @ApiOperation(value = "wx-查询课程表列表", notes = "wx-查询课程表列表")
200
+    @RequestMapping(value="/wx/curriculum",method= RequestMethod.GET)
201
+    public ResponseBean wxCurriculumList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
202
+                                       @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
203
+                                       @RequestParam(value ="name",required = false) String name,
204
+                                       @RequestParam(value ="roleId",required = false) Integer roleId,
205
+                                       @RequestHeader("authorization") String token, HttpServletRequest request){
206
+        ResponseBean responseBean = new ResponseBean();
207
+        try {
208
+            //使用分页插件
209
+            IPage<Curriculum> pg = new Page<>(pageNum, pageSize);
210
+            LambdaQueryWrapper<Curriculum> queryWrapper = new LambdaQueryWrapper<>();
211
+            queryWrapper.eq(Curriculum::getOrgId,getOrgId(request));
212
+            queryWrapper.eq(!StringUtils.isEmpty(name),Curriculum::getName,name);
213
+            queryWrapper.eq(null != roleId,Curriculum::getRoleId,roleId);
214
+            queryWrapper.orderByDesc(Curriculum::getWeight);
215
+            queryWrapper.orderByDesc(Curriculum::getCreatedTime);
216
+
217
+            IPage<Curriculum> result = iCurriculumService.page(pg, queryWrapper);
218
+            responseBean.addSuccess(result);
219
+        }catch (Exception e){
220
+            e.printStackTrace();
221
+            logger.error("curriculumList -=- {}",e.toString());
222
+            responseBean.addError(e.getMessage());
223
+        }
224
+        return responseBean;
225
+    }
226
+
227
+    /**
228
+     * 分页查询列表
229
+     * @param pageNum
230
+     * @param pageSize
231
+     * @return
232
+     */
233
+    @ApiOperation(value = "wx-查询我收藏的课程表列表", notes = "wx-查询我收藏的课程表列表")
234
+    @RequestMapping(value="/wx/curriculum/save",method= RequestMethod.GET)
235
+    public ResponseBean saveCurriculumList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
236
+                                         @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
237
+                                         @RequestHeader("authorization") String token, HttpServletRequest request){
238
+        ResponseBean responseBean = new ResponseBean();
239
+        try {
240
+
241
+            String openid = getOpenId(request);
242
+            List<TaPerson> persons = taPersonService.getPersonsByOpenId(openid);
243
+            if (null == persons || persons.size() == 0) {
244
+                return ResponseBean.error("当前账户信息异常, 清除缓存重试", ResponseBean.ERROR_UNAVAILABLE);
245
+            }
246
+            TaPerson person = persons.get(0);
247
+            IPage<Curriculum> result = iCurriculumService.selectMySaveList(pageNum,pageSize,person);
248
+            responseBean.addSuccess(result);
249
+        }catch (Exception e){
250
+            e.printStackTrace();
251
+            logger.error("curriculumList -=- {}",e.toString());
252
+            responseBean.addError(e.getMessage());
253
+        }
254
+        return responseBean;
255
+    }
186 256
 }

+ 23
- 1
src/main/java/com/yunzhi/marketing/xlk/controller/SearchHouseController.java Просмотреть файл

@@ -5,7 +5,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.yunzhi.marketing.base.BaseController;
7 7
 import com.yunzhi.marketing.base.ResponseBean;
8
+import com.yunzhi.marketing.common.StringUtils;
9
+import com.yunzhi.marketing.entity.TaBuilding;
8 10
 import com.yunzhi.marketing.entity.TaPerson;
11
+import com.yunzhi.marketing.service.ITaBuildingService;
9 12
 import com.yunzhi.marketing.service.ITaPersonService;
10 13
 import com.yunzhi.marketing.xlk.dto.SearchHouseDTO;
11 14
 import com.yunzhi.marketing.xlk.dto.SearchHouseReplayDTO;
@@ -53,6 +56,8 @@ public class SearchHouseController extends BaseController {
53 56
     @Autowired
54 57
     public ITaPersonService taPersonService;
55 58
 
59
+    @Autowired
60
+    private ITaBuildingService taBuildingService;
56 61
 
57 62
     /**
58 63
      * 分页查询列表
@@ -103,7 +108,24 @@ public class SearchHouseController extends BaseController {
103 108
             searchHouse.setOrgId(orgId);
104 109
             searchHouse.setCreatedTime(LocalDateTime.now());
105 110
             if (iSearchHouseService.save(searchHouse)){
106
-                responseBean.addSuccess(searchHouse);
111
+                SearchHouseVO searchHouseVO = new SearchHouseVO();
112
+                BeanUtils.copyProperties(searchHouse,searchHouseVO);
113
+                // 获取价格相近的楼盘
114
+                LambdaQueryWrapper<TaBuilding> lambdaQueryWrapper = new LambdaQueryWrapper<>();
115
+                lambdaQueryWrapper.eq(!StringUtils.isEmpty(searchHouseDTO.getIntentArea()),TaBuilding::getBuildingArea,searchHouseDTO.getIntentArea());
116
+                lambdaQueryWrapper.between(TaBuilding::getPrice,searchHouseDTO.getMinPrice(),searchHouseDTO.getMaxPrice());
117
+                lambdaQueryWrapper.ne(TaBuilding::getStatus,-1);
118
+                lambdaQueryWrapper.last(" limit 2");
119
+                List<TaBuilding> list = taBuildingService.list(lambdaQueryWrapper);
120
+                if (list.size() < 1){
121
+                    lambdaQueryWrapper = new LambdaQueryWrapper<>();
122
+                    lambdaQueryWrapper.eq(!StringUtils.isEmpty(searchHouseDTO.getIntentArea()),TaBuilding::getBuildingArea,searchHouseDTO.getIntentArea());
123
+                    lambdaQueryWrapper.ne(TaBuilding::getStatus,-1);
124
+                    lambdaQueryWrapper.last(" limit 2");
125
+                    list = taBuildingService.list(lambdaQueryWrapper);
126
+                }
127
+                searchHouseVO.setTaBuildingList(list);
128
+                responseBean.addSuccess(searchHouseVO);
107 129
             }else {
108 130
                 responseBean.addError("fail");
109 131
             }

+ 174
- 0
src/main/java/com/yunzhi/marketing/xlk/controller/TrendController.java Просмотреть файл

@@ -0,0 +1,174 @@
1
+package com.yunzhi.marketing.xlk.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.yunzhi.marketing.base.BaseController;
7
+import com.yunzhi.marketing.base.ResponseBean;
8
+import com.yunzhi.marketing.xlk.dto.TrendDTO;
9
+import com.yunzhi.marketing.xlk.entity.Trend;
10
+import com.yunzhi.marketing.xlk.service.ITrendService;
11
+import io.swagger.annotations.Api;
12
+import io.swagger.annotations.ApiOperation;
13
+import org.slf4j.Logger;
14
+import org.slf4j.LoggerFactory;
15
+import org.springframework.beans.BeanUtils;
16
+import org.springframework.beans.factory.annotation.Autowired;
17
+import org.springframework.web.bind.annotation.PathVariable;
18
+import org.springframework.web.bind.annotation.RequestBody;
19
+import org.springframework.web.bind.annotation.RequestHeader;
20
+import org.springframework.web.bind.annotation.RequestMapping;
21
+import org.springframework.web.bind.annotation.RequestMethod;
22
+import org.springframework.web.bind.annotation.RequestParam;
23
+import org.springframework.web.bind.annotation.ResponseBody;
24
+import org.springframework.web.bind.annotation.RestController;
25
+
26
+import javax.servlet.http.HttpServletRequest;
27
+import java.time.LocalDateTime;
28
+
29
+/**
30
+ * <p>
31
+    * 项目动态表  前端控制器
32
+    * </p>
33
+ *
34
+ * @author jobob
35
+ * @since 2021-07-12
36
+ */
37
+@RestController
38
+@RequestMapping("/api")
39
+@Api(value = "项目动态表", tags = "xlk-项目动态表")
40
+public class TrendController extends BaseController {
41
+
42
+    private final Logger logger = LoggerFactory.getLogger(TrendController.class);
43
+
44
+    @Autowired
45
+    public ITrendService iTrendService;
46
+
47
+
48
+    /**
49
+     * 分页查询列表
50
+     * @param pageNum
51
+     * @param pageSize
52
+     * @return
53
+     */
54
+    @ApiOperation(value = "admin-查询项目动态列表", notes = "admin-查询项目动态列表")
55
+    @RequestMapping(value="/trend",method= RequestMethod.GET)
56
+    public ResponseBean trendList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
57
+                                  @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
58
+                                  @RequestParam(value ="buildingId") String buildingId,
59
+                                  @RequestHeader("authorization") String token, HttpServletRequest request){
60
+        ResponseBean responseBean = new ResponseBean();
61
+        try {
62
+            //使用分页插件
63
+		    IPage<Trend> pg = new Page<>(pageNum, pageSize);
64
+            LambdaQueryWrapper<Trend> queryWrapper = new LambdaQueryWrapper<>();
65
+            queryWrapper.eq(Trend::getOrgId,getOrgId(request));
66
+            queryWrapper.eq(Trend::getBuildingId,buildingId);
67
+            queryWrapper.orderByDesc(Trend::getCreateDate);
68
+
69
+            IPage<Trend> result = iTrendService.page(pg, queryWrapper);
70
+            responseBean.addSuccess(result);
71
+        }catch (Exception e){
72
+            e.printStackTrace();
73
+            logger.error("trendList -=- {}",e.toString());
74
+            responseBean.addError(e.getMessage());
75
+        }
76
+        return responseBean;
77
+    }
78
+
79
+    /**
80
+     * 保存对象
81
+     * @param trendDTO 实体对象
82
+     * @return
83
+     */
84
+    @ApiOperation(value = "admin-保存项目动态表", notes = "admin-保存项目动态表")
85
+    @RequestMapping(value="/trend",method= RequestMethod.POST)
86
+    public ResponseBean trendAdd(@RequestBody TrendDTO trendDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
87
+        ResponseBean responseBean = new ResponseBean();
88
+        try {
89
+            Trend trend = new Trend();
90
+            BeanUtils.copyProperties(trendDTO,trend);
91
+            trend.setOrgId(getOrgId(request));
92
+            trend.setCreateDate(LocalDateTime.now());
93
+            if (iTrendService.save(trend)){
94
+                responseBean.addSuccess(trend);
95
+            }else {
96
+                responseBean.addError("fail");
97
+            }
98
+        }catch (Exception e){
99
+            e.printStackTrace();
100
+            logger.error("trendAdd -=- {}",e.toString());
101
+            responseBean.addError(e.getMessage());
102
+        }
103
+        return responseBean;
104
+    }
105
+
106
+    /**
107
+     * 根据id删除对象
108
+     * @param id  实体ID
109
+     */
110
+    @ApiOperation(value = "admin-删除项目动态", notes = "admin-删除项目动态")
111
+    @ResponseBody
112
+    @RequestMapping(value="/trend/{id}", method= RequestMethod.DELETE)
113
+    public ResponseBean trendDelete(@PathVariable String id, @RequestHeader("authorization") String token, HttpServletRequest request){
114
+        ResponseBean responseBean = new ResponseBean();
115
+        try {
116
+            if(iTrendService.removeById(id)){
117
+                responseBean.addSuccess("success");
118
+            }else {
119
+                responseBean.addError("fail");
120
+            }
121
+        }catch (Exception e){
122
+            e.printStackTrace();
123
+            logger.error("trendDelete -=- {}",e.toString());
124
+            responseBean.addError(e.getMessage());
125
+        }
126
+        return responseBean;
127
+    }
128
+
129
+    /**
130
+     * 修改对象
131
+     * @param id  实体ID
132
+     * @param trendDTO 实体对象
133
+     * @return
134
+     */
135
+    @ApiOperation(value = "admin-修改项目动态", notes = "admin-修改项目动态")
136
+    @RequestMapping(value="/trend/{id}",method= RequestMethod.PUT)
137
+    public ResponseBean trendUpdate(@PathVariable String id,
138
+                                    @RequestBody TrendDTO trendDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
139
+        ResponseBean responseBean = new ResponseBean();
140
+        try {
141
+            Trend trend = new Trend();
142
+            BeanUtils.copyProperties(trendDTO,trend);
143
+            trend.setTrendId(id);
144
+            if (iTrendService.updateById(trend)){
145
+                responseBean.addSuccess(trend);
146
+            }else {
147
+                responseBean.addError("fail");
148
+            }
149
+        }catch (Exception e){
150
+            e.printStackTrace();
151
+            logger.error("trendUpdate -=- {}",e.toString());
152
+            responseBean.addError(e.getMessage());
153
+        }
154
+        return responseBean;
155
+    }
156
+
157
+    /**
158
+     * 根据id查询对象
159
+     * @param id  实体ID
160
+     */
161
+    @ApiOperation(value = "admin-查询项目动态详情", notes = "admin-查询项目动态详情")
162
+    @RequestMapping(value="/trend/{id}",method= RequestMethod.GET)
163
+    public ResponseBean trendGet(@PathVariable String id, @RequestHeader("authorization") String token, HttpServletRequest request){
164
+        ResponseBean responseBean = new ResponseBean();
165
+        try {
166
+            responseBean.addSuccess(iTrendService.getById(id));
167
+        }catch (Exception e){
168
+            e.printStackTrace();
169
+            logger.error("trendDelete -=- {}",e.toString());
170
+            responseBean.addError(e.getMessage());
171
+        }
172
+        return responseBean;
173
+    }
174
+}

+ 73
- 0
src/main/java/com/yunzhi/marketing/xlk/dto/BuildingSpecialRoomDTO.java Просмотреть файл

@@ -0,0 +1,73 @@
1
+package com.yunzhi.marketing.xlk.dto;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import com.baomidou.mybatisplus.annotation.TableName;
6
+import lombok.Data;
7
+import lombok.EqualsAndHashCode;
8
+import lombok.experimental.Accessors;
9
+
10
+import java.io.Serializable;
11
+import java.time.LocalDateTime;
12
+
13
+/**
14
+ * <p>
15
+ * 特价房源表 
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2021-07-12
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@TableName("xlk_building_special_room")
25
+public class BuildingSpecialRoomDTO implements Serializable {
26
+
27
+    /**
28
+     * 房源名称
29
+     */
30
+    private String roomName;
31
+
32
+    /**
33
+     * 户型
34
+     */
35
+    private String unitType;
36
+
37
+    /**
38
+     * 面积
39
+     */
40
+    private String area;
41
+
42
+    /**
43
+     * 开始时间
44
+     */
45
+    private LocalDateTime startTime;
46
+
47
+    /**
48
+     * 结束时间
49
+     */
50
+    private LocalDateTime endTime;
51
+
52
+    /**
53
+     * 原始价格
54
+     */
55
+    private String originalPrice;
56
+
57
+    /**
58
+     * 现价格
59
+     */
60
+    private String currentPrice;
61
+
62
+    /**
63
+     * 节省价格
64
+     */
65
+    private String thriftPrice;
66
+
67
+    /**
68
+     * 楼盘id
69
+     */
70
+    private String buildingId;
71
+
72
+
73
+}

+ 48
- 0
src/main/java/com/yunzhi/marketing/xlk/dto/TrendDTO.java Просмотреть файл

@@ -0,0 +1,48 @@
1
+package com.yunzhi.marketing.xlk.dto;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import com.baomidou.mybatisplus.annotation.TableName;
6
+import lombok.Data;
7
+import lombok.EqualsAndHashCode;
8
+import lombok.experimental.Accessors;
9
+
10
+import java.io.Serializable;
11
+import java.time.LocalDateTime;
12
+
13
+/**
14
+ * <p>
15
+ * 项目动态表 
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2021-07-12
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@TableName("xlk_trend")
25
+public class TrendDTO implements Serializable {
26
+
27
+    /**
28
+     * 动态时间
29
+     */
30
+    private LocalDateTime trendTime;
31
+
32
+    /**
33
+     * 动态标题
34
+     */
35
+    private String trendTitle;
36
+
37
+    /**
38
+     * 动态内容
39
+     */
40
+    private String trendContent;
41
+
42
+    /**
43
+     * 楼盘id
44
+     */
45
+    private String buildingId;
46
+
47
+
48
+}

+ 91
- 0
src/main/java/com/yunzhi/marketing/xlk/entity/BuildingSpecialRoom.java Просмотреть файл

@@ -0,0 +1,91 @@
1
+package com.yunzhi.marketing.xlk.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import com.baomidou.mybatisplus.annotation.TableName;
6
+import lombok.Data;
7
+import lombok.EqualsAndHashCode;
8
+import lombok.experimental.Accessors;
9
+
10
+import java.io.Serializable;
11
+import java.time.LocalDateTime;
12
+
13
+/**
14
+ * <p>
15
+ * 特价房源表 
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2021-07-12
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@TableName("xlk_building_special_room")
25
+public class BuildingSpecialRoom implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    /**
30
+     * 特价房源id
31
+     */
32
+    @TableId(type = IdType.UUID)
33
+    private String specialRoomId;
34
+
35
+    /**
36
+     * 房源名称
37
+     */
38
+    private String roomName;
39
+
40
+    /**
41
+     * 户型
42
+     */
43
+    private String unitType;
44
+
45
+    /**
46
+     * 面积
47
+     */
48
+    private String area;
49
+
50
+    /**
51
+     * 开始时间
52
+     */
53
+    private LocalDateTime startTime;
54
+
55
+    /**
56
+     * 结束时间
57
+     */
58
+    private LocalDateTime endTime;
59
+
60
+    /**
61
+     * 原始价格
62
+     */
63
+    private String originalPrice;
64
+
65
+    /**
66
+     * 现价格
67
+     */
68
+    private String currentPrice;
69
+
70
+    /**
71
+     * 节省价格
72
+     */
73
+    private String thriftPrice;
74
+
75
+    /**
76
+     * 创建时间
77
+     */
78
+    private LocalDateTime createDate;
79
+
80
+    /**
81
+     * 公司id
82
+     */
83
+    private Integer orgId;
84
+
85
+    /**
86
+     * 楼盘id
87
+     */
88
+    private String buildingId;
89
+
90
+
91
+}

+ 66
- 0
src/main/java/com/yunzhi/marketing/xlk/entity/Trend.java Просмотреть файл

@@ -0,0 +1,66 @@
1
+package com.yunzhi.marketing.xlk.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import com.baomidou.mybatisplus.annotation.TableName;
6
+import lombok.Data;
7
+import lombok.EqualsAndHashCode;
8
+import lombok.experimental.Accessors;
9
+
10
+import java.io.Serializable;
11
+import java.time.LocalDateTime;
12
+
13
+/**
14
+ * <p>
15
+ * 项目动态表 
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2021-07-12
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@TableName("xlk_trend")
25
+public class Trend implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    /**
30
+     * 动态id
31
+     */
32
+    @TableId(type = IdType.UUID)
33
+    private String trendId;
34
+
35
+    /**
36
+     * 动态时间
37
+     */
38
+    private LocalDateTime trendTime;
39
+
40
+    /**
41
+     * 动态标题
42
+     */
43
+    private String trendTitle;
44
+
45
+    /**
46
+     * 动态内容
47
+     */
48
+    private String trendContent;
49
+
50
+    /**
51
+     * 创建时间
52
+     */
53
+    private LocalDateTime createDate;
54
+
55
+    /**
56
+     * 公司id
57
+     */
58
+    private Integer orgId;
59
+
60
+    /**
61
+     * 楼盘id
62
+     */
63
+    private String buildingId;
64
+
65
+
66
+}

+ 18
- 0
src/main/java/com/yunzhi/marketing/xlk/mapper/BuildingSpecialRoomMapper.java Просмотреть файл

@@ -0,0 +1,18 @@
1
+package com.yunzhi.marketing.xlk.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.yunzhi.marketing.xlk.entity.BuildingSpecialRoom;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 特价房源表  Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2021-07-12
14
+ */
15
+@Mapper
16
+public interface BuildingSpecialRoomMapper extends BaseMapper<BuildingSpecialRoom> {
17
+
18
+}

+ 3
- 0
src/main/java/com/yunzhi/marketing/xlk/mapper/CurriculumMapper.java Просмотреть файл

@@ -1,8 +1,10 @@
1 1
 package com.yunzhi.marketing.xlk.mapper;
2 2
 
3
+import com.baomidou.mybatisplus.core.metadata.IPage;
3 4
 import com.yunzhi.marketing.xlk.entity.Curriculum;
4 5
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 6
 import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
6 8
 
7 9
 /**
8 10
  * <p>
@@ -15,4 +17,5 @@ import org.apache.ibatis.annotations.Mapper;
15 17
 @Mapper
16 18
 public interface CurriculumMapper extends BaseMapper<Curriculum> {
17 19
 
20
+    IPage<Curriculum> selectMySaveList(IPage<Curriculum> pg,@Param("personId") String personId);
18 21
 }

+ 18
- 0
src/main/java/com/yunzhi/marketing/xlk/mapper/TrendMapper.java Просмотреть файл

@@ -0,0 +1,18 @@
1
+package com.yunzhi.marketing.xlk.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.yunzhi.marketing.xlk.entity.Trend;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 项目动态表  Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2021-07-12
14
+ */
15
+@Mapper
16
+public interface TrendMapper extends BaseMapper<Trend> {
17
+
18
+}

+ 16
- 0
src/main/java/com/yunzhi/marketing/xlk/service/IBuildingSpecialRoomService.java Просмотреть файл

@@ -0,0 +1,16 @@
1
+package com.yunzhi.marketing.xlk.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.yunzhi.marketing.xlk.entity.BuildingSpecialRoom;
5
+
6
+/**
7
+ * <p>
8
+ * 特价房源表  服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2021-07-12
13
+ */
14
+public interface IBuildingSpecialRoomService extends IService<BuildingSpecialRoom> {
15
+
16
+}

+ 11
- 0
src/main/java/com/yunzhi/marketing/xlk/service/ICurriculumService.java Просмотреть файл

@@ -1,5 +1,7 @@
1 1
 package com.yunzhi.marketing.xlk.service;
2 2
 
3
+import com.baomidou.mybatisplus.core.metadata.IPage;
4
+import com.yunzhi.marketing.entity.TaPerson;
3 5
 import com.yunzhi.marketing.xlk.entity.Curriculum;
4 6
 import com.baomidou.mybatisplus.extension.service.IService;
5 7
 
@@ -13,4 +15,13 @@ import com.baomidou.mybatisplus.extension.service.IService;
13 15
  */
14 16
 public interface ICurriculumService extends IService<Curriculum> {
15 17
 
18
+    /**
19
+     * 获取我的收藏列表
20
+     *
21
+     * @param pageNum
22
+     * @param pageSize
23
+     * @param person
24
+     * @return
25
+     */
26
+    IPage<Curriculum> selectMySaveList(Integer pageNum, Integer pageSize, TaPerson person);
16 27
 }

+ 16
- 0
src/main/java/com/yunzhi/marketing/xlk/service/ITrendService.java Просмотреть файл

@@ -0,0 +1,16 @@
1
+package com.yunzhi.marketing.xlk.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.yunzhi.marketing.xlk.entity.Trend;
5
+
6
+/**
7
+ * <p>
8
+ * 项目动态表  服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2021-07-12
13
+ */
14
+public interface ITrendService extends IService<Trend> {
15
+
16
+}

+ 20
- 0
src/main/java/com/yunzhi/marketing/xlk/service/impl/BuildingSpecialRoomServiceImpl.java Просмотреть файл

@@ -0,0 +1,20 @@
1
+package com.yunzhi.marketing.xlk.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.yunzhi.marketing.xlk.entity.BuildingSpecialRoom;
5
+import com.yunzhi.marketing.xlk.mapper.BuildingSpecialRoomMapper;
6
+import com.yunzhi.marketing.xlk.service.IBuildingSpecialRoomService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 特价房源表  服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2021-07-12
16
+ */
17
+@Service
18
+public class BuildingSpecialRoomServiceImpl extends ServiceImpl<BuildingSpecialRoomMapper, BuildingSpecialRoom> implements IBuildingSpecialRoomService {
19
+
20
+}

+ 18
- 0
src/main/java/com/yunzhi/marketing/xlk/service/impl/CurriculumServiceImpl.java Просмотреть файл

@@ -1,9 +1,13 @@
1 1
 package com.yunzhi.marketing.xlk.service.impl;
2 2
 
3
+import com.baomidou.mybatisplus.core.metadata.IPage;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
+import com.yunzhi.marketing.entity.TaPerson;
3 6
 import com.yunzhi.marketing.xlk.entity.Curriculum;
4 7
 import com.yunzhi.marketing.xlk.mapper.CurriculumMapper;
5 8
 import com.yunzhi.marketing.xlk.service.ICurriculumService;
6 9
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
10
+import com.yunzhi.marketing.xlk.vo.SearchHouseVO;
7 11
 import org.springframework.stereotype.Service;
8 12
 
9 13
 /**
@@ -17,4 +21,18 @@ import org.springframework.stereotype.Service;
17 21
 @Service
18 22
 public class CurriculumServiceImpl extends ServiceImpl<CurriculumMapper, Curriculum> implements ICurriculumService {
19 23
 
24
+    /**
25
+     * 获取我的收藏列表
26
+     *
27
+     * @param pageNum
28
+     * @param pageSize
29
+     * @param person
30
+     * @return
31
+     */
32
+    @Override
33
+    public IPage<Curriculum> selectMySaveList(Integer pageNum, Integer pageSize, TaPerson person) {
34
+        IPage<Curriculum> pg = new Page<>(pageNum, pageSize);
35
+        IPage<Curriculum> result = this.baseMapper.selectMySaveList(pg,person.getPersonId());
36
+        return result;
37
+    }
20 38
 }

+ 20
- 0
src/main/java/com/yunzhi/marketing/xlk/service/impl/TrendServiceImpl.java Просмотреть файл

@@ -0,0 +1,20 @@
1
+package com.yunzhi.marketing.xlk.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.yunzhi.marketing.xlk.entity.Trend;
5
+import com.yunzhi.marketing.xlk.mapper.TrendMapper;
6
+import com.yunzhi.marketing.xlk.service.ITrendService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 项目动态表  服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2021-07-12
16
+ */
17
+@Service
18
+public class TrendServiceImpl extends ServiceImpl<TrendMapper, Trend> implements ITrendService {
19
+
20
+}

+ 4
- 0
src/main/java/com/yunzhi/marketing/xlk/vo/SearchHouseVO.java Просмотреть файл

@@ -1,12 +1,14 @@
1 1
 package com.yunzhi.marketing.xlk.vo;
2 2
 
3 3
 import com.baomidou.mybatisplus.annotation.TableName;
4
+import com.yunzhi.marketing.entity.TaBuilding;
4 5
 import com.yunzhi.marketing.xlk.entity.SearchHouse;
5 6
 import lombok.Data;
6 7
 import lombok.EqualsAndHashCode;
7 8
 import lombok.experimental.Accessors;
8 9
 
9 10
 import java.io.Serializable;
11
+import java.util.List;
10 12
 
11 13
 /**
12 14
  * <p>
@@ -29,4 +31,6 @@ public class SearchHouseVO extends SearchHouse implements Serializable {
29 31
     private String phone;
30 32
 
31 33
     private String gender;
34
+
35
+    private List<TaBuilding> taBuildingList;
32 36
 }

+ 2
- 0
src/main/resources/mapper/TaLiveActivityMapper.xml Просмотреть файл

@@ -76,6 +76,7 @@
76 76
             t.live_activity_title AS title,
77 77
             t.live_start_date AS start_time,
78 78
             t.live_end_date AS end_time,
79
+            t.detail_img as images,
79 80
             a.building_name,
80 81
             b.NAME AS city_name,
81 82
             "live" as type
@@ -93,6 +94,7 @@
93 94
             t.NAME AS title,
94 95
             t.CREATED_TIME AS startTime,
95 96
             t.CREATED_TIME AS endTime,
97
+            t.vide_img as images,
96 98
             a.building_name,
97 99
             b.NAME AS city_name,
98 100
             "video" as type

+ 5
- 0
src/main/resources/mapper/xlk/BuildingSpecialRoomMapper.xml Просмотреть файл

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.yunzhi.marketing.xlk.mapper.BuildingSpecialRoomMapper">
4
+
5
+</mapper>

+ 10
- 0
src/main/resources/mapper/xlk/CurriculumMapper.xml Просмотреть файл

@@ -2,4 +2,14 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.yunzhi.marketing.xlk.mapper.CurriculumMapper">
4 4
 
5
+    <select id="selectMySaveList" resultType="com.yunzhi.marketing.xlk.entity.Curriculum">
6
+        SELECT
7
+        x.*
8
+        FROM
9
+        ta_save t
10
+        LEFT JOIN xlk_curriculum x ON t.save_id = x.curriculum_id
11
+        WHERE
12
+        t.saved_target = "curriculum"
13
+        AND t.person_id = #{personId}
14
+    </select>
5 15
 </mapper>

+ 5
- 0
src/main/resources/mapper/xlk/TrendMapper.xml Просмотреть файл

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.yunzhi.marketing.xlk.mapper.TrendMapper">
4
+
5
+</mapper>