瀏覽代碼

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

Your Name 3 年之前
父節點
當前提交
6b15d3c14e
共有 100 個檔案被更改,包括 4063 行新增60 行删除
  1. 0
    1
      pom.xml
  2. 38
    8
      src/main/java/com/yunzhi/marketing/base/BaseController.java
  3. 13
    0
      src/main/java/com/yunzhi/marketing/center/taUser/controller/TaUserController.java
  4. 10
    0
      src/main/java/com/yunzhi/marketing/center/taUser/entity/TaUser.java
  5. 13
    11
      src/main/java/com/yunzhi/marketing/center/taUser/service/impl/TaUserServiceImpl.java
  6. 10
    15
      src/main/java/com/yunzhi/marketing/common/JWTUtils.java
  7. 183
    0
      src/main/java/com/yunzhi/marketing/common/VideoThreadDownLoad.java
  8. 28
    0
      src/main/java/com/yunzhi/marketing/config/CorsConfig.java
  9. 19
    0
      src/main/java/com/yunzhi/marketing/config/WebMvcConfigurer.java
  10. 72
    4
      src/main/java/com/yunzhi/marketing/controller/CommonController.java
  11. 4
    1
      src/main/java/com/yunzhi/marketing/controller/MiniAppController.java
  12. 6
    6
      src/main/java/com/yunzhi/marketing/controller/TaChannelController.java
  13. 8
    2
      src/main/java/com/yunzhi/marketing/controller/TaLiveActivityController.java
  14. 15
    0
      src/main/java/com/yunzhi/marketing/controller/TaPersonController.java
  15. 9
    0
      src/main/java/com/yunzhi/marketing/dto/PersonMarketingDTO.java
  16. 5
    0
      src/main/java/com/yunzhi/marketing/entity/TaActivityDynamicEnlist.java
  17. 35
    0
      src/main/java/com/yunzhi/marketing/entity/TaBuilding.java
  18. 1
    1
      src/main/java/com/yunzhi/marketing/entity/TaBuildingApartment.java
  19. 5
    0
      src/main/java/com/yunzhi/marketing/entity/TaBuildingDynamic.java
  20. 5
    0
      src/main/java/com/yunzhi/marketing/entity/TaBuildingIntention.java
  21. 4
    0
      src/main/java/com/yunzhi/marketing/entity/TaBuildingPanorama.java
  22. 4
    0
      src/main/java/com/yunzhi/marketing/entity/TaBuildingReport.java
  23. 5
    0
      src/main/java/com/yunzhi/marketing/entity/TaChannel.java
  24. 5
    0
      src/main/java/com/yunzhi/marketing/entity/TaChat.java
  25. 5
    0
      src/main/java/com/yunzhi/marketing/entity/TaCheckin.java
  26. 4
    0
      src/main/java/com/yunzhi/marketing/entity/TaCustomerMessage.java
  27. 6
    0
      src/main/java/com/yunzhi/marketing/entity/TaExtendContent.java
  28. 5
    0
      src/main/java/com/yunzhi/marketing/entity/TaLiveActivity.java
  29. 5
    0
      src/main/java/com/yunzhi/marketing/entity/TaNews.java
  30. 5
    0
      src/main/java/com/yunzhi/marketing/entity/TaNewsType.java
  31. 1
    0
      src/main/java/com/yunzhi/marketing/entity/TaPerson.java
  32. 5
    0
      src/main/java/com/yunzhi/marketing/entity/TaPersonFromRecord.java
  33. 5
    0
      src/main/java/com/yunzhi/marketing/entity/TaPersonIntentionRecord.java
  34. 5
    0
      src/main/java/com/yunzhi/marketing/entity/TaPersonVisitRecord.java
  35. 2
    0
      src/main/java/com/yunzhi/marketing/entity/TaPolicy.java
  36. 5
    0
      src/main/java/com/yunzhi/marketing/entity/TaRecommendCustomer.java
  37. 4
    0
      src/main/java/com/yunzhi/marketing/entity/TaSave.java
  38. 5
    0
      src/main/java/com/yunzhi/marketing/entity/TaSharePersonFrom.java
  39. 4
    0
      src/main/java/com/yunzhi/marketing/entity/TdBuildingType.java
  40. 5
    0
      src/main/java/com/yunzhi/marketing/entity/TsActivityDaily.java
  41. 5
    0
      src/main/java/com/yunzhi/marketing/entity/TsConsultantKpi.java
  42. 4
    0
      src/main/java/com/yunzhi/marketing/excel/ActivityStatistics/TsChannelDaily.java
  43. 10
    9
      src/main/java/com/yunzhi/marketing/interceptor/AccessInterceptor.java
  44. 1
    1
      src/main/java/com/yunzhi/marketing/job/CustomerStatisticTimeJob.java
  45. 1
    1
      src/main/java/com/yunzhi/marketing/job/JudglActivityTimeJob.java
  46. 10
    0
      src/main/java/com/yunzhi/marketing/mapper/TaLiveActivityMapper.java
  47. 25
    0
      src/main/java/com/yunzhi/marketing/po/LiveAndVideoVO.java
  48. 16
    0
      src/main/java/com/yunzhi/marketing/service/ITaLiveActivityService.java
  49. 9
    0
      src/main/java/com/yunzhi/marketing/service/ITaPersonService.java
  50. 44
    0
      src/main/java/com/yunzhi/marketing/service/impl/TaBuildingServiceImpl.java
  51. 36
    0
      src/main/java/com/yunzhi/marketing/service/impl/TaLiveActivityServiceImpl.java
  52. 38
    0
      src/main/java/com/yunzhi/marketing/service/impl/TaPersonServiceImpl.java
  53. 5
    0
      src/main/java/com/yunzhi/marketing/statistic/entity/TaCustomerFollowUpRecord.java
  54. 199
    0
      src/main/java/com/yunzhi/marketing/xlk/controller/BrandController.java
  55. 177
    0
      src/main/java/com/yunzhi/marketing/xlk/controller/BuildingSpecialRoomController.java
  56. 256
    0
      src/main/java/com/yunzhi/marketing/xlk/controller/CurriculumController.java
  57. 126
    0
      src/main/java/com/yunzhi/marketing/xlk/controller/HousePropertyController.java
  58. 169
    0
      src/main/java/com/yunzhi/marketing/xlk/controller/InstitutionController.java
  59. 214
    0
      src/main/java/com/yunzhi/marketing/xlk/controller/SearchHouseController.java
  60. 166
    0
      src/main/java/com/yunzhi/marketing/xlk/controller/TaPolicyTypeController.java
  61. 174
    0
      src/main/java/com/yunzhi/marketing/xlk/controller/TrendController.java
  62. 229
    0
      src/main/java/com/yunzhi/marketing/xlk/controller/VideoController.java
  63. 45
    0
      src/main/java/com/yunzhi/marketing/xlk/dto/BrandDTO.java
  64. 73
    0
      src/main/java/com/yunzhi/marketing/xlk/dto/BuildingSpecialRoomDTO.java
  65. 72
    0
      src/main/java/com/yunzhi/marketing/xlk/dto/CurriculumDTO.java
  66. 38
    0
      src/main/java/com/yunzhi/marketing/xlk/dto/InstitutionDTO.java
  67. 69
    0
      src/main/java/com/yunzhi/marketing/xlk/dto/SearchHouseDTO.java
  68. 37
    0
      src/main/java/com/yunzhi/marketing/xlk/dto/SearchHouseReplayDTO.java
  69. 48
    0
      src/main/java/com/yunzhi/marketing/xlk/dto/TrendDTO.java
  70. 63
    0
      src/main/java/com/yunzhi/marketing/xlk/dto/VideoDTO.java
  71. 84
    0
      src/main/java/com/yunzhi/marketing/xlk/entity/Brand.java
  72. 91
    0
      src/main/java/com/yunzhi/marketing/xlk/entity/BuildingSpecialRoom.java
  73. 117
    0
      src/main/java/com/yunzhi/marketing/xlk/entity/Curriculum.java
  74. 42
    0
      src/main/java/com/yunzhi/marketing/xlk/entity/HouseProperty.java
  75. 62
    0
      src/main/java/com/yunzhi/marketing/xlk/entity/Institution.java
  76. 100
    0
      src/main/java/com/yunzhi/marketing/xlk/entity/SearchHouse.java
  77. 59
    0
      src/main/java/com/yunzhi/marketing/xlk/entity/TaPolicyType.java
  78. 66
    0
      src/main/java/com/yunzhi/marketing/xlk/entity/Trend.java
  79. 115
    0
      src/main/java/com/yunzhi/marketing/xlk/entity/Video.java
  80. 18
    0
      src/main/java/com/yunzhi/marketing/xlk/mapper/BrandMapper.java
  81. 18
    0
      src/main/java/com/yunzhi/marketing/xlk/mapper/BuildingSpecialRoomMapper.java
  82. 21
    0
      src/main/java/com/yunzhi/marketing/xlk/mapper/CurriculumMapper.java
  83. 18
    0
      src/main/java/com/yunzhi/marketing/xlk/mapper/HousePropertyMapper.java
  84. 18
    0
      src/main/java/com/yunzhi/marketing/xlk/mapper/InstitutionMapper.java
  85. 24
    0
      src/main/java/com/yunzhi/marketing/xlk/mapper/SearchHouseMapper.java
  86. 18
    0
      src/main/java/com/yunzhi/marketing/xlk/mapper/TaPolicyTypeMapper.java
  87. 18
    0
      src/main/java/com/yunzhi/marketing/xlk/mapper/TrendMapper.java
  88. 18
    0
      src/main/java/com/yunzhi/marketing/xlk/mapper/VideoMapper.java
  89. 16
    0
      src/main/java/com/yunzhi/marketing/xlk/service/IBrandService.java
  90. 16
    0
      src/main/java/com/yunzhi/marketing/xlk/service/IBuildingSpecialRoomService.java
  91. 27
    0
      src/main/java/com/yunzhi/marketing/xlk/service/ICurriculumService.java
  92. 16
    0
      src/main/java/com/yunzhi/marketing/xlk/service/IHousePropertyService.java
  93. 37
    0
      src/main/java/com/yunzhi/marketing/xlk/service/IInstitutionService.java
  94. 29
    0
      src/main/java/com/yunzhi/marketing/xlk/service/ISearchHouseService.java
  95. 16
    0
      src/main/java/com/yunzhi/marketing/xlk/service/ITaPolicyTypeService.java
  96. 16
    0
      src/main/java/com/yunzhi/marketing/xlk/service/ITrendService.java
  97. 16
    0
      src/main/java/com/yunzhi/marketing/xlk/service/IVideoService.java
  98. 20
    0
      src/main/java/com/yunzhi/marketing/xlk/service/impl/BrandServiceImpl.java
  99. 20
    0
      src/main/java/com/yunzhi/marketing/xlk/service/impl/BuildingSpecialRoomServiceImpl.java
  100. 0
    0
      src/main/java/com/yunzhi/marketing/xlk/service/impl/CurriculumServiceImpl.java

+ 0
- 1
pom.xml 查看文件

@@ -145,7 +145,6 @@
145 145
             <artifactId>spring-boot-starter-aop</artifactId>
146 146
         </dependency>
147 147
 
148
-
149 148
 		<dependency>
150 149
 			<groupId>fadada</groupId>
151 150
 			<artifactId>fadada_api_sdk</artifactId>

+ 38
- 8
src/main/java/com/yunzhi/marketing/base/BaseController.java 查看文件

@@ -1,17 +1,23 @@
1 1
 package com.yunzhi.marketing.base;
2 2
 
3
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
3 4
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 5
 import com.yunzhi.marketing.center.taUser.entity.TaUser;
5 6
 import com.yunzhi.marketing.center.taUser.service.ITaUserService;
6 7
 import com.yunzhi.marketing.common.JWTUtils;
8
+import com.yunzhi.marketing.entity.TaBuilding;
7 9
 import com.yunzhi.marketing.entity.TaPersonBuilding;
10
+import com.yunzhi.marketing.service.ITaBuildingService;
8 11
 import com.yunzhi.marketing.service.ITaPersonBuildingService;
12
+import com.yunzhi.marketing.xlk.entity.Institution;
13
+import com.yunzhi.marketing.xlk.service.IInstitutionService;
9 14
 import org.springframework.beans.factory.annotation.Autowired;
10 15
 
11 16
 import javax.servlet.http.HttpServletRequest;
12 17
 import java.util.ArrayList;
13 18
 import java.util.List;
14 19
 import java.util.Map;
20
+import java.util.stream.Collectors;
15 21
 
16 22
 /**
17 23
  * @author FXF
@@ -24,6 +30,12 @@ public class BaseController {
24 30
     @Autowired
25 31
     private ITaPersonBuildingService taPersonBuildingService;
26 32
 
33
+    @Autowired
34
+    private ITaBuildingService taBuildingService;
35
+
36
+    @Autowired
37
+    public IInstitutionService iInstitutionService;
38
+
27 39
     /**
28 40
      * 获取orgId
29 41
      *
@@ -32,12 +44,12 @@ public class BaseController {
32 44
      */
33 45
     public Integer getOrgId(HttpServletRequest request) {
34 46
 
35
-        Map map = JWTUtils.getUserIdAndOrgId(request);
36
-        if (null != map && null != map.get("orgId")) {
37
-            return Integer.valueOf(map.get("orgId").toString());
38
-        }
47
+//        Map map = JWTUtils.getUserIdAndOrgId(request);
48
+//        if (null != map && null != map.get("orgId")) {
49
+//            return Integer.valueOf(map.get("orgId").toString());
50
+//        }
39 51
 
40
-        return null;
52
+        return 1;
41 53
     }
42 54
 
43 55
     public Integer getChannelId(HttpServletRequest request) {
@@ -131,9 +143,27 @@ public class BaseController {
131 143
         if (taUser == null) {
132 144
             return null;
133 145
         }
134
-        QueryWrapper<TaPersonBuilding> taPersonBuildingQueryWrapper = new QueryWrapper<>();
135
-        taPersonBuildingQueryWrapper.eq("user_id", taUser.getUserId());
136
-        List<TaPersonBuilding> taPersonBuildingList = taPersonBuildingService.list(taPersonBuildingQueryWrapper);
146
+//        // 个人授权条件
147
+//        QueryWrapper<TaPersonBuilding> taPersonBuildingQueryWrapper = new QueryWrapper<>();
148
+//        taPersonBuildingQueryWrapper.eq("user_id", taUser.getUserId());
149
+//        List<TaPersonBuilding> taPersonBuildingList = taPersonBuildingService.list(taPersonBuildingQueryWrapper);
150
+        List<TaPersonBuilding> taPersonBuildingList = new ArrayList<>();
151
+        // 获取当前人员的所有有权访问的组织机构
152
+        Institution institution = iInstitutionService.getById(taUser.getInstitutionId());
153
+        LambdaQueryWrapper<Institution> institutionLambdaQueryWrapper = new LambdaQueryWrapper<>();
154
+        institutionLambdaQueryWrapper.likeRight(Institution::getInstitutionCode,institution.getInstitutionCode());
155
+        List<Institution> institutionList = iInstitutionService.list(institutionLambdaQueryWrapper);
156
+        // 新的过滤条件组织机构
157
+        LambdaQueryWrapper<TaBuilding> lambdaQueryWrapper = new LambdaQueryWrapper<>();
158
+        lambdaQueryWrapper.in(TaBuilding::getInstitutionId,institutionList.stream().map(Institution::getInstitutionId).collect(Collectors.toList()));
159
+        List<TaBuilding> list = taBuildingService.list(lambdaQueryWrapper);
160
+        for (TaBuilding taBuilding: list) {
161
+            TaPersonBuilding taPersonBuilding = new TaPersonBuilding();
162
+            taPersonBuilding.setBuildingId(taBuilding.getBuildingId());
163
+            taPersonBuilding.setUserId(taUser.getUserId());
164
+            taPersonBuildingList.add(taPersonBuilding);
165
+        }
166
+
137 167
         if (null != taUser.getIsAdmin() && taUser.getIsAdmin()) {
138 168
             taPersonBuildingList = new ArrayList<>();
139 169
         }

+ 13
- 0
src/main/java/com/yunzhi/marketing/center/taUser/controller/TaUserController.java 查看文件

@@ -16,9 +16,12 @@ import com.yunzhi.marketing.center.taUser.service.*;
16 16
 import com.yunzhi.marketing.common.CommConstant;
17 17
 import com.yunzhi.marketing.common.JWTUtils;
18 18
 import com.yunzhi.marketing.common.MD5Utils;
19
+import com.yunzhi.marketing.common.StringUtils;
19 20
 import com.yunzhi.marketing.mapper.TaRoleMapper;
20 21
 import com.yunzhi.marketing.entity.*;
21 22
 import com.yunzhi.marketing.service.*;
23
+import io.swagger.annotations.Api;
24
+import io.swagger.annotations.ApiOperation;
22 25
 import org.slf4j.Logger;
23 26
 import org.slf4j.LoggerFactory;
24 27
 import org.springframework.beans.factory.annotation.Autowired;
@@ -42,6 +45,7 @@ import java.util.Map;
42 45
  */
43 46
 @RestController
44 47
 @RequestMapping("/api")
48
+@Api(value = "用户登录相关", tags = "用户登录相关")
45 49
 public class TaUserController extends BaseController {
46 50
 
47 51
     private final Logger logger = LoggerFactory.getLogger(TaUserController.class);
@@ -328,6 +332,7 @@ public class TaUserController extends BaseController {
328 332
      * @return
329 333
      */
330 334
     @PostMapping("/admin/taUser/signin")
335
+    @ApiOperation(value = "admin端登录", notes = "admin端登录")
331 336
     public ResponseBean signin(@RequestBody String paramStr) {
332 337
         JSONObject params = JSONObject.parseObject(paramStr);
333 338
         if (params == null) {
@@ -407,9 +412,12 @@ public class TaUserController extends BaseController {
407 412
                                    @RequestParam(value ="isConsultant",required = false) Integer isConsultant,
408 413
                                    @RequestParam(value ="miniStatus",required = false) Integer miniStatus,
409 414
                                    @RequestParam(value ="buildingId",required = false) String buildingId,
415
+                                   @RequestParam(value ="jobNumber",required = false) String jobNumber,
410 416
                                    HttpServletRequest request){
411 417
         ResponseBean responseBean = new ResponseBean();
412 418
         try {
419
+            Integer userId = getUserId(request);
420
+            TaUser currentUser = iTaUserService.getById(userId);
413 421
             //使用分页插件
414 422
             IPage pg = new Page<>(pageNum, pageSize);
415 423
             TaUser taUser = new TaUser();
@@ -418,12 +426,14 @@ public class TaUserController extends BaseController {
418 426
             taUser.setPhone(phone);
419 427
             taUser.setStatus(status);
420 428
             taUser.setBuildingId(buildingId);
429
+            taUser.setInstitutionId(currentUser.getInstitutionId());
421 430
             if(null != isConsultant && isConsultant == 1){
422 431
                 taUser.setIsConsultant(true);
423 432
             }else if (null != isConsultant && isConsultant == 0){
424 433
                 taUser.setIsConsultant(false);
425 434
             }
426 435
             taUser.setMiniStatus(miniStatus);
436
+            taUser.setJobNumber(jobNumber);
427 437
 
428 438
             IPage<TaUser> result = iTaUserService.seleUserList(pg,taUser,getTaPersonBuildingListByUserId(request));
429 439
             List<TaUser> taUserList = result.getRecords();
@@ -512,6 +522,9 @@ public class TaUserController extends BaseController {
512 522
     public ResponseBean adminUserAdd(@RequestBody TaUser taUser,HttpServletRequest request){
513 523
         ResponseBean responseBean = new ResponseBean();
514 524
         try {
525
+            if (StringUtils.isEmpty(taUser.getInstitutionId())){
526
+                return ResponseBean.error("组织机构必填", ResponseBean.ERROR_ILLEGAL_PARAMS);
527
+            }
515 528
             taUser.setOrgId(getOrgId(request));
516 529
             responseBean.addSuccess(iTaUserService.addAdminUser(taUser));
517 530
         }catch (Exception e){

+ 10
- 0
src/main/java/com/yunzhi/marketing/center/taUser/entity/TaUser.java 查看文件

@@ -114,6 +114,16 @@ public class TaUser implements Serializable {
114 114
     private String photo;
115 115
     private String description;
116 116
 
117
+    /**
118
+     * 工号
119
+     */
120
+    private String jobNumber;
121
+
122
+    /**
123
+     * 组织机构编号
124
+     */
125
+    private String institutionId;
126
+
117 127
     /**
118 128
      * 权重
119 129
      */

+ 13
- 11
src/main/java/com/yunzhi/marketing/center/taUser/service/impl/TaUserServiceImpl.java 查看文件

@@ -482,18 +482,20 @@ public class TaUserServiceImpl extends ServiceImpl<TaUserMapper, TaUser> impleme
482 482
             taPersonBuilding.setUserId(taUser.getUserId());
483 483
             taPersonBuilding.setCreateDate(LocalDateTime.now());
484 484
             taPersonBuildingMapper.insert(taPersonBuilding);
485
-        } else {
486
-            //非置业顾问可授权多个项目
487
-            List<String> buildingIdList = taUser.getBuildingIds();
488
-            LocalDateTime nowTime = LocalDateTime.now();
489
-            buildingIdList.forEach(e -> {
490
-                TaPersonBuilding taPersonBuilding = new TaPersonBuilding();
491
-                taPersonBuilding.setBuildingId(e);
492
-                taPersonBuilding.setUserId(taUser.getUserId());
493
-                taPersonBuilding.setCreateDate(nowTime);
494
-                taPersonBuildingMapper.insert(taPersonBuilding);
495
-            });
496 485
         }
486
+//        // 这个版本取消非置业顾问授权
487
+//        else {
488
+//            //非置业顾问可授权多个项目
489
+//            List<String> buildingIdList = taUser.getBuildingIds();
490
+//            LocalDateTime nowTime = LocalDateTime.now();
491
+//            buildingIdList.forEach(e -> {
492
+//                TaPersonBuilding taPersonBuilding = new TaPersonBuilding();
493
+//                taPersonBuilding.setBuildingId(e);
494
+//                taPersonBuilding.setUserId(taUser.getUserId());
495
+//                taPersonBuilding.setCreateDate(nowTime);
496
+//                taPersonBuildingMapper.insert(taPersonBuilding);
497
+//            });
498
+//        }
497 499
 
498 500
         return taUser;
499 501
     }

+ 10
- 15
src/main/java/com/yunzhi/marketing/common/JWTUtils.java 查看文件

@@ -24,14 +24,11 @@ public class JWTUtils {
24 24
      * @return
25 25
      */
26 26
     public static String getSubject(HttpServletRequest request) {
27
-        String jwtHeader = request.getHeader("authorization");
28
-        if (null == jwtHeader || "".equals(jwtHeader.trim())) return null;
29
-
30
-        String[] jwtAuths = jwtHeader.split("Bearer ");
31
-        if (null == jwtAuths || jwtAuths.length < 2) return null;
27
+        String token = getToken(request);
28
+        if (StringUtils.isEmpty(token)) return null;
32 29
 
33 30
         try {
34
-            return Jwts.parser().setSigningKey(key).parseClaimsJws(jwtAuths[1]).getBody().getSubject();
31
+            return Jwts.parser().setSigningKey(key).parseClaimsJws(token).getBody().getSubject();
35 32
         } catch (Exception e) {
36 33
             e.printStackTrace();
37 34
         }
@@ -45,14 +42,11 @@ public class JWTUtils {
45 42
      * @return
46 43
      */
47 44
     public static Map getUserIdAndOrgId(HttpServletRequest request) {
48
-        String jwtHeader = request.getHeader("authorization");
49
-        if (null == jwtHeader || "".equals(jwtHeader.trim())) return null;
50
-        
51
-        String[] jwtAuths = jwtHeader.split("Bearer ");
52
-        if (null == jwtAuths || jwtAuths.length < 2) return null;
45
+        String token = getToken(request);
46
+        if (StringUtils.isEmpty(token)) return null;
53 47
         
54 48
         try {
55
-            return Jwts.parser().setSigningKey(key).parseClaimsJws(jwtAuths[1]).getBody();
49
+            return Jwts.parser().setSigningKey(key).parseClaimsJws(token).getBody();
56 50
         } catch (Exception e) {
57 51
             e.printStackTrace();
58 52
         }
@@ -70,13 +64,14 @@ public class JWTUtils {
70 64
         if (null == jwtHeader || "".equals(jwtHeader.trim())) {
71 65
             return null;
72 66
         }
73
-        
67
+
74 68
         String[] jwtAuths = jwtHeader.split("Bearer ");
75 69
         if (null == jwtAuths || jwtAuths.length < 2) {
76 70
             return null;
77 71
         }
78
-        
79
-        
72
+
73
+        if (StringUtils.isEmpty(jwtAuths[1])) return null;
74
+
80 75
         return jwtAuths[1];
81 76
     }
82 77
 

+ 183
- 0
src/main/java/com/yunzhi/marketing/common/VideoThreadDownLoad.java 查看文件

@@ -0,0 +1,183 @@
1
+package com.yunzhi.marketing.common;
2
+
3
+import org.slf4j.Logger;
4
+import org.slf4j.LoggerFactory;
5
+import org.springframework.web.multipart.MultipartFile;
6
+
7
+import java.io.File;
8
+import java.io.IOException;
9
+import java.io.InputStream;
10
+import java.io.RandomAccessFile;
11
+import java.net.HttpURLConnection;
12
+import java.net.URL;
13
+import java.util.concurrent.CountDownLatch;
14
+import java.util.concurrent.LinkedBlockingDeque;
15
+import java.util.concurrent.ThreadPoolExecutor;
16
+import java.util.concurrent.TimeUnit;
17
+import java.util.concurrent.locks.ReentrantLock;
18
+
19
+public class VideoThreadDownLoad {
20
+    public static final Logger LOG = LoggerFactory.getLogger(VideoThreadDownLoad.class);
21
+    /**
22
+     * 线程下载成功标志
23
+     */
24
+    private static int flag = 0;
25
+
26
+    /**
27
+     * 本地文件
28
+     */
29
+    private MultipartFile uploadFile;
30
+
31
+    /**
32
+     * 本地路径
33
+     */
34
+    private String localPath;
35
+
36
+    /**
37
+     * 线程计数同步辅助
38
+     */
39
+    private CountDownLatch latch;
40
+
41
+    private final int THREAD_POOL_CORE_SIZE= 10;
42
+    private final int THREAD_POOL_MAX_CORE_SIZE=30;
43
+    private final int THREAD_POOL_KEEP_ALIVE_TIME=60;
44
+
45
+    // 定长线程池
46
+    private ThreadPoolExecutor threadPool = new ThreadPoolExecutor(THREAD_POOL_CORE_SIZE,THREAD_POOL_MAX_CORE_SIZE,THREAD_POOL_KEEP_ALIVE_TIME, TimeUnit.SECONDS,new LinkedBlockingDeque<>());
47
+
48
+    public VideoThreadDownLoad(MultipartFile uploadFile, String localPath) {
49
+        this.uploadFile = uploadFile;
50
+        this.localPath = localPath;
51
+    }
52
+
53
+    public synchronized static void downLoad(MultipartFile uploadFile, String localPath) {
54
+        LOG.info("文件开始下载,下载位置为{}",localPath);
55
+        ReentrantLock lock = new ReentrantLock();
56
+        lock.lock();
57
+        VideoThreadDownLoad videoThreadDownLoad = new VideoThreadDownLoad(uploadFile,localPath);
58
+        long startTime = System.currentTimeMillis();
59
+        boolean flag = false;
60
+        try {
61
+            flag = videoThreadDownLoad.executeDownLoad();
62
+            long endTime = System.currentTimeMillis();
63
+            if (flag) {
64
+                LOG.info("文件下载成功,共耗时" + (endTime - startTime) / 1000 + "s");
65
+            }
66
+        } catch (Exception ex) {
67
+            LOG.error(ex.getMessage());
68
+        } finally {
69
+            VideoThreadDownLoad.flag = 0; // 重置 下载状态
70
+            if (!flag) {
71
+                LOG.info("文件下载失败,本地文件已经删除。");
72
+                File file = new File(localPath);
73
+                file.delete();
74
+            }
75
+            lock.unlock();
76
+        }
77
+    }
78
+
79
+    /**
80
+     * 下载操作
81
+     * @return
82
+     */
83
+    public boolean executeDownLoad() {
84
+        try {
85
+            //服务器返回的数据的长度,实际上就是文件的长度,单位是字节
86
+            long length = uploadFile.getSize();
87
+
88
+            LOG.info("文件总长度:" + length + "字节(B)");
89
+            RandomAccessFile raf = new RandomAccessFile(localPath, "rwd");
90
+            //指定创建的文件的长度
91
+            raf.setLength(length);
92
+            raf.close();
93
+            //分割文件
94
+            int partCount = getPartCount(length);
95
+            int partSize = (int)(length / partCount);
96
+            latch = new CountDownLatch(partCount);
97
+            for (int threadId = 1; threadId <= partCount; threadId++) {
98
+                // 每一个线程下载的开始位置
99
+                long startIndex = (threadId - 1) * partSize;
100
+                // 每一个线程下载的开始位置
101
+                long endIndex = startIndex + partSize - 1;
102
+                if (threadId == partCount) {
103
+                    //最后一个线程下载的长度稍微长一点
104
+                    endIndex = length;
105
+                }
106
+                LOG.info("线程" + threadId + "下载:" + startIndex + "字节~" + endIndex + "字节");
107
+                threadPool.execute(new DownLoadThread(threadId, startIndex, endIndex, latch));
108
+            }
109
+            latch.await();
110
+            if(flag == 0){
111
+                return true;
112
+            }
113
+        } catch (Exception e) {
114
+            e.printStackTrace();
115
+            LOG.error("文件下载失败,失败原因:{}", e.getMessage());
116
+        }
117
+        return false;
118
+    }
119
+
120
+    /**
121
+     * 计算分割多少文件比较合适
122
+     * @param length
123
+     * @return
124
+     */
125
+    private int getPartCount(long length) {
126
+        // 十兆划分文件
127
+        int size = (int) (length / 10485760);
128
+        return size + 1;
129
+    }
130
+
131
+    /**
132
+     * 内部类用于实现下载
133
+     */
134
+    public class DownLoadThread implements Runnable {
135
+
136
+        /**
137
+         * 线程ID
138
+         */
139
+        private int threadId;
140
+        /**
141
+         * 下载起始位置
142
+         */
143
+        private long startIndex;
144
+        /**
145
+         * 下载结束位置
146
+         */
147
+        private long endIndex;
148
+
149
+        private CountDownLatch latch;
150
+
151
+        public DownLoadThread(int threadId, long startIndex, long endIndex, CountDownLatch latch) {
152
+            this.threadId = threadId;
153
+            this.startIndex = startIndex;
154
+            this.endIndex = endIndex;
155
+            this.latch = latch;
156
+        }
157
+
158
+        @Override
159
+        public void run() {
160
+            try {
161
+                LOG.info("线程" + threadId + "开始下载中:" + startIndex + "字节~" + endIndex + "字节");
162
+                InputStream is = uploadFile.getInputStream();//返回资源
163
+                RandomAccessFile raf = new RandomAccessFile(localPath, "rwd");
164
+                raf.seek(startIndex);//定位文件
165
+                int len = 0;
166
+                byte[] buffer = new byte[1024];
167
+                while ((len = is.read(buffer)) != -1) {
168
+                    raf.write(buffer, 0, len);
169
+                }
170
+                is.close();
171
+                raf.close();
172
+            } catch (Exception e) {
173
+                //线程下载出错
174
+                VideoThreadDownLoad.flag = 1;
175
+                LOG.error(e.getMessage());
176
+            } finally {
177
+                //计数值减一
178
+                latch.countDown();
179
+            }
180
+
181
+        }
182
+    }
183
+}

+ 28
- 0
src/main/java/com/yunzhi/marketing/config/CorsConfig.java 查看文件

@@ -0,0 +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
+//}

+ 19
- 0
src/main/java/com/yunzhi/marketing/config/WebMvcConfigurer.java 查看文件

@@ -0,0 +1,19 @@
1
+package com.yunzhi.marketing.config;
2
+
3
+import org.springframework.beans.factory.annotation.Value;
4
+import org.springframework.context.annotation.Configuration;
5
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
6
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
7
+
8
+@Configuration
9
+public class WebMvcConfigurer extends WebMvcConfigurerAdapter {
10
+
11
+    @Value("${file.path}")
12
+    private String FILE_PATH;
13
+
14
+    @Override
15
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {
16
+        registry.addResourceHandler("/file/**").addResourceLocations("file:"+FILE_PATH);
17
+        super.addResourceHandlers(registry);
18
+    }
19
+}

+ 72
- 4
src/main/java/com/yunzhi/marketing/controller/CommonController.java 查看文件

@@ -8,21 +8,30 @@ import com.yunzhi.marketing.common.AliOSSUtils;
8 8
 import com.yunzhi.marketing.common.CommConstant;
9 9
 import com.yunzhi.marketing.common.SMSUtils;
10 10
 import com.yunzhi.marketing.common.StringUtils;
11
+import com.yunzhi.marketing.common.VideoThreadDownLoad;
11 12
 import com.yunzhi.marketing.service.IMiniAppService;
12 13
 import com.yunzhi.marketing.service.ITdMiniappTemplateTypeService;
14
+import io.swagger.annotations.Api;
15
+import io.swagger.annotations.ApiOperation;
13 16
 import org.springframework.beans.factory.annotation.Autowired;
17
+import org.springframework.beans.factory.annotation.Value;
14 18
 import org.springframework.web.bind.annotation.*;
15 19
 import org.springframework.web.multipart.MultipartFile;
16 20
 
17 21
 import javax.servlet.http.HttpServletRequest;
22
+import java.io.File;
18 23
 import java.io.IOException;
24
+import java.text.SimpleDateFormat;
19 25
 import java.util.ArrayList;
26
+import java.util.Date;
20 27
 import java.util.HashMap;
21 28
 import java.util.Map;
29
+import java.util.UUID;
22 30
 
23 31
 
24 32
 @RestController
25 33
 @RequestMapping("/api")
34
+@Api(value = "文件上传", tags = "文件上传")
26 35
 public class CommonController extends BaseController {
27 36
     @Autowired
28 37
     SMSUtils smsUtils;
@@ -33,21 +42,68 @@ public class CommonController extends BaseController {
33 42
     @Autowired
34 43
     IMiniAppService iMiniAppService;
35 44
 
45
+    @Value("${file.path}")
46
+    private String FILE_PATH;
47
+
48
+    SimpleDateFormat sdf = new SimpleDateFormat("yyyMMdd/");
49
+
36 50
     /**
37 51
      * 图片
38 52
      * @param multipartFile
39 53
      * @return
40 54
      */
55
+    @ApiOperation(value = "图片/视频上传", notes = "图片/视频上传")
41 56
     @PostMapping("/{plat}/image")
42
-    public ResponseBean uploadImage(@RequestParam("file") MultipartFile multipartFile) {
57
+    public ResponseBean uploadImage(@PathVariable String plat, @RequestParam("file") MultipartFile multipartFile) {
43 58
         try {
44
-            String img = AliOSSUtils.putObject(multipartFile, CommConstant.ALIOSS_DEFAULT_UPLOAD);
45
-            return ResponseBean.success(img);
59
+            // 本地保存的文件夹
60
+            String format = sdf.format(new Date());
61
+            File folder = new File(FILE_PATH + format);
62
+            if(!folder.isDirectory()) {
63
+                folder.mkdirs();
64
+            }
65
+            // 新文件夹
66
+            String oldName = multipartFile.getOriginalFilename();
67
+            String newName = UUID.randomUUID().toString() +
68
+                    oldName.substring(oldName.lastIndexOf("."));
69
+
70
+            // 文件保存操作
71
+            multipartFile.transferTo(new File(folder, newName));
72
+            return ResponseBean.success("/file/"+ format + newName);
46 73
         } catch (IOException e) {
47 74
             return ResponseBean.error("上传图片失败: " + e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
48 75
         }
49 76
     }
50 77
 
78
+
79
+//    /**
80
+//     * 图片
81
+//     * @param multipartFile
82
+//     * @return
83
+//     */
84
+//    @ApiOperation(value = "视频上传", notes = "视频上传")
85
+//    @PostMapping("/admin/upload/video")
86
+//    public ResponseBean uploadVideo(@RequestParam("file") MultipartFile multipartFile) {
87
+//        try {
88
+//            // 本地保存的文件夹
89
+//            String format = sdf.format(new Date());
90
+//            File folder = new File(FILE_PATH + format);
91
+//            if(!folder.isDirectory()) {
92
+//                folder.mkdirs();
93
+//            }
94
+//            // 新文件夹
95
+//            String oldName = multipartFile.getOriginalFilename();
96
+//            String newName = UUID.randomUUID().toString() +
97
+//                    oldName.substring(oldName.lastIndexOf("."));
98
+//
99
+//            //多线程下载文件
100
+//            VideoThreadDownLoad.downLoad(multipartFile,FILE_PATH + format + newName);
101
+//            return ResponseBean.success(FILE_DOMAIN+"/file/"+ format + newName);
102
+//        } catch (Exception e) {
103
+//            return ResponseBean.error("上传图片失败: " + e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
104
+//        }
105
+//    }
106
+
51 107
     @PostMapping("/admin/qrcode")
52 108
     public ResponseBean createQrCode(@RequestBody String jsonStr, HttpServletRequest request) {
53 109
         Integer orgId = getOrgId(request);
@@ -96,8 +152,20 @@ public class CommonController extends BaseController {
96 152
         Map<String, String> result = new HashMap<>();
97 153
 
98 154
         try {
99
-            String img = AliOSSUtils.putObject(multipartFile, CommConstant.ALIOSS_DEFAULT_UPLOAD);
155
+            // 本地保存的文件夹
156
+            String format = sdf.format(new Date());
157
+            File folder = new File(FILE_PATH + format);
158
+            if(!folder.isDirectory()) {
159
+                folder.mkdirs();
160
+            }
161
+            // 新文件夹
162
+            String oldName = multipartFile.getOriginalFilename();
163
+            String newName = UUID.randomUUID().toString() +
164
+                    oldName.substring(oldName.lastIndexOf("."));
100 165
 
166
+            // 文件保存操作
167
+            multipartFile.transferTo(new File(folder, newName));
168
+            String img = "/file/"+ format + newName;
101 169
             result.put("name", StringUtils.ifNull(multipartFile.getOriginalFilename(), multipartFile.getName()));
102 170
             result.put("status", "done");
103 171
             result.put("thumbUrl", img + "?x-oss-process=style/thumbnail");

+ 4
- 1
src/main/java/com/yunzhi/marketing/controller/MiniAppController.java 查看文件

@@ -430,10 +430,10 @@ public class MiniAppController extends BaseController {
430 430
     @PostMapping("/signup")
431 431
     public ResponseBean info(@RequestBody String paramStr, HttpServletRequest request) {
432 432
         String appid = request.getHeader("appid");
433
+        String openid = getOpenId(request);
433 434
         TaPerson person = null;
434 435
         TaMiniapp miniapp = taMiniappService.getById(appid);
435 436
         if (null == paramStr || "".equals(paramStr.trim()) || "{}".equals(paramStr.trim())) {
436
-            String openid = getOpenId(request);
437 437
             List<TaPerson> taPersons = taPersonService.getPersonsByOpenId(openid);
438 438
             if (null == taPersons || taPersons.size() != 1) {
439 439
                 return ResponseBean.error("验证人员信息失败", ResponseBean.ERROR_UNAVAILABLE);
@@ -459,6 +459,9 @@ public class MiniAppController extends BaseController {
459 459
 
460 460
             // 解密用户信息
461 461
             WxMaUserInfo userInfo = miniAppService.getUserInfo(sessionKey, encryptedData, iv, appid);
462
+            if (userInfo.getOpenId() == null) {
463
+                userInfo.setOpenId(openid);
464
+            }
462 465
 
463 466
             // 更新或保存用户信息
464 467
             person = taPersonService.mergePersonWxInfo(userInfo);

+ 6
- 6
src/main/java/com/yunzhi/marketing/controller/TaChannelController.java 查看文件

@@ -92,12 +92,12 @@ public class TaChannelController extends BaseController {
92 92
                 }
93 93
             });
94 94
 
95
-            HashMap hashMap  = new HashMap<>();
96
-            hashMap.put("result",result);
97
-            // 下拉列表的数据 all
98
-            List<TaChannel> taChannelList = taChannelMapper.selectChannelList(orgId);
99
-            hashMap.put("channelNmae",taChannelList);
100
-            responseBean.addSuccess(hashMap);
95
+//            HashMap hashMap  = new HashMap<>();
96
+//            hashMap.put("result",result);
97
+//            // 下拉列表的数据 all
98
+//            List<TaChannel> taChannelList = taChannelMapper.selectChannelList(orgId);
99
+//            hashMap.put("channelNmae",taChannelList);
100
+            responseBean.addSuccess(result);
101 101
         }catch (Exception e){
102 102
             e.printStackTrace();
103 103
             logger.error("channelList -=- {}",e.toString());

+ 8
- 2
src/main/java/com/yunzhi/marketing/controller/TaLiveActivityController.java 查看文件

@@ -8,9 +8,12 @@ import com.yunzhi.marketing.common.CommConstant;
8 8
 import com.yunzhi.marketing.common.StringUtils;
9 9
 import com.yunzhi.marketing.entity.ExtendContent;
10 10
 import com.yunzhi.marketing.entity.TaLiveActivity;
11
+import com.yunzhi.marketing.po.LiveAndVideoVO;
11 12
 import com.yunzhi.marketing.reportCustomerAop.ReportCustomer;
12 13
 import com.yunzhi.marketing.service.IExtendContentService;
13 14
 import com.yunzhi.marketing.service.ITaLiveActivityService;
15
+import io.swagger.annotations.Api;
16
+import io.swagger.annotations.ApiOperation;
14 17
 import org.slf4j.Logger;
15 18
 import org.slf4j.LoggerFactory;
16 19
 import org.springframework.beans.factory.annotation.Autowired;
@@ -30,6 +33,7 @@ import java.util.List;
30 33
  */
31 34
 @RestController
32 35
 @RequestMapping("/api")
36
+@Api(value = "直播活动", tags = "xlk-直播活动")
33 37
 public class TaLiveActivityController extends BaseController {
34 38
 
35 39
     private final Logger logger = LoggerFactory.getLogger(TaLiveActivityController.class);
@@ -254,6 +258,7 @@ public class TaLiveActivityController extends BaseController {
254 258
      * @param request
255 259
      * @return
256 260
      */
261
+    @ApiOperation(value = "wx-视频直播列表", notes = "admin-视频直播列表")
257 262
     @RequestMapping(value = "/wx/taLiveActivity", method = RequestMethod.GET)
258 263
     public ResponseBean taLiveActivityListForMiniApp(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
259 264
                                                      @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
@@ -262,13 +267,14 @@ public class TaLiveActivityController extends BaseController {
262 267
                                                      String buildingId,
263 268
                                                      Integer status,
264 269
                                                      @RequestParam(value = "source", defaultValue = "1") Integer source,
270
+                                                     @RequestParam(value = "name", required = false) String name,
265 271
                                                      HttpServletRequest request) {
266 272
         ResponseBean responseBean = new ResponseBean();
267 273
         try {
268 274
             status = status == null ? 1 : status;
269 275
             Integer orgId = getOrgId(request);
270
-            IPage<TaLiveActivity> result = iTaLiveActivityService.listLiveActivityByCondition(pageNum, pageSize, orgId,
271
-                    liveActivityTitle, cityId, buildingId, status, null, null, source);
276
+            IPage<LiveAndVideoVO> result = iTaLiveActivityService.getWxLiveActivityAndVideo(pageNum, pageSize, orgId,
277
+                    liveActivityTitle, cityId, buildingId, status, name, source);
272 278
             responseBean.addSuccess(result);
273 279
 
274 280
         } catch (Exception e) {

+ 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
+}

+ 5
- 0
src/main/java/com/yunzhi/marketing/entity/TaActivityDynamicEnlist.java 查看文件

@@ -67,6 +67,11 @@ public class TaActivityDynamicEnlist implements Serializable {
67 67
      */
68 68
     private Integer isCheckin;
69 69
 
70
+    /**
71
+     * 组织结构id
72
+     */
73
+    private String institutionId;
74
+
70 75
     /**
71 76
      * 分享人
72 77
      */

+ 35
- 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;
@@ -215,6 +217,16 @@ public class TaBuilding implements Serializable {
215 217
      */
216 218
     private String recordName;
217 219
 
220
+    /**
221
+     * 品牌id
222
+     */
223
+    private String brandId;
224
+
225
+    /**
226
+     * 品牌商名称
227
+     */
228
+    private String brandName;
229
+
218 230
     /**
219 231
      * 地图数据
220 232
      */
@@ -343,6 +355,23 @@ public class TaBuilding implements Serializable {
343 355
      */
344 356
     private String highlightsType;
345 357
 
358
+    /**
359
+     * 组织结构id
360
+     */
361
+    private String institutionId;
362
+
363
+    /** 供水 */
364
+    private String waterSupply ;
365
+    /** 供电 */
366
+    private String powerSupply ;
367
+    /** 供暖 */
368
+    private String heatingSupply ;
369
+
370
+    /**
371
+     * 驻场code
372
+     */
373
+    private String marketingCode;
374
+
346 375
     /**
347 376
      * 项目亮点封面
348 377
      */
@@ -354,4 +383,10 @@ public class TaBuilding implements Serializable {
354 383
 
355 384
     @TableField(exist = false)
356 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;
357 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
 

+ 5
- 0
src/main/java/com/yunzhi/marketing/entity/TaBuildingDynamic.java 查看文件

@@ -122,6 +122,11 @@ public class TaBuildingDynamic implements Serializable {
122 122
      */
123 123
     private Integer home;
124 124
 
125
+    /**
126
+     * 组织结构id
127
+     */
128
+    private String institutionId;
129
+
125 130
     /**
126 131
      * 活动的当前状态1:进行中,2:未开始,3:结束
127 132
      */

+ 5
- 0
src/main/java/com/yunzhi/marketing/entity/TaBuildingIntention.java 查看文件

@@ -69,5 +69,10 @@ public class TaBuildingIntention implements Serializable {
69 69
      */
70 70
     private String buildingId;
71 71
 
72
+    /**
73
+     * 组织结构id
74
+     */
75
+    private String institutionId;
76
+
72 77
 
73 78
 }

+ 4
- 0
src/main/java/com/yunzhi/marketing/entity/TaBuildingPanorama.java 查看文件

@@ -75,5 +75,9 @@ public class TaBuildingPanorama implements Serializable {
75 75
      */
76 76
     private Integer status;
77 77
 
78
+    /**
79
+     * 组织结构id
80
+     */
81
+    private String institutionId;
78 82
 
79 83
 }

+ 4
- 0
src/main/java/com/yunzhi/marketing/entity/TaBuildingReport.java 查看文件

@@ -49,5 +49,9 @@ public class TaBuildingReport implements Serializable {
49 49
      */
50 50
     private String buildingId;
51 51
 
52
+    /**
53
+     * 组织结构id
54
+     */
55
+    private String institutionId;
52 56
 
53 57
 }

+ 5
- 0
src/main/java/com/yunzhi/marketing/entity/TaChannel.java 查看文件

@@ -79,6 +79,11 @@ public class TaChannel implements Serializable {
79 79
      */
80 80
     private LocalDateTime createDate;
81 81
 
82
+    /**
83
+     * 组织结构id
84
+     */
85
+    private String institutionId;
86
+
82 87
     /**
83 88
      * 公司id
84 89
      */

+ 5
- 0
src/main/java/com/yunzhi/marketing/entity/TaChat.java 查看文件

@@ -84,5 +84,10 @@ public class TaChat implements Serializable {
84 84
      */
85 85
     private Integer orgId;
86 86
 
87
+    /**
88
+     * 组织结构id
89
+     */
90
+    private String institutionId;
91
+
87 92
 
88 93
 }

+ 5
- 0
src/main/java/com/yunzhi/marketing/entity/TaCheckin.java 查看文件

@@ -69,4 +69,9 @@ public class TaCheckin implements Serializable {
69 69
      */
70 70
     private Integer orgId;
71 71
 
72
+    /**
73
+     * 组织结构id
74
+     */
75
+    private String institutionId;
76
+
72 77
 }

+ 4
- 0
src/main/java/com/yunzhi/marketing/entity/TaCustomerMessage.java 查看文件

@@ -70,5 +70,9 @@ public class TaCustomerMessage implements Serializable {
70 70
      */
71 71
     private Integer status;
72 72
 
73
+    /**
74
+     * 组织结构id
75
+     */
76
+    private String institutionId;
73 77
 
74 78
 }

+ 6
- 0
src/main/java/com/yunzhi/marketing/entity/TaExtendContent.java 查看文件

@@ -86,4 +86,10 @@ public class TaExtendContent implements Serializable {
86 86
     private String buildingId;
87 87
 
88 88
     private Integer cityId;
89
+
90
+
91
+    /**
92
+     * 组织结构id
93
+     */
94
+    private String institutionId;
89 95
 }

+ 5
- 0
src/main/java/com/yunzhi/marketing/entity/TaLiveActivity.java 查看文件

@@ -131,6 +131,11 @@ public class TaLiveActivity implements Serializable {
131 131
      */
132 132
     private String updateUser;
133 133
 
134
+    /**
135
+     * 组织结构id
136
+     */
137
+    private String institutionId;
138
+
134 139
     /**
135 140
      * 权重
136 141
      */

+ 5
- 0
src/main/java/com/yunzhi/marketing/entity/TaNews.java 查看文件

@@ -112,6 +112,11 @@ public class TaNews implements Serializable {
112 112
      */
113 113
     private Integer weight;
114 114
 
115
+    /**
116
+     * 组织结构id
117
+     */
118
+    private String institutionId;
119
+
115 120
     /**
116 121
      * 类型
117 122
      */

+ 5
- 0
src/main/java/com/yunzhi/marketing/entity/TaNewsType.java 查看文件

@@ -60,5 +60,10 @@ public class TaNewsType implements Serializable {
60 60
      */
61 61
     private Integer status;
62 62
 
63
+    /**
64
+     * 组织结构id
65
+     */
66
+    private String institutionId;
67
+
63 68
 
64 69
 }

+ 1
- 0
src/main/java/com/yunzhi/marketing/entity/TaPerson.java 查看文件

@@ -193,6 +193,7 @@ public class TaPerson implements Serializable {
193 193
      * 项目id
194 194
      */
195 195
     private String buildingId;
196
+
196 197
     /**
197 198
      * 授权手机号时间
198 199
      */

+ 5
- 0
src/main/java/com/yunzhi/marketing/entity/TaPersonFromRecord.java 查看文件

@@ -90,4 +90,9 @@ public class TaPersonFromRecord implements Serializable {
90 90
      * 微信来源类型
91 91
      */
92 92
     private String sceneType;
93
+
94
+    /**
95
+     * 组织结构id
96
+     */
97
+    private String institutionId;
93 98
 }

+ 5
- 0
src/main/java/com/yunzhi/marketing/entity/TaPersonIntentionRecord.java 查看文件

@@ -85,6 +85,11 @@ public class TaPersonIntentionRecord implements Serializable {
85 85
      */
86 86
     private Integer orgId;
87 87
 
88
+    /**
89
+     * 组织结构id
90
+     */
91
+    private String institutionId;
92
+
88 93
     /**
89 94
      * 手机号
90 95
      */

+ 5
- 0
src/main/java/com/yunzhi/marketing/entity/TaPersonVisitRecord.java 查看文件

@@ -81,6 +81,11 @@ public class TaPersonVisitRecord implements Serializable {
81 81
      */
82 82
     private String consultantId;
83 83
 
84
+    /**
85
+     * 组织结构id
86
+     */
87
+    private String institutionId;
88
+
84 89
     /**
85 90
      * 场景值id
86 91
      */

+ 2
- 0
src/main/java/com/yunzhi/marketing/entity/TaPolicy.java 查看文件

@@ -29,6 +29,8 @@ public class TaPolicy implements Serializable {
29 29
     @TableId(value = "policy_id", type = IdType.AUTO)
30 30
     private Integer policyId;
31 31
 
32
+    private String policyTypeId;
33
+
32 34
     /**
33 35
      * 政策标题
34 36
      */

+ 5
- 0
src/main/java/com/yunzhi/marketing/entity/TaRecommendCustomer.java 查看文件

@@ -151,6 +151,11 @@ public class TaRecommendCustomer implements Serializable {
151 151
 
152 152
     private LocalDateTime verifyDate;
153 153
 
154
+    /**
155
+     * 组织结构id
156
+     */
157
+    private String institutionId;
158
+
154 159
     @DateTimeFormat("yyyy年MM月dd日")
155 160
     private LocalDateTime createDate;
156 161
 

+ 4
- 0
src/main/java/com/yunzhi/marketing/entity/TaSave.java 查看文件

@@ -72,5 +72,9 @@ public class TaSave implements Serializable {
72 72
      */
73 73
     private String buildingId;
74 74
 
75
+    /**
76
+     * 组织结构id
77
+     */
78
+    private String institutionId;
75 79
 
76 80
 }

+ 5
- 0
src/main/java/com/yunzhi/marketing/entity/TaSharePersonFrom.java 查看文件

@@ -71,6 +71,11 @@ public class TaSharePersonFrom implements Serializable {
71 71
      */
72 72
     private Integer orgId;
73 73
 
74
+    /**
75
+     * 组织结构id
76
+     */
77
+    private String institutionId;
78
+
74 79
     /**
75 80
      * 楼盘id
76 81
      */

+ 4
- 0
src/main/java/com/yunzhi/marketing/entity/TdBuildingType.java 查看文件

@@ -54,5 +54,9 @@ public class TdBuildingType implements Serializable {
54 54
      */
55 55
     private String buildingId;
56 56
 
57
+    /**
58
+     * 组织结构id
59
+     */
60
+    private String institutionId;
57 61
 
58 62
 }

+ 5
- 0
src/main/java/com/yunzhi/marketing/entity/TsActivityDaily.java 查看文件

@@ -100,6 +100,11 @@ public class TsActivityDaily implements Serializable {
100 100
      */
101 101
     private Integer channelId;
102 102
 
103
+    /**
104
+     * 组织结构id
105
+     */
106
+    private String institutionId;
107
+
103 108
     /**
104 109
      * 统计类型
105 110
      */

+ 5
- 0
src/main/java/com/yunzhi/marketing/entity/TsConsultantKpi.java 查看文件

@@ -109,6 +109,11 @@ public class TsConsultantKpi implements Serializable {
109 109
      */
110 110
     private Integer favorNum;
111 111
 
112
+    /**
113
+     * 组织结构id
114
+     */
115
+    private String institutionId;
116
+
112 117
     /**
113 118
      * 客户总计
114 119
      */

+ 4
- 0
src/main/java/com/yunzhi/marketing/excel/ActivityStatistics/TsChannelDaily.java 查看文件

@@ -55,4 +55,8 @@ public class TsChannelDaily {
55 55
     @ExcelIgnore
56 56
     private String targetId;
57 57
 
58
+    /**
59
+     * 组织结构id
60
+     */
61
+    private String institutionId;
58 62
 }

+ 10
- 9
src/main/java/com/yunzhi/marketing/interceptor/AccessInterceptor.java 查看文件

@@ -77,6 +77,7 @@ public class AccessInterceptor implements HandlerInterceptor {
77 77
             "/api/fadd/",//所有的法大大回调放过
78 78
             "/api/third",
79 79
             "/api/third/redirect/",
80
+            "/file/",
80 81
             "/api/official/" // 官网接口
81 82
     };
82 83
 
@@ -142,7 +143,7 @@ public class AccessInterceptor implements HandlerInterceptor {
142 143
         }
143 144
 
144 145
         String[] jwtAuths = jwtHeader.split("Bearer ");
145
-        if (null == jwtAuths || jwtAuths.length < 2) {
146
+        if (null == jwtAuths || jwtAuths.length < 2 || StringUtils.isEmpty(jwtAuths[1])) {
146 147
             ResponseBean resp = ResponseBean.error("权限验证非法, 数据格式不正确", ResponseBean.ERROR_AUTH_FAIL);
147 148
 
148 149
             response.addHeader("Content-type", "application/json");
@@ -179,14 +180,14 @@ public class AccessInterceptor implements HandlerInterceptor {
179 180
         }
180 181
 
181 182
 //        按钮权限校验
182
-        boolean state = checkButtonRole(request);
183
-        if (!state){
184
-            ResponseBean resp = ResponseBean.error("权限验证非法" , ResponseBean.ERROR_AUTH_FAIL);
185
-
186
-            response.addHeader("Content-type", "application/json");
187
-            response.getOutputStream().write(JSONObject.toJSONBytes(resp));
188
-            return false;
189
-        }
183
+//        boolean state = checkButtonRole(request);
184
+//        if (!state){
185
+//            ResponseBean resp = ResponseBean.error("权限验证非法" , ResponseBean.ERROR_AUTH_FAIL);
186
+//
187
+//            response.addHeader("Content-type", "application/json");
188
+//            response.getOutputStream().write(JSONObject.toJSONBytes(resp));
189
+//            return false;
190
+//        }
190 191
         
191 192
         return true;
192 193
     }

+ 1
- 1
src/main/java/com/yunzhi/marketing/job/CustomerStatisticTimeJob.java 查看文件

@@ -50,7 +50,7 @@ public class CustomerStatisticTimeJob extends BaseController {
50 50
      *
51 51
      * 开启定时任务,每天23:50执行
52 52
      */
53
-    @Scheduled(cron = "59 50 23 * * ?")
53
+//    @Scheduled(cron = "59 50 23 * * ?")
54 54
 //    @Scheduled(cron = "* 0/1 * * * ?")
55 55
     private void configureTasks() {
56 56
         LocalDateTime nowDate = LocalDateTime.now();

+ 1
- 1
src/main/java/com/yunzhi/marketing/job/JudglActivityTimeJob.java 查看文件

@@ -54,7 +54,7 @@ public class JudglActivityTimeJob extends BaseController {
54 54
     /**
55 55
      * 开启定时任务,每天12:30执行
56 56
      */
57
-    @Scheduled(cron = "* 0/5 * * * ?")
57
+//    @Scheduled(cron = "* 0/5 * * * ?")
58 58
     private void configureTasks() {
59 59
         String time = DateUtils.cutSecond(LocalDateTime.now());
60 60
 

+ 10
- 0
src/main/java/com/yunzhi/marketing/mapper/TaLiveActivityMapper.java 查看文件

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.yunzhi.marketing.entity.TaLiveActivity;
6 6
 import com.yunzhi.marketing.entity.TaPersonBuilding;
7
+import com.yunzhi.marketing.po.LiveAndVideoVO;
7 8
 import org.apache.ibatis.annotations.Mapper;
8 9
 import org.apache.ibatis.annotations.Param;
9 10
 import org.springframework.stereotype.Component;
@@ -48,4 +49,13 @@ public interface TaLiveActivityMapper extends BaseMapper<TaLiveActivity> {
48 49
     void updateLiveActivityStatus(@Param("orgId") Integer orgId, @Param("taLiveActivityList") List<TaLiveActivity> taLiveActivityList);
49 50
 
50 51
     TaLiveActivity getDetailById(@Param("id")Integer id);
52
+
53
+    IPage<LiveAndVideoVO> getWxLiveActivityAndVideo(IPage<LiveAndVideoVO> pg,
54
+                                                    @Param("liveActivityTitle")  String liveActivityTitle,
55
+                                                    @Param("cityId") String cityId,
56
+                                                    @Param("buildingId") String buildingId,
57
+                                                    @Param("status") Integer status,
58
+                                                    @Param("orgId") Integer orgId,
59
+                                                    @Param("name") String name,
60
+                                                    @Param("source") Integer source);
51 61
 }

+ 25
- 0
src/main/java/com/yunzhi/marketing/po/LiveAndVideoVO.java 查看文件

@@ -0,0 +1,25 @@
1
+package com.yunzhi.marketing.po;
2
+
3
+import lombok.Data;
4
+
5
+import java.time.LocalDate;
6
+
7
+@Data
8
+public class LiveAndVideoVO {
9
+
10
+    private String title;
11
+
12
+    private LocalDate startTime;
13
+
14
+    private LocalDate endTime;
15
+
16
+    private String buildingName;
17
+
18
+    private String cityName;
19
+
20
+    private String type;
21
+
22
+    private String kind;
23
+
24
+    private String images;
25
+}

+ 16
- 0
src/main/java/com/yunzhi/marketing/service/ITaLiveActivityService.java 查看文件

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
5 5
 import com.yunzhi.marketing.base.ResponseBean;
6 6
 import com.yunzhi.marketing.entity.TaLiveActivity;
7 7
 import com.yunzhi.marketing.entity.TaPersonBuilding;
8
+import com.yunzhi.marketing.po.LiveAndVideoVO;
8 9
 
9 10
 import java.util.List;
10 11
 
@@ -63,4 +64,19 @@ public interface ITaLiveActivityService extends IService<TaLiveActivity> {
63 64
     ResponseBean delLiveActivityList(Integer orgId, List<TaLiveActivity> liveActivityList);
64 65
 
65 66
     ResponseBean getDetailById(Integer id);
67
+
68
+    /**
69
+     * 微信小程序查询直播列表
70
+     * @param pageNum
71
+     * @param pageSize
72
+     * @param orgId
73
+     * @param liveActivityTitle
74
+     * @param cityId
75
+     * @param buildingId
76
+     * @param status
77
+     * @param name
78
+     * @param source
79
+     * @return
80
+     */
81
+    IPage<LiveAndVideoVO> getWxLiveActivityAndVideo(Integer pageNum, Integer pageSize, Integer orgId, String liveActivityTitle, String cityId, String buildingId, Integer status, String name, Integer source);
66 82
 }

+ 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();

+ 36
- 0
src/main/java/com/yunzhi/marketing/service/impl/TaLiveActivityServiceImpl.java 查看文件

@@ -10,6 +10,7 @@ import com.yunzhi.marketing.common.CommConstant;
10 10
 import com.yunzhi.marketing.mapper.TaLiveActivityMapper;
11 11
 import com.yunzhi.marketing.mapper.TdLiveDictMapper;
12 12
 import com.yunzhi.marketing.entity.*;
13
+import com.yunzhi.marketing.po.LiveAndVideoVO;
13 14
 import com.yunzhi.marketing.service.IMiniAppService;
14 15
 import com.yunzhi.marketing.service.ITaLiveActivityService;
15 16
 import com.yunzhi.marketing.service.ITaMiniappService;
@@ -21,6 +22,7 @@ import org.slf4j.LoggerFactory;
21 22
 import org.springframework.beans.factory.annotation.Autowired;
22 23
 import org.springframework.stereotype.Service;
23 24
 
25
+import java.time.LocalDate;
24 26
 import java.time.LocalDateTime;
25 27
 import java.util.ArrayList;
26 28
 import java.util.List;
@@ -196,4 +198,38 @@ public class TaLiveActivityServiceImpl extends ServiceImpl<TaLiveActivityMapper,
196 198
         responseBean.addSuccess(taLiveActivityMapper.getDetailById(id));
197 199
         return responseBean;
198 200
     }
201
+
202
+    /**
203
+     * 微信小程序查询直播列表
204
+     *
205
+     * @param pageNum
206
+     * @param pageSize
207
+     * @param orgId
208
+     * @param liveActivityTitle
209
+     * @param cityId
210
+     * @param buildingId
211
+     * @param status
212
+     * @param name
213
+     * @param source
214
+     * @return
215
+     */
216
+    @Override
217
+    public IPage<LiveAndVideoVO> getWxLiveActivityAndVideo(Integer pageNum, Integer pageSize, Integer orgId, String liveActivityTitle, String cityId, String buildingId, Integer status, String name, Integer source) {
218
+        IPage<LiveAndVideoVO> pg = new Page<>(pageNum, pageSize);
219
+        IPage<LiveAndVideoVO> wxLiveActivityAndVideo = taLiveActivityMapper.getWxLiveActivityAndVideo(pg, liveActivityTitle, cityId, buildingId, status, orgId, name, source);
220
+        List<LiveAndVideoVO> records = wxLiveActivityAndVideo.getRecords();
221
+        records.forEach(e -> {
222
+            if ("live".equals(e.getType())){
223
+                LocalDate now = LocalDate.now();
224
+                if (e.getStartTime().isBefore(now)){
225
+                    e.setKind("notice");
226
+                }else if (e.getStartTime().isBefore(now) && e.getEndTime().isAfter(now)){
227
+                    e.setKind("live");
228
+                }else {
229
+                    e.setKind("end");
230
+                }
231
+            }
232
+        });
233
+        return wxLiveActivityAndVideo;
234
+    }
199 235
 }

+ 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
 }

+ 5
- 0
src/main/java/com/yunzhi/marketing/statistic/entity/TaCustomerFollowUpRecord.java 查看文件

@@ -64,4 +64,9 @@ public class TaCustomerFollowUpRecord implements Serializable {
64 64
      * 客户性别
65 65
      */
66 66
     private Integer customerSex;
67
+
68
+    /**
69
+     * 组织结构id
70
+     */
71
+    private String institutionId;
67 72
 }

+ 199
- 0
src/main/java/com/yunzhi/marketing/xlk/controller/BrandController.java 查看文件

@@ -0,0 +1,199 @@
1
+package com.yunzhi.marketing.xlk.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5
+import com.baomidou.mybatisplus.core.metadata.IPage;
6
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7
+import com.yunzhi.marketing.base.BaseController;
8
+import com.yunzhi.marketing.base.ResponseBean;
9
+import com.yunzhi.marketing.common.StringUtils;
10
+import com.yunzhi.marketing.entity.TaBuilding;
11
+import com.yunzhi.marketing.service.ITaBuildingService;
12
+import com.yunzhi.marketing.xlk.dto.BrandDTO;
13
+import io.swagger.annotations.Api;
14
+import io.swagger.annotations.ApiOperation;
15
+import org.slf4j.Logger;
16
+import org.slf4j.LoggerFactory;
17
+import org.springframework.beans.BeanUtils;
18
+import org.springframework.beans.factory.annotation.Autowired;
19
+import org.springframework.web.bind.annotation.PathVariable;
20
+import org.springframework.web.bind.annotation.RequestBody;
21
+import org.springframework.web.bind.annotation.RequestHeader;
22
+import org.springframework.web.bind.annotation.RequestMapping;
23
+import org.springframework.web.bind.annotation.RequestMethod;
24
+import org.springframework.web.bind.annotation.RequestParam;
25
+import org.springframework.web.bind.annotation.ResponseBody;
26
+import com.yunzhi.marketing.xlk.service.IBrandService;
27
+import com.yunzhi.marketing.xlk.entity.Brand;
28
+import org.springframework.web.bind.annotation.RestController;
29
+
30
+import javax.servlet.http.HttpServletRequest;
31
+import java.time.LocalDateTime;
32
+import java.util.List;
33
+
34
+/**
35
+ * <p>
36
+    * 品牌开发商表  前端控制器
37
+    * </p>
38
+ *
39
+ * @author jobob
40
+ * @since 2021-05-13
41
+ */
42
+@RestController
43
+@RequestMapping("/api")
44
+@Api(value = "品牌开发商表", tags = "xlk-品牌开发商表")
45
+public class BrandController extends BaseController {
46
+
47
+    private final Logger logger = LoggerFactory.getLogger(BrandController.class);
48
+
49
+    @Autowired
50
+    public IBrandService iBrandService;
51
+
52
+    @Autowired
53
+    private ITaBuildingService taBuildingService;
54
+
55
+
56
+    /**
57
+     * 分页查询列表
58
+     * @param pageNum
59
+     * @param pageSize
60
+     * @return
61
+     */
62
+    @ApiOperation(value = "admin-品牌开发商表列表", notes = "admin-品牌开发商表列表")
63
+    @RequestMapping(value="/admin/brand",method= RequestMethod.GET)
64
+    public ResponseBean brandList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
65
+                                  @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
66
+                                  @RequestParam(value ="brandName",required = false) String brandName,
67
+                                  @RequestHeader("authorization") String token,HttpServletRequest request){
68
+        ResponseBean responseBean = new ResponseBean();
69
+        try {
70
+            //使用分页插件
71
+		    IPage<Brand> pg = new Page<>(pageNum, pageSize);
72
+            LambdaQueryWrapper<Brand> queryWrapper = new LambdaQueryWrapper<>();
73
+            queryWrapper.eq(Brand::getOrgId,getOrgId(request));
74
+            queryWrapper.like(!StringUtils.isEmpty(brandName),Brand::getBrandName,brandName);
75
+            queryWrapper.orderByDesc(Brand::getCreatedTime);
76
+
77
+            IPage<Brand> result = iBrandService.page(pg, queryWrapper);
78
+            responseBean.addSuccess(result);
79
+        }catch (Exception e){
80
+            e.printStackTrace();
81
+            logger.error("brandList -=- {}",e.toString());
82
+            responseBean.addError(e.getMessage());
83
+        }
84
+        return responseBean;
85
+    }
86
+
87
+    /**
88
+     * 保存对象
89
+     * @param brandDTO 实体对象
90
+     * @return
91
+     */
92
+    @ApiOperation(value = "admin-添加品牌开发商表", notes = "admin-添加品牌开发商表")
93
+    @RequestMapping(value="/admin/brand",method= RequestMethod.POST)
94
+    public ResponseBean brandAdd(@RequestBody BrandDTO brandDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
95
+        ResponseBean responseBean = new ResponseBean();
96
+        try {
97
+            Brand brand = new Brand();
98
+            BeanUtils.copyProperties(brandDTO,brand);
99
+            brand.setCreatedTime(LocalDateTime.now());
100
+            brand.setCreatedBy(getUserId(request));
101
+            brand.setOrgId(getOrgId(request));
102
+            if (iBrandService.save(brand)){
103
+                responseBean.addSuccess(brand);
104
+            }else {
105
+                responseBean.addError("fail");
106
+            }
107
+        }catch (Exception e){
108
+            e.printStackTrace();
109
+            logger.error("brandAdd -=- {}",e.toString());
110
+            responseBean.addError(e.getMessage());
111
+        }
112
+        return responseBean;
113
+    }
114
+
115
+    /**
116
+     * 根据id删除对象
117
+     * @param id  实体ID
118
+     */
119
+    @ApiOperation(value = "admin-删除品牌开发商表", notes = "admin-删除品牌开发商表")
120
+    @RequestMapping(value="/admin/brand/{id}", method= RequestMethod.DELETE)
121
+    public ResponseBean brandDelete(@PathVariable String id, @RequestHeader("authorization") String token){
122
+        ResponseBean responseBean = new ResponseBean();
123
+        try {
124
+            if(iBrandService.removeById(id)){
125
+                // 同时更新项目里面的品牌商id和name为空
126
+                LambdaQueryWrapper<TaBuilding> queryWrapper = new LambdaQueryWrapper<>();
127
+                queryWrapper.eq(TaBuilding::getBrandId,id);
128
+                List<TaBuilding> list = taBuildingService.list(queryWrapper);
129
+                list.forEach(e -> {
130
+                    e.setBrandId(null);
131
+                    e.setBrandName(null);
132
+                    taBuildingService.updateById(e);
133
+                });
134
+                responseBean.addSuccess("success");
135
+            }else {
136
+                responseBean.addError("fail");
137
+            }
138
+        }catch (Exception e){
139
+            e.printStackTrace();
140
+            logger.error("brandDelete -=- {}",e.toString());
141
+            responseBean.addError(e.getMessage());
142
+        }
143
+        return responseBean;
144
+    }
145
+
146
+    /**
147
+     * 修改对象
148
+     * @param brandDTO 实体对象
149
+     * @return
150
+     */
151
+    @ApiOperation(value = "admin-修改品牌开发商表", notes = "admin-修改品牌开发商表")
152
+    @RequestMapping(value="/admin/brand/{id}",method= RequestMethod.PUT)
153
+    public ResponseBean brandUpdate(@PathVariable("id") String id,@RequestBody BrandDTO brandDTO,@RequestHeader("authorization") String token,HttpServletRequest request){
154
+        ResponseBean responseBean = new ResponseBean();
155
+        try {
156
+            Brand brand = new Brand();
157
+            BeanUtils.copyProperties(brandDTO,brand);
158
+            brand.setBrandId(id);
159
+            brand.setUpdatedBy(getUserId(request));
160
+            brand.setUpdatedTime(LocalDateTime.now());
161
+            if (iBrandService.updateById(brand)){
162
+                // 同时更新项目里面的品牌商id和name为更新后的名称
163
+                LambdaQueryWrapper<TaBuilding> queryWrapper = new LambdaQueryWrapper<>();
164
+                queryWrapper.eq(TaBuilding::getBrandId,brand.getBrandId());
165
+                List<TaBuilding> list = taBuildingService.list(queryWrapper);
166
+                list.forEach(e -> {
167
+                    e.setBrandName(brand.getBrandName());
168
+                    taBuildingService.updateById(e);
169
+                });
170
+                responseBean.addSuccess(brand);
171
+            }else {
172
+                responseBean.addError("fail");
173
+            }
174
+        }catch (Exception e){
175
+            e.printStackTrace();
176
+            logger.error("brandUpdate -=- {}",e.toString());
177
+            responseBean.addError(e.getMessage());
178
+        }
179
+        return responseBean;
180
+    }
181
+
182
+    /**
183
+     * 根据id查询对象
184
+     * @param id  实体ID
185
+     */
186
+    @ApiOperation(value = "admin-获取品牌开发商表详情数据", notes = "admin-获取品牌开发商表详情数据")
187
+    @RequestMapping(value="/admin/brand/{id}",method= RequestMethod.GET)
188
+    public ResponseBean brandGet(@PathVariable String id, @RequestHeader("authorization") String token){
189
+        ResponseBean responseBean = new ResponseBean();
190
+        try {
191
+            responseBean.addSuccess(iBrandService.getById(id));
192
+        }catch (Exception e){
193
+            e.printStackTrace();
194
+            logger.error("brandDelete -=- {}",e.toString());
195
+            responseBean.addError(e.getMessage());
196
+        }
197
+        return responseBean;
198
+    }
199
+}

+ 177
- 0
src/main/java/com/yunzhi/marketing/xlk/controller/BuildingSpecialRoomController.java 查看文件

@@ -0,0 +1,177 @@
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="/{plat}/buildingSpecialRoom",method= RequestMethod.GET)
56
+    public ResponseBean buildingSpecialRoomList(@PathVariable("plat") String plat,
57
+                                                @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
58
+                                                @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
59
+                                                @RequestParam(value ="buildingId") String buildingId,
60
+                                                @RequestHeader("authorization") String token, HttpServletRequest request){
61
+        ResponseBean responseBean = new ResponseBean();
62
+        try {
63
+            //使用分页插件
64
+		    IPage<BuildingSpecialRoom> pg = new Page<>(pageNum, pageSize);
65
+            LambdaQueryWrapper<BuildingSpecialRoom> queryWrapper = new LambdaQueryWrapper<>();
66
+            queryWrapper.eq(BuildingSpecialRoom::getOrgId,getOrgId(request));
67
+            queryWrapper.eq(BuildingSpecialRoom::getBuildingId,buildingId);
68
+            queryWrapper.gt("wx".equals(plat), BuildingSpecialRoom::getEndTime, LocalDateTime.now());
69
+            queryWrapper.orderByDesc(BuildingSpecialRoom::getCreateDate);
70
+
71
+            IPage<BuildingSpecialRoom> result = iBuildingSpecialRoomService.page(pg, queryWrapper);
72
+            responseBean.addSuccess(result);
73
+        }catch (Exception e){
74
+            e.printStackTrace();
75
+            logger.error("buildingSpecialRoomList -=- {}",e.toString());
76
+            responseBean.addError(e.getMessage());
77
+        }
78
+        return responseBean;
79
+    }
80
+
81
+    /**
82
+     * 保存对象
83
+     * @param buildingSpecialRoomDTO 实体对象
84
+     * @return
85
+     */
86
+    @ApiOperation(value = "admin-保存特价房源", notes = "admin-保存特价房源")
87
+    @RequestMapping(value="/buildingSpecialRoom",method= RequestMethod.POST)
88
+    public ResponseBean buildingSpecialRoomAdd(@RequestBody BuildingSpecialRoomDTO buildingSpecialRoomDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
89
+        ResponseBean responseBean = new ResponseBean();
90
+        try {
91
+            Integer orgId = getOrgId(request);
92
+            BuildingSpecialRoom buildingSpecialRoom = new BuildingSpecialRoom();
93
+            BeanUtils.copyProperties(buildingSpecialRoomDTO,buildingSpecialRoom);
94
+            buildingSpecialRoom.setOrgId(orgId);
95
+            buildingSpecialRoom.setCreateDate(LocalDateTime.now());
96
+            if (iBuildingSpecialRoomService.save(buildingSpecialRoom)){
97
+                responseBean.addSuccess(buildingSpecialRoom);
98
+            }else {
99
+                responseBean.addError("fail");
100
+            }
101
+        }catch (Exception e){
102
+            e.printStackTrace();
103
+            logger.error("buildingSpecialRoomAdd -=- {}",e.toString());
104
+            responseBean.addError(e.getMessage());
105
+        }
106
+        return responseBean;
107
+    }
108
+
109
+    /**
110
+     * 根据id删除对象
111
+     * @param id  实体ID
112
+     */
113
+    @ApiOperation(value = "admin-删除特价房源", notes = "admin-删除特价房源")
114
+    @ResponseBody
115
+    @RequestMapping(value="/buildingSpecialRoom/{id}", method= RequestMethod.DELETE)
116
+    public ResponseBean buildingSpecialRoomDelete(@PathVariable String id, @RequestHeader("authorization") String token, HttpServletRequest request){
117
+        ResponseBean responseBean = new ResponseBean();
118
+        try {
119
+            if(iBuildingSpecialRoomService.removeById(id)){
120
+                responseBean.addSuccess("success");
121
+            }else {
122
+                responseBean.addError("fail");
123
+            }
124
+        }catch (Exception e){
125
+            e.printStackTrace();
126
+            logger.error("buildingSpecialRoomDelete -=- {}",e.toString());
127
+            responseBean.addError(e.getMessage());
128
+        }
129
+        return responseBean;
130
+    }
131
+
132
+    /**
133
+     * 修改对象
134
+     * @param id  实体ID
135
+     * @param buildingSpecialRoomDTO 实体对象
136
+     * @return
137
+     */
138
+    @ApiOperation(value = "admin-修改特价房源", notes = "admin-修改特价房源")
139
+    @RequestMapping(value="/buildingSpecialRoom/{id}",method= RequestMethod.PUT)
140
+    public ResponseBean buildingSpecialRoomUpdate(@PathVariable String id,
141
+                                                  @RequestBody BuildingSpecialRoomDTO buildingSpecialRoomDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
142
+        ResponseBean responseBean = new ResponseBean();
143
+        try {
144
+            BuildingSpecialRoom buildingSpecialRoom = new BuildingSpecialRoom();
145
+            BeanUtils.copyProperties(buildingSpecialRoomDTO,buildingSpecialRoom);
146
+            buildingSpecialRoom.setSpecialRoomId(id);
147
+            if (iBuildingSpecialRoomService.updateById(buildingSpecialRoom)){
148
+                responseBean.addSuccess(buildingSpecialRoom);
149
+            }else {
150
+                responseBean.addError("fail");
151
+            }
152
+        }catch (Exception e){
153
+            e.printStackTrace();
154
+            logger.error("buildingSpecialRoomUpdate -=- {}",e.toString());
155
+            responseBean.addError(e.getMessage());
156
+        }
157
+        return responseBean;
158
+    }
159
+
160
+    /**
161
+     * 根据id查询对象
162
+     * @param id  实体ID
163
+     */
164
+    @ApiOperation(value = "admin-获取特价房源详情", notes = "admin-获取特价房源详情")
165
+    @RequestMapping(value="/buildingSpecialRoom/{id}",method= RequestMethod.GET)
166
+    public ResponseBean buildingSpecialRoomGet(@PathVariable String id, @RequestHeader("authorization") String token, HttpServletRequest request){
167
+        ResponseBean responseBean = new ResponseBean();
168
+        try {
169
+            responseBean.addSuccess(iBuildingSpecialRoomService.getById(id));
170
+        }catch (Exception e){
171
+            e.printStackTrace();
172
+            logger.error("buildingSpecialRoomDelete -=- {}",e.toString());
173
+            responseBean.addError(e.getMessage());
174
+        }
175
+        return responseBean;
176
+    }
177
+}

+ 256
- 0
src/main/java/com/yunzhi/marketing/xlk/controller/CurriculumController.java 查看文件

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

+ 126
- 0
src/main/java/com/yunzhi/marketing/xlk/controller/HousePropertyController.java 查看文件

@@ -0,0 +1,126 @@
1
+package com.yunzhi.marketing.xlk.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.entity.HouseProperty;
9
+import com.yunzhi.marketing.xlk.service.IHousePropertyService;
10
+import io.swagger.annotations.Api;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.slf4j.Logger;
13
+import org.slf4j.LoggerFactory;
14
+import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.web.bind.annotation.*;
16
+
17
+/**
18
+ * <p>
19
+    * 帮我找房基本属性表  前端控制器
20
+    * </p>
21
+ *
22
+ * @author jobob
23
+ * @since 2021-06-15
24
+ */
25
+@RestController
26
+@RequestMapping("/api")
27
+@Api(value = "帮我找房问卷问题表", tags = "xlk-帮我找房问卷问题表")
28
+public class HousePropertyController extends BaseController {
29
+
30
+    private final Logger logger = LoggerFactory.getLogger(HousePropertyController.class);
31
+
32
+    @Autowired
33
+    public IHousePropertyService iHousePropertyService;
34
+
35
+
36
+    @ApiOperation(value = "wx-获取帮我找房问卷问题表", notes = "admin-获取帮我找房问卷问题表")
37
+    @RequestMapping(value="/wx/houseProperty",method= RequestMethod.GET)
38
+    public ResponseBean housePropertyList(){
39
+        return ResponseBean.success(iHousePropertyService.list());
40
+    }
41
+
42
+    /**
43
+     * 保存对象
44
+     * @param houseProperty 实体对象
45
+     * @return
46
+     */
47
+    @RequestMapping(value="/houseProperty",method= RequestMethod.POST)
48
+    public ResponseBean housePropertyAdd(@RequestBody HouseProperty houseProperty){
49
+        ResponseBean responseBean = new ResponseBean();
50
+        try {
51
+            if (iHousePropertyService.save(houseProperty)){
52
+                responseBean.addSuccess(houseProperty);
53
+            }else {
54
+                responseBean.addError("fail");
55
+            }
56
+        }catch (Exception e){
57
+            e.printStackTrace();
58
+            logger.error("housePropertyAdd -=- {}",e.toString());
59
+            responseBean.addError(e.getMessage());
60
+        }
61
+        return responseBean;
62
+    }
63
+
64
+    /**
65
+     * 根据id删除对象
66
+     * @param id  实体ID
67
+     */
68
+    @ResponseBody
69
+    @RequestMapping(value="/houseProperty/{id}", method= RequestMethod.DELETE)
70
+    public ResponseBean housePropertyDelete(@PathVariable Integer id){
71
+        ResponseBean responseBean = new ResponseBean();
72
+        try {
73
+            if(iHousePropertyService.removeById(id)){
74
+                responseBean.addSuccess("success");
75
+            }else {
76
+                responseBean.addError("fail");
77
+            }
78
+        }catch (Exception e){
79
+            e.printStackTrace();
80
+            logger.error("housePropertyDelete -=- {}",e.toString());
81
+            responseBean.addError(e.getMessage());
82
+        }
83
+        return responseBean;
84
+    }
85
+
86
+    /**
87
+     * 修改对象
88
+     * @param id  实体ID
89
+     * @param houseProperty 实体对象
90
+     * @return
91
+     */
92
+    @RequestMapping(value="/houseProperty/{id}",method= RequestMethod.PUT)
93
+    public ResponseBean housePropertyUpdate(@PathVariable Integer id,
94
+                                        @RequestBody HouseProperty houseProperty){
95
+        ResponseBean responseBean = new ResponseBean();
96
+        try {
97
+            if (iHousePropertyService.updateById(houseProperty)){
98
+                responseBean.addSuccess(houseProperty);
99
+            }else {
100
+                responseBean.addError("fail");
101
+            }
102
+        }catch (Exception e){
103
+            e.printStackTrace();
104
+            logger.error("housePropertyUpdate -=- {}",e.toString());
105
+            responseBean.addError(e.getMessage());
106
+        }
107
+        return responseBean;
108
+    }
109
+
110
+    /**
111
+     * 根据id查询对象
112
+     * @param id  实体ID
113
+     */
114
+    @RequestMapping(value="/houseProperty/{id}",method= RequestMethod.GET)
115
+    public ResponseBean housePropertyGet(@PathVariable Integer id){
116
+        ResponseBean responseBean = new ResponseBean();
117
+        try {
118
+            responseBean.addSuccess(iHousePropertyService.getById(id));
119
+        }catch (Exception e){
120
+            e.printStackTrace();
121
+            logger.error("housePropertyDelete -=- {}",e.toString());
122
+            responseBean.addError(e.getMessage());
123
+        }
124
+        return responseBean;
125
+    }
126
+}

+ 169
- 0
src/main/java/com/yunzhi/marketing/xlk/controller/InstitutionController.java 查看文件

@@ -0,0 +1,169 @@
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.common.StringUtils;
9
+import com.yunzhi.marketing.xlk.dto.InstitutionDTO;
10
+import com.yunzhi.marketing.xlk.entity.Institution;
11
+import com.yunzhi.marketing.xlk.service.IInstitutionService;
12
+import io.swagger.annotations.Api;
13
+import io.swagger.annotations.ApiOperation;
14
+import org.slf4j.Logger;
15
+import org.slf4j.LoggerFactory;
16
+import org.springframework.beans.BeanUtils;
17
+import org.springframework.beans.factory.annotation.Autowired;
18
+import org.springframework.web.bind.annotation.PathVariable;
19
+import org.springframework.web.bind.annotation.RequestBody;
20
+import org.springframework.web.bind.annotation.RequestHeader;
21
+import org.springframework.web.bind.annotation.RequestMapping;
22
+import org.springframework.web.bind.annotation.RequestMethod;
23
+import org.springframework.web.bind.annotation.RequestParam;
24
+import org.springframework.web.bind.annotation.ResponseBody;
25
+import org.springframework.web.bind.annotation.RestController;
26
+
27
+import javax.servlet.http.HttpServletRequest;
28
+import javax.validation.Valid;
29
+import java.time.LocalDateTime;
30
+import java.util.List;
31
+
32
+/**
33
+ * <p>
34
+    * 组织结构表  前端控制器
35
+    * </p>
36
+ *
37
+ * @author jobob
38
+ * @since 2021-06-22
39
+ */
40
+@RestController
41
+@RequestMapping("/api")
42
+@Api(value = "xlk-组织结构相关接口", tags = "xlk-组织结构相关接口")
43
+public class InstitutionController extends BaseController {
44
+
45
+    private final Logger logger = LoggerFactory.getLogger(InstitutionController.class);
46
+
47
+    @Autowired
48
+    public IInstitutionService iInstitutionService;
49
+
50
+
51
+    /**
52
+     * 分页查询列表
53
+     * @param institutionCode
54
+     * @return
55
+     */
56
+    @ApiOperation(value = "admin-组织机构列表查询", notes = "admin-组织机构列表查询")
57
+    @RequestMapping(value="/admin/institution/list",method= RequestMethod.GET)
58
+    public ResponseBean institutionList(@RequestParam(value ="institutionCode",required = false) String institutionCode,
59
+                                        @RequestHeader("authorization") String token, HttpServletRequest request){
60
+        ResponseBean responseBean = new ResponseBean();
61
+        try {
62
+            LambdaQueryWrapper<Institution> queryWrapper = new LambdaQueryWrapper<>();
63
+            queryWrapper.eq(Institution::getOrgId,getOrgId(request));
64
+            if (StringUtils.isEmpty(institutionCode)){
65
+                queryWrapper.eq(Institution::getType,1);
66
+            }else {
67
+                Institution institution = iInstitutionService.getById(institutionCode);
68
+                queryWrapper.eq(Institution::getType,institution.getType() + 1);
69
+                queryWrapper.likeRight(Institution::getInstitutionCode,institution.getInstitutionCode());
70
+            }
71
+            queryWrapper.orderByDesc(Institution::getCreateDate);
72
+
73
+            List<Institution> list = iInstitutionService.list(queryWrapper);
74
+            responseBean.addSuccess(list);
75
+        }catch (Exception e){
76
+            e.printStackTrace();
77
+            logger.error("institutionList -=- {}",e.toString());
78
+            responseBean.addError(e.getMessage());
79
+        }
80
+        return responseBean;
81
+    }
82
+
83
+    /**
84
+     * 保存对象
85
+     * @param institutionDTO 实体对象
86
+     * @return
87
+     */
88
+    @ApiOperation(value = "admin-组织机构列表查询", notes = "admin-组织机构列表查询")
89
+    @RequestMapping(value="/institution/save",method= RequestMethod.POST)
90
+    public ResponseBean institutionAdd(@RequestBody @Valid InstitutionDTO institutionDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
91
+        ResponseBean responseBean = new ResponseBean();
92
+        try {
93
+            Integer orgId = getOrgId(request);
94
+            Institution institution = new Institution();
95
+            BeanUtils.copyProperties(institutionDTO,institution);
96
+            institution.setOrgId(orgId);
97
+            institution.setCreateDate(LocalDateTime.now());
98
+            responseBean = iInstitutionService.saveInstitution(institution);
99
+        }catch (Exception e){
100
+            e.printStackTrace();
101
+            logger.error("institutionAdd -=- {}",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="/institution/{id}", method= RequestMethod.DELETE)
114
+    public ResponseBean institutionDelete(@PathVariable String id, @RequestHeader("authorization") String token, HttpServletRequest request){
115
+        ResponseBean responseBean = new ResponseBean();
116
+        try {
117
+            responseBean = iInstitutionService.deleteByinstitutionCode(id);
118
+        }catch (Exception e){
119
+            e.printStackTrace();
120
+            logger.error("institutionDelete -=- {}",e.toString());
121
+            responseBean.addError(e.getMessage());
122
+        }
123
+        return responseBean;
124
+    }
125
+
126
+    /**
127
+     * 修改对象
128
+     * @param id  实体ID
129
+     * @param institutionDTO 实体对象
130
+     * @return
131
+     */
132
+    @ApiOperation(value = "admin-组织机构列表修改", notes = "admin-组织机构列表修改")
133
+    @RequestMapping(value="/institution/{id}",method= RequestMethod.PUT)
134
+    public ResponseBean institutionUpdate(@PathVariable String id,
135
+                                          @RequestBody InstitutionDTO institutionDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
136
+        ResponseBean responseBean = new ResponseBean();
137
+        try {
138
+            Integer orgId = getOrgId(request);
139
+            Institution institution = new Institution();
140
+            BeanUtils.copyProperties(institutionDTO,institution);
141
+            institution.setOrgId(orgId);
142
+            institution.setInstitutionCode(id);
143
+             responseBean = iInstitutionService.updateInstitution(institution);
144
+        }catch (Exception e){
145
+            e.printStackTrace();
146
+            logger.error("institutionUpdate -=- {}",e.toString());
147
+            responseBean.addError(e.getMessage());
148
+        }
149
+        return responseBean;
150
+    }
151
+
152
+    /**
153
+     * 根据id查询对象
154
+     * @param id  实体ID
155
+     */
156
+    @ApiOperation(value = "admin-组织机构列表查询详细", notes = "组织机构列表查询详细")
157
+    @RequestMapping(value="/institution/{id}",method= RequestMethod.GET)
158
+    public ResponseBean institutionGet(@PathVariable String id, @RequestHeader("authorization") String token, HttpServletRequest request){
159
+        ResponseBean responseBean = new ResponseBean();
160
+        try {
161
+            responseBean.addSuccess(iInstitutionService.getById(id));
162
+        }catch (Exception e){
163
+            e.printStackTrace();
164
+            logger.error("institutionDelete -=- {}",e.toString());
165
+            responseBean.addError(e.getMessage());
166
+        }
167
+        return responseBean;
168
+    }
169
+}

+ 214
- 0
src/main/java/com/yunzhi/marketing/xlk/controller/SearchHouseController.java 查看文件

@@ -0,0 +1,214 @@
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.common.StringUtils;
9
+import com.yunzhi.marketing.entity.TaBuilding;
10
+import com.yunzhi.marketing.entity.TaPerson;
11
+import com.yunzhi.marketing.service.ITaBuildingService;
12
+import com.yunzhi.marketing.service.ITaPersonService;
13
+import com.yunzhi.marketing.xlk.dto.SearchHouseDTO;
14
+import com.yunzhi.marketing.xlk.dto.SearchHouseReplayDTO;
15
+import com.yunzhi.marketing.xlk.entity.Curriculum;
16
+import com.yunzhi.marketing.xlk.entity.SearchHouse;
17
+import com.yunzhi.marketing.xlk.service.ISearchHouseService;
18
+import com.yunzhi.marketing.xlk.vo.SearchHouseVO;
19
+import io.swagger.annotations.Api;
20
+import io.swagger.annotations.ApiOperation;
21
+import org.slf4j.Logger;
22
+import org.slf4j.LoggerFactory;
23
+import org.springframework.beans.BeanUtils;
24
+import org.springframework.beans.factory.annotation.Autowired;
25
+import org.springframework.web.bind.annotation.PathVariable;
26
+import org.springframework.web.bind.annotation.RequestBody;
27
+import org.springframework.web.bind.annotation.RequestHeader;
28
+import org.springframework.web.bind.annotation.RequestMapping;
29
+import org.springframework.web.bind.annotation.RequestMethod;
30
+import org.springframework.web.bind.annotation.RequestParam;
31
+import org.springframework.web.bind.annotation.ResponseBody;
32
+import org.springframework.web.bind.annotation.RestController;
33
+
34
+import javax.servlet.http.HttpServletRequest;
35
+import java.time.LocalDateTime;
36
+import java.util.List;
37
+
38
+/**
39
+ * <p>
40
+    * 帮我找房  前端控制器
41
+    * </p>
42
+ *
43
+ * @author jobob
44
+ * @since 2021-05-19
45
+ */
46
+@RestController
47
+@RequestMapping("/api")
48
+@Api(value = "帮我找房", tags = "xlk-帮我找房")
49
+public class SearchHouseController extends BaseController {
50
+
51
+    private final Logger logger = LoggerFactory.getLogger(SearchHouseController.class);
52
+
53
+    @Autowired
54
+    public ISearchHouseService iSearchHouseService;
55
+
56
+    @Autowired
57
+    public ITaPersonService taPersonService;
58
+
59
+    @Autowired
60
+    private ITaBuildingService taBuildingService;
61
+
62
+    /**
63
+     * 分页查询列表
64
+     * @param pageNum
65
+     * @param pageSize
66
+     * @return
67
+     */
68
+    @ApiOperation(value = "admin-获取帮我找房列表", notes = "admin-获取帮我找房列表")
69
+    @RequestMapping(value="/admin/searchHouse",method= RequestMethod.GET)
70
+    public ResponseBean searchHouseList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
71
+                                        @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
72
+                                        @RequestHeader("authorization") String token, HttpServletRequest request){
73
+        ResponseBean responseBean = new ResponseBean();
74
+        try {
75
+            SearchHouse searchHouse = new SearchHouse();
76
+            searchHouse.setOrgId(getOrgId(request));
77
+            //使用分页插件
78
+            IPage<SearchHouseVO> pg = new Page<>(pageNum, pageSize);
79
+            responseBean = iSearchHouseService.selectSearchHouseList(pg,searchHouse);
80
+        }catch (Exception e){
81
+            e.printStackTrace();
82
+            logger.error("searchHouseList -=- {}",e.toString());
83
+            responseBean.addError(e.getMessage());
84
+        }
85
+        return responseBean;
86
+    }
87
+
88
+    /**
89
+     * 保存对象
90
+     * @param searchHouseDTO 实体对象
91
+     * @return
92
+     */
93
+    @ApiOperation(value = "wx-保存帮我找房需求", notes = "wx-保存帮我找房需求")
94
+    @RequestMapping(value="/wx/searchHouse",method= RequestMethod.POST)
95
+    public ResponseBean searchHouseAdd(@RequestBody SearchHouseDTO searchHouseDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
96
+        ResponseBean responseBean = new ResponseBean();
97
+        String openid = getOpenId(request);
98
+        Integer orgId = getOrgId(request);
99
+        List<TaPerson> persons = taPersonService.getPersonsByOpenId(openid);
100
+        if (null == persons || persons.size() == 0) {
101
+            return ResponseBean.error("当前账户信息异常, 清除缓存重试", ResponseBean.ERROR_UNAVAILABLE);
102
+        }
103
+        TaPerson person = persons.get(0);
104
+        try {
105
+            SearchHouse searchHouse = new SearchHouse();
106
+            BeanUtils.copyProperties(searchHouseDTO,searchHouse);
107
+            searchHouse.setPersonId(person.getPersonId());
108
+            searchHouse.setOrgId(orgId);
109
+            searchHouse.setCreatedTime(LocalDateTime.now());
110
+            if (iSearchHouseService.save(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);
129
+            }else {
130
+                responseBean.addError("fail");
131
+            }
132
+        }catch (Exception e){
133
+            e.printStackTrace();
134
+            logger.error("searchHouseAdd -=- {}",e.toString());
135
+            responseBean.addError(e.getMessage());
136
+        }
137
+        return responseBean;
138
+    }
139
+
140
+    /**
141
+     * 修改对象
142
+     * @param id  实体ID
143
+     * @param searchHouse 实体对象
144
+     * @return
145
+     */
146
+    @ApiOperation(value = "admin-修改帮我找房需求", notes = "admin-修改帮我找房需求")
147
+    @RequestMapping(value="/admin/searchHouse/{id}",method= RequestMethod.PUT)
148
+    public ResponseBean searchHouseUpdate(@PathVariable String id,
149
+                                          @RequestBody SearchHouse searchHouse, @RequestHeader("authorization") String token, HttpServletRequest request){
150
+        ResponseBean responseBean = new ResponseBean();
151
+        try {
152
+            searchHouse.setId(id);
153
+            if (iSearchHouseService.updateById(searchHouse)){
154
+                responseBean.addSuccess(searchHouse);
155
+            }else {
156
+                responseBean.addError("fail");
157
+            }
158
+        }catch (Exception e){
159
+            e.printStackTrace();
160
+            logger.error("searchHouseUpdate -=- {}",e.toString());
161
+            responseBean.addError(e.getMessage());
162
+        }
163
+        return responseBean;
164
+    }
165
+
166
+    /**
167
+     * 根据id查询对象
168
+     * @param id  实体ID
169
+     */
170
+    @ApiOperation(value = "admin-根据id查询帮我找房需求详情", notes = "admin-根据id查询帮我找房需求详情")
171
+    @RequestMapping(value="/admin/searchHouse/{id}",method= RequestMethod.GET)
172
+    public ResponseBean searchHouseGet(@PathVariable String id, @RequestHeader("authorization") String token, HttpServletRequest request){
173
+        ResponseBean responseBean = new ResponseBean();
174
+        try {
175
+            responseBean.addSuccess(iSearchHouseService.selectSearchHouseDetail(id));
176
+        }catch (Exception e){
177
+            e.printStackTrace();
178
+            logger.error("searchHouseDelete -=- {}",e.toString());
179
+            responseBean.addError(e.getMessage());
180
+        }
181
+        return responseBean;
182
+    }
183
+
184
+
185
+    /**
186
+     * 帮我找房回访接口
187
+     * @param id  实体ID
188
+     * @param searchHouseReplayDTO 实体对象
189
+     * @return
190
+     */
191
+    @ApiOperation(value = "admin-帮我找房回访接口", notes = "admin-帮我找房回访接口")
192
+    @RequestMapping(value="/admin/reply/{id}",method= RequestMethod.PUT)
193
+    public ResponseBean searchHouseReply(@PathVariable String id,
194
+                                         @RequestBody SearchHouseReplayDTO searchHouseReplayDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
195
+        ResponseBean responseBean = new ResponseBean();
196
+        try {
197
+            SearchHouse searchHouse = new SearchHouse();
198
+            searchHouse.setId(id);
199
+            searchHouse.setAuditRemark(searchHouseReplayDTO.getAuditRemark());
200
+            searchHouse.setStatus(searchHouseReplayDTO.getStatus());
201
+            searchHouse.setUpdatedTime(LocalDateTime.now());
202
+            if (iSearchHouseService.updateById(searchHouse)){
203
+                responseBean.addSuccess(searchHouse);
204
+            }else {
205
+                responseBean.addError("fail");
206
+            }
207
+        }catch (Exception e){
208
+            e.printStackTrace();
209
+            logger.error("searchHouseUpdate -=- {}",e.toString());
210
+            responseBean.addError(e.getMessage());
211
+        }
212
+        return responseBean;
213
+    }
214
+}

+ 166
- 0
src/main/java/com/yunzhi/marketing/xlk/controller/TaPolicyTypeController.java 查看文件

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

+ 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
+}

+ 229
- 0
src/main/java/com/yunzhi/marketing/xlk/controller/VideoController.java 查看文件

@@ -0,0 +1,229 @@
1
+package com.yunzhi.marketing.xlk.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5
+import com.baomidou.mybatisplus.core.metadata.IPage;
6
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7
+import com.yunzhi.marketing.base.BaseController;
8
+import com.yunzhi.marketing.base.ResponseBean;
9
+import com.yunzhi.marketing.common.StringUtils;
10
+import com.yunzhi.marketing.entity.TaPerson;
11
+import com.yunzhi.marketing.xlk.dto.SearchHouseDTO;
12
+import com.yunzhi.marketing.xlk.dto.VideoDTO;
13
+import com.yunzhi.marketing.xlk.entity.Brand;
14
+import com.yunzhi.marketing.xlk.entity.SearchHouse;
15
+import com.yunzhi.marketing.xlk.entity.Video;
16
+import com.yunzhi.marketing.xlk.service.IVideoService;
17
+import io.swagger.annotations.Api;
18
+import io.swagger.annotations.ApiOperation;
19
+import org.slf4j.Logger;
20
+import org.slf4j.LoggerFactory;
21
+import org.springframework.beans.BeanUtils;
22
+import org.springframework.beans.factory.annotation.Autowired;
23
+import org.springframework.web.bind.annotation.GetMapping;
24
+import org.springframework.web.bind.annotation.PathVariable;
25
+import org.springframework.web.bind.annotation.RequestBody;
26
+import org.springframework.web.bind.annotation.RequestHeader;
27
+import org.springframework.web.bind.annotation.RequestMapping;
28
+import org.springframework.web.bind.annotation.RequestMethod;
29
+import org.springframework.web.bind.annotation.RequestParam;
30
+import org.springframework.web.bind.annotation.ResponseBody;
31
+import org.springframework.web.bind.annotation.RestController;
32
+
33
+import javax.servlet.http.HttpServletRequest;
34
+import java.time.LocalDateTime;
35
+import java.util.List;
36
+
37
+/**
38
+ * <p>
39
+    * 视频表  前端控制器
40
+    * </p>
41
+ *
42
+ * @author jobob
43
+ * @since 2021-05-18
44
+ */
45
+@RestController
46
+@RequestMapping("/api")
47
+@Api(value = "视频表", tags = "xlk-视频表")
48
+public class VideoController extends BaseController {
49
+
50
+    private final Logger logger = LoggerFactory.getLogger(VideoController.class);
51
+
52
+    @Autowired
53
+    public IVideoService iVideoService;
54
+
55
+
56
+    /**
57
+     * 分页查询列表
58
+     * @param pageNum
59
+     * @param pageSize
60
+     * @return
61
+     */
62
+    @ApiOperation(value = "admin-视频列表", notes = "admin-视频列表")
63
+    @RequestMapping(value="/admin/video",method= RequestMethod.GET)
64
+    public ResponseBean videoList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
65
+                                  @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
66
+                                  @RequestParam(value ="name",required = false) String name,
67
+                                  @RequestHeader("authorization") String token, HttpServletRequest request){
68
+        ResponseBean responseBean = new ResponseBean();
69
+        try {
70
+            //使用分页插件
71
+		    IPage<Video> pg = new Page<>(pageNum, pageSize);
72
+            LambdaQueryWrapper<Video> queryWrapper = new LambdaQueryWrapper<>();
73
+            queryWrapper.eq(!StringUtils.isEmpty(name),Video::getName,name);
74
+            queryWrapper.eq(Video::getOrgId,getOrgId(request));
75
+            queryWrapper.orderByDesc(Video::getWeight);
76
+            queryWrapper.orderByDesc(Video::getCreatedTime);
77
+
78
+            IPage<Video> result = iVideoService.page(pg, queryWrapper);
79
+            responseBean.addSuccess(result);
80
+        }catch (Exception e){
81
+            e.printStackTrace();
82
+            logger.error("videoList -=- {}",e.toString());
83
+            responseBean.addError(e.getMessage());
84
+        }
85
+        return responseBean;
86
+    }
87
+
88
+    /**
89
+     * 保存对象
90
+     * @param videoDTO 实体对象
91
+     * @return
92
+     */
93
+    @ApiOperation(value = "admin-添加视频", notes = "admin-添加视频")
94
+    @RequestMapping(value="/admin/video",method= RequestMethod.POST)
95
+    public ResponseBean videoAdd(@RequestBody VideoDTO videoDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
96
+        ResponseBean responseBean = new ResponseBean();
97
+        try {
98
+            Video video = new Video();
99
+            BeanUtils.copyProperties(videoDTO,video);
100
+            video.setCreatedTime(LocalDateTime.now());
101
+            video.setCreatedBy(getUserId(request));
102
+            video.setOrgId(getOrgId(request));
103
+            if (iVideoService.save(video)){
104
+                responseBean.addSuccess(video);
105
+            }else {
106
+                responseBean.addError("fail");
107
+            }
108
+        }catch (Exception e){
109
+            e.printStackTrace();
110
+            logger.error("videoAdd -=- {}",e.toString());
111
+            responseBean.addError(e.getMessage());
112
+        }
113
+        return responseBean;
114
+    }
115
+
116
+    /**
117
+     * 根据id删除对象
118
+     * @param id  实体ID
119
+     */
120
+    @ApiOperation(value = "admin-根据id删除视频", notes = "admin-根据id删除视频")
121
+    @ResponseBody
122
+    @RequestMapping(value="/admin/video/{id}", method= RequestMethod.DELETE)
123
+    public ResponseBean videoDelete(@PathVariable String id,@RequestHeader("authorization") String token){
124
+        ResponseBean responseBean = new ResponseBean();
125
+        try {
126
+            if(iVideoService.removeById(id)){
127
+                responseBean.addSuccess("success");
128
+            }else {
129
+                responseBean.addError("fail");
130
+            }
131
+        }catch (Exception e){
132
+            e.printStackTrace();
133
+            logger.error("videoDelete -=- {}",e.toString());
134
+            responseBean.addError(e.getMessage());
135
+        }
136
+        return responseBean;
137
+    }
138
+
139
+    /**
140
+     * 修改对象
141
+     * @param id  实体ID
142
+     * @param videoDTO 实体对象
143
+     * @return
144
+     */
145
+    @ApiOperation(value = "admin-根据id修改视频", notes = "admin-根据id修改视频")
146
+    @RequestMapping(value="/admin/video/{id}",method= RequestMethod.PUT)
147
+    public ResponseBean videoUpdate(@PathVariable String id,
148
+                                        @RequestBody VideoDTO videoDTO,@RequestHeader("authorization") String token){
149
+        ResponseBean responseBean = new ResponseBean();
150
+        try {
151
+            Video video = new Video();
152
+            BeanUtils.copyProperties(videoDTO,video);
153
+            video.setVideoId(id);
154
+            if (iVideoService.updateById(video)){
155
+                responseBean.addSuccess(video);
156
+            }else {
157
+                responseBean.addError("fail");
158
+            }
159
+        }catch (Exception e){
160
+            e.printStackTrace();
161
+            logger.error("videoUpdate -=- {}",e.toString());
162
+            responseBean.addError(e.getMessage());
163
+        }
164
+        return responseBean;
165
+    }
166
+
167
+    /**
168
+     * 根据id查询对象
169
+     * @param id  实体ID
170
+     */
171
+    @ApiOperation(value = "admin-根据id查询详情", notes = "admin-根据id查询详情")
172
+    @RequestMapping(value="/admin/video/{id}",method= RequestMethod.GET)
173
+    public ResponseBean videoGet(@PathVariable String id,@RequestHeader("authorization") String token){
174
+        ResponseBean responseBean = new ResponseBean();
175
+        try {
176
+            responseBean.addSuccess(iVideoService.getById(id));
177
+        }catch (Exception e){
178
+            e.printStackTrace();
179
+            logger.error("videoDelete -=- {}",e.toString());
180
+            responseBean.addError(e.getMessage());
181
+        }
182
+        return responseBean;
183
+    }
184
+
185
+    /**
186
+     * 修改对象
187
+     * @param id  实体ID
188
+     * @return
189
+     */
190
+    @ApiOperation(value = "admin-根据id发布或取消发布视频", notes = "admin-根据id发布或取消发布视频")
191
+    @RequestMapping(value="/admin/publish/{id}",method= RequestMethod.PUT)
192
+    public ResponseBean publishVideo(@PathVariable String id,@RequestHeader("authorization") String token){
193
+        ResponseBean responseBean = new ResponseBean();
194
+        try {
195
+            Video video = iVideoService.getById(id);
196
+            video.setIsPublish(!video.getIsPublish());
197
+            if (iVideoService.updateById(video)){
198
+                responseBean.addSuccess(video);
199
+            }else {
200
+                responseBean.addError("fail");
201
+            }
202
+        }catch (Exception e){
203
+            e.printStackTrace();
204
+            logger.error("videoUpdate -=- {}",e.toString());
205
+            responseBean.addError(e.getMessage());
206
+        }
207
+        return responseBean;
208
+    }
209
+
210
+
211
+    /**
212
+     * 保存对象
213
+     * @param
214
+     * @return
215
+     */
216
+    @ApiOperation(value = "wx-查询视频详情", notes = "wx-查询视频详情")
217
+    @GetMapping(value="/wx/detail/{id}")
218
+    public ResponseBean searchHouseAdd(@PathVariable String id, @RequestHeader("authorization") String token, HttpServletRequest request){
219
+        Video video = iVideoService.getById(id);
220
+        if (null == video.getLookNum()){
221
+            video.setLookNum(1);
222
+        }else {
223
+            video.setLookNum(video.getLookNum() + 1);
224
+        }
225
+        iVideoService.updateById(video);
226
+        return ResponseBean.success(video);
227
+    }
228
+
229
+}

+ 45
- 0
src/main/java/com/yunzhi/marketing/xlk/dto/BrandDTO.java 查看文件

@@ -0,0 +1,45 @@
1
+package com.yunzhi.marketing.xlk.dto;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import lombok.Data;
8
+import lombok.EqualsAndHashCode;
9
+import lombok.experimental.Accessors;
10
+
11
+import java.io.Serializable;
12
+import java.time.LocalDateTime;
13
+
14
+/**
15
+ * <p>
16
+ * 品牌开发商表 
17
+ * </p>
18
+ *
19
+ * @author jobob
20
+ * @since 2021-05-13
21
+ */
22
+@Data
23
+public class BrandDTO implements Serializable {
24
+
25
+    /**
26
+     * 索引字母
27
+     */
28
+    @TableField("Index_letter")
29
+    private String indexLetter;
30
+
31
+    /**
32
+     * 品牌商名称
33
+     */
34
+    private String brandName;
35
+
36
+    /**
37
+     * 品牌商宣传图
38
+     */
39
+    private String brandImg;
40
+
41
+    /**
42
+     * 品牌商简介
43
+     */
44
+    private String brandRemark;
45
+}

+ 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
+}

+ 72
- 0
src/main/java/com/yunzhi/marketing/xlk/dto/CurriculumDTO.java 查看文件

@@ -0,0 +1,72 @@
1
+package com.yunzhi.marketing.xlk.dto;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import lombok.Data;
8
+import lombok.EqualsAndHashCode;
9
+import lombok.experimental.Accessors;
10
+
11
+import java.time.LocalDateTime;
12
+
13
+/**
14
+ * <p>
15
+ * 课程表 
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2021-05-18
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@TableName("xlk_curriculum")
25
+public class CurriculumDTO implements java.io.Serializable {
26
+
27
+    /**
28
+     * 参与对象
29
+     */
30
+    private String roleId;
31
+
32
+    /**
33
+     * 主图
34
+     */
35
+    private String curriculumImg;
36
+
37
+    /**
38
+     * 标题
39
+     */
40
+    private String name;
41
+
42
+    /**
43
+     * 简介
44
+     */
45
+    private String remark;
46
+
47
+    /**
48
+     * 详情类型:0富文本或者1视频
49
+     */
50
+    private Integer type;
51
+
52
+    /**
53
+     * 视频地址
54
+     */
55
+    private String curriculumUrl;
56
+
57
+    /**
58
+     * 富文本内容
59
+     */
60
+    private String content;
61
+
62
+    /**
63
+     * 权重
64
+     */
65
+    @TableField("WEIGHT")
66
+    private Integer weight;
67
+
68
+    /**
69
+     * 是否发布
70
+     */
71
+    private Integer isPublish;
72
+}

+ 38
- 0
src/main/java/com/yunzhi/marketing/xlk/dto/InstitutionDTO.java 查看文件

@@ -0,0 +1,38 @@
1
+package com.yunzhi.marketing.xlk.dto;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableName;
4
+import lombok.Data;
5
+import lombok.EqualsAndHashCode;
6
+import lombok.experimental.Accessors;
7
+
8
+import javax.validation.constraints.NotBlank;
9
+import java.io.Serializable;
10
+import java.time.LocalDateTime;
11
+
12
+/**
13
+ * <p>
14
+ * 组织结构表 
15
+ * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2021-06-22
19
+ */
20
+@Data
21
+@EqualsAndHashCode(callSuper = false)
22
+@Accessors(chain = true)
23
+@TableName("xlk_institution")
24
+public class InstitutionDTO implements Serializable {
25
+
26
+    private static final long serialVersionUID = 1L;
27
+
28
+    /**
29
+     * 组织名称
30
+     */
31
+    private String institutionName;
32
+
33
+    /**
34
+     * 组织代码
35
+     */
36
+    @NotBlank(message = "组织代码不能为空")
37
+    private String institutionId;
38
+}

+ 69
- 0
src/main/java/com/yunzhi/marketing/xlk/dto/SearchHouseDTO.java 查看文件

@@ -0,0 +1,69 @@
1
+package com.yunzhi.marketing.xlk.dto;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import lombok.Data;
8
+import lombok.EqualsAndHashCode;
9
+import lombok.experimental.Accessors;
10
+
11
+import java.io.Serializable;
12
+import java.time.LocalDateTime;
13
+
14
+/**
15
+ * <p>
16
+ * 帮我找房 
17
+ * </p>
18
+ *
19
+ * @author jobob
20
+ * @since 2021-05-19
21
+ */
22
+@Data
23
+@EqualsAndHashCode(callSuper = false)
24
+@Accessors(chain = true)
25
+@TableName("xlk_search_house")
26
+public class SearchHouseDTO implements Serializable {
27
+
28
+    private static final long serialVersionUID = 1L;
29
+
30
+    /**
31
+     * 意向区域
32
+     */
33
+    private String intentArea;
34
+
35
+    /**
36
+     * 总预算范围最小价格
37
+     */
38
+    private String minPrice;
39
+
40
+    /**
41
+     * 总预算范围最大价格
42
+     */
43
+    private String maxPrice;
44
+    /**
45
+     * 0待回访,1已回访,2无效
46
+     */
47
+    private String status;
48
+
49
+    /**
50
+     * 审核结果
51
+     */
52
+    private String auditRemark;
53
+
54
+    /**
55
+     * 帮我找房类型 1买房2租房3海外置业4增值服务
56
+     */
57
+    private Integer type;
58
+
59
+    /**
60
+     * 备注
61
+     */
62
+    private String remark;
63
+
64
+    /**
65
+     * 问卷json字符串
66
+     */
67
+    private String questionnaire;
68
+
69
+}

+ 37
- 0
src/main/java/com/yunzhi/marketing/xlk/dto/SearchHouseReplayDTO.java 查看文件

@@ -0,0 +1,37 @@
1
+package com.yunzhi.marketing.xlk.dto;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import lombok.Data;
8
+import lombok.EqualsAndHashCode;
9
+import lombok.experimental.Accessors;
10
+
11
+import java.io.Serializable;
12
+import java.time.LocalDateTime;
13
+
14
+/**
15
+ * <p>
16
+ * 帮我找房 
17
+ * </p>
18
+ *
19
+ * @author jobob
20
+ * @since 2021-06-15
21
+ */
22
+@Data
23
+@EqualsAndHashCode(callSuper = false)
24
+@Accessors(chain = true)
25
+@TableName("xlk_search_house")
26
+public class SearchHouseReplayDTO implements Serializable {
27
+
28
+    /**
29
+     * 0待回访,1已回访,2无效
30
+     */
31
+    private String status;
32
+
33
+    /**
34
+     * 审核结果
35
+     */
36
+    private String auditRemark;
37
+}

+ 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
+}

+ 63
- 0
src/main/java/com/yunzhi/marketing/xlk/dto/VideoDTO.java 查看文件

@@ -0,0 +1,63 @@
1
+package com.yunzhi.marketing.xlk.dto;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableField;
4
+import com.baomidou.mybatisplus.annotation.TableName;
5
+import lombok.Data;
6
+import lombok.EqualsAndHashCode;
7
+import lombok.experimental.Accessors;
8
+
9
+import java.io.Serializable;
10
+import java.time.LocalDateTime;
11
+
12
+/**
13
+ * <p>
14
+ * 视频表 
15
+ * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2021-05-18
19
+ */
20
+@Data
21
+@EqualsAndHashCode(callSuper = false)
22
+@Accessors(chain = true)
23
+@TableName("xlk_video")
24
+public class VideoDTO implements Serializable {
25
+    /**
26
+     * 所属城市
27
+     */
28
+    @TableField("CITY_ID")
29
+    private Integer cityId;
30
+
31
+    /**
32
+     * 所属楼盘
33
+     */
34
+    @TableField("BUILDING_ID")
35
+    private String buildingId;
36
+
37
+    /**
38
+     * 主图
39
+     */
40
+    private String videImg;
41
+
42
+    /**
43
+     * 视频标题
44
+     */
45
+    private String name;
46
+
47
+    /**
48
+     * 视频简介
49
+     */
50
+    private String remark;
51
+
52
+    /**
53
+     * 视频地址
54
+     */
55
+    private String videoUrl;
56
+
57
+    /**
58
+     * 权重
59
+     */
60
+    @TableField("WEIGHT")
61
+    private Integer weight;
62
+
63
+}

+ 84
- 0
src/main/java/com/yunzhi/marketing/xlk/entity/Brand.java 查看文件

@@ -0,0 +1,84 @@
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 java.time.LocalDateTime;
7
+import com.baomidou.mybatisplus.annotation.TableField;
8
+import java.io.Serializable;
9
+import lombok.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+
13
+/**
14
+ * <p>
15
+ * 品牌开发商表 
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2021-05-13
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@TableName("xlk_brand")
25
+public class Brand implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    /**
30
+     * 品牌id
31
+     */
32
+    @TableId(type = IdType.UUID)
33
+    private String brandId;
34
+
35
+    /**
36
+     * 索引字母
37
+     */
38
+    @TableField("Index_letter")
39
+    private String indexLetter;
40
+
41
+    /**
42
+     * 品牌商名称
43
+     */
44
+    private String brandName;
45
+
46
+    /**
47
+     * 品牌商宣传图
48
+     */
49
+    private String brandImg;
50
+
51
+    /**
52
+     * 品牌商简介
53
+     */
54
+    private String brandRemark;
55
+
56
+    /**
57
+     * 创建人
58
+     */
59
+    @TableField("CREATED_BY")
60
+    private Integer createdBy;
61
+
62
+    /**
63
+     * 创建时间
64
+     */
65
+    @TableField("CREATED_TIME")
66
+    private LocalDateTime createdTime;
67
+
68
+    /**
69
+     * 更新人
70
+     */
71
+    @TableField("UPDATED_BY")
72
+    private Integer updatedBy;
73
+
74
+    /**
75
+     * 更新时间
76
+     */
77
+    @TableField("UPDATED_TIME")
78
+    private LocalDateTime updatedTime;
79
+
80
+    /**
81
+     * 公司id
82
+     */
83
+    private Integer orgId;
84
+}

+ 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
+}

+ 117
- 0
src/main/java/com/yunzhi/marketing/xlk/entity/Curriculum.java 查看文件

@@ -0,0 +1,117 @@
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
+
7
+import java.time.LocalDateTime;
8
+import com.baomidou.mybatisplus.annotation.TableField;
9
+import lombok.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+
13
+/**
14
+ * <p>
15
+ * 课程表 
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2021-05-18
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@TableName("xlk_curriculum")
25
+public class Curriculum implements java.io.Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    /**
30
+     * 主键
31
+     */
32
+    @TableId(type = IdType.UUID)
33
+    private String curriculumId;
34
+
35
+    /**
36
+     * 创建人
37
+     */
38
+    @TableField("CREATED_BY")
39
+    private Integer createdBy;
40
+
41
+    /**
42
+     * 创建时间
43
+     */
44
+    @TableField("CREATED_TIME")
45
+    private LocalDateTime createdTime;
46
+
47
+    /**
48
+     * 更新人
49
+     */
50
+    @TableField("UPDATED_BY")
51
+    private String updatedBy;
52
+
53
+    /**
54
+     * 更新时间
55
+     */
56
+    @TableField("UPDATED_TIME")
57
+    private LocalDateTime updatedTime;
58
+
59
+    /**
60
+     * 公司id
61
+     */
62
+    @TableField("ORG_ID")
63
+    private Integer orgId;
64
+
65
+    /**
66
+     * 参与对象
67
+     */
68
+    private String roleId;
69
+
70
+    /**
71
+     * 主图
72
+     */
73
+    private String curriculumImg;
74
+
75
+    /**
76
+     * 标题
77
+     */
78
+    private String name;
79
+
80
+    /**
81
+     * 简介
82
+     */
83
+    private String remark;
84
+
85
+    /**
86
+     * 详情类型:0富文本或者1视频
87
+     */
88
+    private Integer type;
89
+
90
+    /**
91
+     * 视频地址
92
+     */
93
+    private String curriculumUrl;
94
+
95
+    /**
96
+     * 富文本内容
97
+     */
98
+    private String content;
99
+
100
+    /**
101
+     * 权重
102
+     */
103
+    @TableField("WEIGHT")
104
+    private Integer weight;
105
+
106
+    /**
107
+     * 阅读人数
108
+     */
109
+    private Integer lookNum;
110
+
111
+    /**
112
+     * 是否发布
113
+     */
114
+    private Integer isPublish;
115
+
116
+
117
+}

+ 42
- 0
src/main/java/com/yunzhi/marketing/xlk/entity/HouseProperty.java 查看文件

@@ -0,0 +1,42 @@
1
+package com.yunzhi.marketing.xlk.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableName;
4
+import lombok.Data;
5
+import lombok.EqualsAndHashCode;
6
+import lombok.experimental.Accessors;
7
+
8
+import java.io.Serializable;
9
+
10
+/**
11
+ * <p>
12
+ * 帮我找房基本属性表 
13
+ * </p>
14
+ *
15
+ * @author jobob
16
+ * @since 2021-06-15
17
+ */
18
+@Data
19
+@EqualsAndHashCode(callSuper = false)
20
+@Accessors(chain = true)
21
+@TableName("xlk_house_property")
22
+public class HouseProperty implements Serializable {
23
+
24
+    private static final long serialVersionUID = 1L;
25
+
26
+    /**
27
+     * 属性
28
+     */
29
+    private String kind;
30
+
31
+    /**
32
+     * 属性值
33
+     */
34
+    private String propertyValue;
35
+
36
+    /**
37
+     * 属性名称
38
+     */
39
+    private String propertyName;
40
+
41
+
42
+}

+ 62
- 0
src/main/java/com/yunzhi/marketing/xlk/entity/Institution.java 查看文件

@@ -0,0 +1,62 @@
1
+package com.yunzhi.marketing.xlk.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import lombok.Data;
8
+import lombok.EqualsAndHashCode;
9
+import lombok.experimental.Accessors;
10
+
11
+import java.io.Serializable;
12
+import java.time.LocalDateTime;
13
+
14
+/**
15
+ * <p>
16
+ * 组织结构表 
17
+ * </p>
18
+ *
19
+ * @author jobob
20
+ * @since 2021-06-22
21
+ */
22
+@Data
23
+@EqualsAndHashCode(callSuper = false)
24
+@Accessors(chain = true)
25
+@TableName("xlk_institution")
26
+public class Institution implements Serializable {
27
+
28
+    private static final long serialVersionUID = 1L;
29
+
30
+    /**
31
+     * 组织结构id
32
+     */
33
+    @TableId(type = IdType.UUID)
34
+    private String institutionId;
35
+
36
+    /**
37
+     * 组织代码
38
+     */
39
+    private String institutionCode;
40
+
41
+    /**
42
+     * 组织名称
43
+     */
44
+    private String institutionName;
45
+
46
+    /**
47
+     * 公司id
48
+     */
49
+    private Integer orgId;
50
+
51
+    /**
52
+     * 1是集团,2是区域子公司 3,是城市子公司
53
+     */
54
+    private Integer type;
55
+
56
+    /**
57
+     * 创建时间
58
+     */
59
+    private LocalDateTime createDate;
60
+
61
+
62
+}

+ 100
- 0
src/main/java/com/yunzhi/marketing/xlk/entity/SearchHouse.java 查看文件

@@ -0,0 +1,100 @@
1
+package com.yunzhi.marketing.xlk.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import lombok.Data;
8
+import lombok.EqualsAndHashCode;
9
+import lombok.experimental.Accessors;
10
+
11
+import java.io.Serializable;
12
+import java.time.LocalDateTime;
13
+
14
+/**
15
+ * <p>
16
+ * 帮我找房 
17
+ * </p>
18
+ *
19
+ * @author jobob
20
+ * @since 2021-06-15
21
+ */
22
+@Data
23
+@EqualsAndHashCode(callSuper = false)
24
+@Accessors(chain = true)
25
+@TableName("xlk_search_house")
26
+public class SearchHouse implements Serializable {
27
+
28
+    private static final long serialVersionUID = 1L;
29
+
30
+    /**
31
+     * 主键
32
+     */
33
+    @TableId(type = IdType.UUID)
34
+    private String id;
35
+
36
+    /**
37
+     * 创建人小程序人员
38
+     */
39
+    private String personId;
40
+
41
+    /**
42
+     * 创建时间
43
+     */
44
+    @TableField("CREATED_TIME")
45
+    private LocalDateTime createdTime;
46
+
47
+    /**
48
+     * 更新人
49
+     */
50
+    @TableField("UPDATED_BY")
51
+    private String updatedBy;
52
+
53
+    /**
54
+     * 更新时间
55
+     */
56
+    @TableField("UPDATED_TIME")
57
+    private LocalDateTime updatedTime;
58
+
59
+    /**
60
+     * 公司id
61
+     */
62
+    @TableField("ORG_ID")
63
+    private Integer orgId;
64
+
65
+    /**
66
+     * 意向区域
67
+     */
68
+    private String intentArea;
69
+
70
+    /**
71
+     * 总预算范围最小价格
72
+     */
73
+    private String minPrice;
74
+
75
+    /**
76
+     * 总预算范围最大价格
77
+     */
78
+    private String maxPrice;
79
+
80
+
81
+    /**
82
+     * 0待回访,1已回访,2无效
83
+     */
84
+    private String status;
85
+
86
+    /**
87
+     * 审核结果
88
+     */
89
+    private String auditRemark;
90
+
91
+    /**
92
+     * 帮我找房类型 1买房2租房3海外置业4增值服务
93
+     */
94
+    private Integer type;
95
+
96
+    /**
97
+     * 备注
98
+     */
99
+    private String remark;
100
+}

+ 59
- 0
src/main/java/com/yunzhi/marketing/xlk/entity/TaPolicyType.java 查看文件

@@ -0,0 +1,59 @@
1
+package com.yunzhi.marketing.xlk.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import lombok.Data;
6
+import lombok.EqualsAndHashCode;
7
+import lombok.experimental.Accessors;
8
+
9
+import java.io.Serializable;
10
+import java.time.LocalDateTime;
11
+
12
+/**
13
+ * <p>
14
+ * 购房政策类型表 
15
+ * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2021-06-16
19
+ */
20
+@Data
21
+@EqualsAndHashCode(callSuper = false)
22
+@Accessors(chain = true)
23
+public class TaPolicyType implements Serializable {
24
+
25
+    private static final long serialVersionUID = 1L;
26
+
27
+    /**
28
+     * 购房政策类型id
29
+     */
30
+    @TableId(type = IdType.UUID)
31
+    private String policyTypeId;
32
+
33
+    /**
34
+     * 购房政策类型名称
35
+     */
36
+    private String policyTypeName;
37
+
38
+    /**
39
+     * 创建时间
40
+     */
41
+    private LocalDateTime createDate;
42
+
43
+    /**
44
+     * 公司id
45
+     */
46
+    private Integer orgId;
47
+
48
+    /** 父id */
49
+    private String parentPolicyTypeId ;
50
+    /** 徽章 */
51
+    private String badge ;
52
+    /** 图标 */
53
+    private String icon ;
54
+    /** 排序 */
55
+    private Integer sort ;
56
+    /** 颜色 */
57
+    private String color ;
58
+
59
+}

+ 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
+}

+ 115
- 0
src/main/java/com/yunzhi/marketing/xlk/entity/Video.java 查看文件

@@ -0,0 +1,115 @@
1
+package com.yunzhi.marketing.xlk.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import io.swagger.models.auth.In;
8
+import lombok.Data;
9
+import lombok.EqualsAndHashCode;
10
+import lombok.experimental.Accessors;
11
+
12
+import java.io.Serializable;
13
+import java.time.LocalDateTime;
14
+
15
+/**
16
+ * <p>
17
+ * 视频表 
18
+ * </p>
19
+ *
20
+ * @author jobob
21
+ * @since 2021-05-18
22
+ */
23
+@Data
24
+@EqualsAndHashCode(callSuper = false)
25
+@Accessors(chain = true)
26
+@TableName("xlk_video")
27
+public class Video implements Serializable {
28
+
29
+    private static final long serialVersionUID = 1L;
30
+
31
+    /**
32
+     * 主键
33
+     */
34
+    @TableId(type = IdType.UUID)
35
+    private String videoId;
36
+
37
+    /**
38
+     * 创建人
39
+     */
40
+    @TableField("CREATED_BY")
41
+    private Integer createdBy;
42
+
43
+    /**
44
+     * 创建时间
45
+     */
46
+    @TableField("CREATED_TIME")
47
+    private LocalDateTime createdTime;
48
+
49
+    /**
50
+     * 更新人
51
+     */
52
+    @TableField("UPDATED_BY")
53
+    private String updatedBy;
54
+
55
+    /**
56
+     * 更新时间
57
+     */
58
+    @TableField("UPDATED_TIME")
59
+    private LocalDateTime updatedTime;
60
+
61
+    /**
62
+     * 公司id
63
+     */
64
+    @TableField("ORG_ID")
65
+    private Integer orgId;
66
+
67
+    /**
68
+     * 所属城市
69
+     */
70
+    @TableField("CITY_ID")
71
+    private Integer cityId;
72
+
73
+    /**
74
+     * 所属楼盘
75
+     */
76
+    @TableField("BUILDING_ID")
77
+    private String buildingId;
78
+
79
+    /**
80
+     * 主图
81
+     */
82
+    private String videImg;
83
+
84
+    /**
85
+     * 视频标题
86
+     */
87
+    private String name;
88
+
89
+    /**
90
+     * 视频简介
91
+     */
92
+    private String remark;
93
+
94
+    /**
95
+     * 视频地址
96
+     */
97
+    private String videoUrl;
98
+
99
+    /**
100
+     * 权重
101
+     */
102
+    @TableField("WEIGHT")
103
+    private Integer weight;
104
+
105
+    /**
106
+     * 阅读人数
107
+     */
108
+    private Integer lookNum;
109
+
110
+    /**
111
+     * 是否发布
112
+     */
113
+    private Boolean isPublish;
114
+
115
+}

+ 18
- 0
src/main/java/com/yunzhi/marketing/xlk/mapper/BrandMapper.java 查看文件

@@ -0,0 +1,18 @@
1
+package com.yunzhi.marketing.xlk.mapper;
2
+
3
+import com.yunzhi.marketing.xlk.entity.Brand;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 品牌开发商表  Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2021-05-13
14
+ */
15
+@Mapper
16
+public interface BrandMapper extends BaseMapper<Brand> {
17
+
18
+}

+ 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
+}

+ 21
- 0
src/main/java/com/yunzhi/marketing/xlk/mapper/CurriculumMapper.java 查看文件

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

+ 18
- 0
src/main/java/com/yunzhi/marketing/xlk/mapper/HousePropertyMapper.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.HouseProperty;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 帮我找房基本属性表  Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2021-06-15
14
+ */
15
+@Mapper
16
+public interface HousePropertyMapper extends BaseMapper<HouseProperty> {
17
+
18
+}

+ 18
- 0
src/main/java/com/yunzhi/marketing/xlk/mapper/InstitutionMapper.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.Institution;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 组织结构表  Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2021-06-22
14
+ */
15
+@Mapper
16
+public interface InstitutionMapper extends BaseMapper<Institution> {
17
+
18
+}

+ 24
- 0
src/main/java/com/yunzhi/marketing/xlk/mapper/SearchHouseMapper.java 查看文件

@@ -0,0 +1,24 @@
1
+package com.yunzhi.marketing.xlk.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.yunzhi.marketing.xlk.entity.SearchHouse;
6
+import com.yunzhi.marketing.xlk.vo.SearchHouseVO;
7
+import org.apache.ibatis.annotations.Mapper;
8
+import org.apache.ibatis.annotations.Param;
9
+
10
+/**
11
+ * <p>
12
+ * 帮我找房  Mapper 接口
13
+ * </p>
14
+ *
15
+ * @author jobob
16
+ * @since 2021-05-19
17
+ */
18
+@Mapper
19
+public interface SearchHouseMapper extends BaseMapper<SearchHouse> {
20
+
21
+    IPage<SearchHouseVO> selectSearchHouseList(IPage<SearchHouseVO> pg,@Param("params") SearchHouse searchHouse);
22
+
23
+    SearchHouseVO selectSearchHouseDetail(String id);
24
+}

+ 18
- 0
src/main/java/com/yunzhi/marketing/xlk/mapper/TaPolicyTypeMapper.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.TaPolicyType;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 购房政策类型表  Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2021-06-16
14
+ */
15
+@Mapper
16
+public interface TaPolicyTypeMapper extends BaseMapper<TaPolicyType> {
17
+
18
+}

+ 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
+}

+ 18
- 0
src/main/java/com/yunzhi/marketing/xlk/mapper/VideoMapper.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.Video;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 视频表  Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2021-05-18
14
+ */
15
+@Mapper
16
+public interface VideoMapper extends BaseMapper<Video> {
17
+
18
+}

+ 16
- 0
src/main/java/com/yunzhi/marketing/xlk/service/IBrandService.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.yunzhi.marketing.xlk.service;
2
+
3
+import com.yunzhi.marketing.xlk.entity.Brand;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 品牌开发商表  服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2021-05-13
13
+ */
14
+public interface IBrandService extends IService<Brand> {
15
+
16
+}

+ 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
+}

+ 27
- 0
src/main/java/com/yunzhi/marketing/xlk/service/ICurriculumService.java 查看文件

@@ -0,0 +1,27 @@
1
+package com.yunzhi.marketing.xlk.service;
2
+
3
+import com.baomidou.mybatisplus.core.metadata.IPage;
4
+import com.yunzhi.marketing.entity.TaPerson;
5
+import com.yunzhi.marketing.xlk.entity.Curriculum;
6
+import com.baomidou.mybatisplus.extension.service.IService;
7
+
8
+/**
9
+ * <p>
10
+ * 课程表  服务类
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2021-05-18
15
+ */
16
+public interface ICurriculumService extends IService<Curriculum> {
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);
27
+}

+ 16
- 0
src/main/java/com/yunzhi/marketing/xlk/service/IHousePropertyService.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.HouseProperty;
5
+
6
+/**
7
+ * <p>
8
+ * 帮我找房基本属性表  服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2021-06-15
13
+ */
14
+public interface IHousePropertyService extends IService<HouseProperty> {
15
+
16
+}

+ 37
- 0
src/main/java/com/yunzhi/marketing/xlk/service/IInstitutionService.java 查看文件

@@ -0,0 +1,37 @@
1
+package com.yunzhi.marketing.xlk.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.yunzhi.marketing.base.ResponseBean;
5
+import com.yunzhi.marketing.xlk.entity.Institution;
6
+
7
+/**
8
+ * <p>
9
+ * 组织结构表  服务类
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2021-06-22
14
+ */
15
+public interface IInstitutionService extends IService<Institution> {
16
+
17
+    /**
18
+     * 添加组织机构
19
+     * @param institution
20
+     * @return
21
+     */
22
+    ResponseBean saveInstitution(Institution institution);
23
+
24
+    /**
25
+     * 删除组织机构
26
+     * @param id
27
+     * @return
28
+     */
29
+    ResponseBean deleteByinstitutionCode(String id);
30
+
31
+    /**
32
+     * 修改组织机构
33
+     * @param institution
34
+     * @return
35
+     */
36
+    ResponseBean updateInstitution(Institution institution);
37
+}

+ 29
- 0
src/main/java/com/yunzhi/marketing/xlk/service/ISearchHouseService.java 查看文件

@@ -0,0 +1,29 @@
1
+package com.yunzhi.marketing.xlk.service;
2
+
3
+import com.baomidou.mybatisplus.core.metadata.IPage;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+import com.yunzhi.marketing.base.ResponseBean;
6
+import com.yunzhi.marketing.xlk.entity.SearchHouse;
7
+import com.yunzhi.marketing.xlk.vo.SearchHouseVO;
8
+
9
+/**
10
+ * <p>
11
+ * 帮我找房  服务类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2021-05-19
16
+ */
17
+public interface ISearchHouseService extends IService<SearchHouse> {
18
+
19
+    /**
20
+     * 查询我的找房需求列表
21
+     *
22
+     * @param pg
23
+     * @param searchHouse
24
+     * @return
25
+     */
26
+    ResponseBean selectSearchHouseList(IPage<SearchHouseVO> pg, SearchHouse searchHouse);
27
+
28
+    SearchHouseVO selectSearchHouseDetail(String id);
29
+}

+ 16
- 0
src/main/java/com/yunzhi/marketing/xlk/service/ITaPolicyTypeService.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.TaPolicyType;
5
+
6
+/**
7
+ * <p>
8
+ * 购房政策类型表  服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2021-06-16
13
+ */
14
+public interface ITaPolicyTypeService extends IService<TaPolicyType> {
15
+
16
+}

+ 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
+}

+ 16
- 0
src/main/java/com/yunzhi/marketing/xlk/service/IVideoService.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.Video;
5
+
6
+/**
7
+ * <p>
8
+ * 视频表  服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2021-05-18
13
+ */
14
+public interface IVideoService extends IService<Video> {
15
+
16
+}

+ 20
- 0
src/main/java/com/yunzhi/marketing/xlk/service/impl/BrandServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.yunzhi.marketing.xlk.service.impl;
2
+
3
+import com.yunzhi.marketing.xlk.entity.Brand;
4
+import com.yunzhi.marketing.xlk.mapper.BrandMapper;
5
+import com.yunzhi.marketing.xlk.service.IBrandService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 品牌开发商表  服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2021-05-13
16
+ */
17
+@Service
18
+public class BrandServiceImpl extends ServiceImpl<BrandMapper, Brand> implements IBrandService {
19
+
20
+}

+ 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
+}

+ 0
- 0
src/main/java/com/yunzhi/marketing/xlk/service/impl/CurriculumServiceImpl.java 查看文件


部分文件因文件數量過多而無法顯示