Selaa lähdekoodia

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

张延森 3 vuotta sitten
vanhempi
commit
d76169d463

+ 6
- 0
pom.xml Näytä tiedosto

@@ -162,6 +162,12 @@
162 162
 				<profiles.active>dev</profiles.active>
163 163
 			</properties>
164 164
 		</profile>
165
+		<profile>
166
+			<id>test</id>
167
+			<properties>
168
+				<profiles.active>test</profiles.active>
169
+			</properties>
170
+		</profile>
165 171
 		<profile>
166 172
 			<id>prod</id>
167 173
 			<properties>

+ 5
- 0
src/main/java/com/yunzhi/marketing/common/CommConstant.java Näytä tiedosto

@@ -268,6 +268,11 @@ public class CommConstant {
268 268
      * 报备
269 269
      * */
270 270
     public static final String ENTRY_VERIFY = "verify";
271
+
272
+    /**
273
+     * 渠道报备
274
+     */
275
+    public static final String ENTRY_CHANNEL_VERIFY = "channel_verify";
271 276
     //=================  客户入口类型 end =======================
272 277
 
273 278
     /**

+ 26
- 1
src/main/java/com/yunzhi/marketing/controller/TaRecommendCustomerController.java Näytä tiedosto

@@ -52,7 +52,7 @@ import java.util.List;
52 52
  */
53 53
 @RestController
54 54
 @RequestMapping("/api")
55
-@Api(value = "项目类型", tags = "项目类型")
55
+@Api(value = "xlk - 项目类型", tags = "xlk - 项目类型")
56 56
 public class TaRecommendCustomerController extends BaseController {
57 57
 
58 58
     @Autowired
@@ -82,6 +82,31 @@ public class TaRecommendCustomerController extends BaseController {
82 82
     @Autowired
83 83
     private ITaUserService iTaUserService;
84 84
 
85
+    /**
86
+     * 驻场的客户列表
87
+     *
88
+     * @param pageNumber
89
+     * @param pageSize
90
+     * @param keywords
91
+     * @param request
92
+     * @return
93
+     */
94
+    @GetMapping("/wx/marking/customers")
95
+    @ApiOperation(value = "wx-查询驻场的客户列表", notes = "wx-查询驻场的客户列表")
96
+    @ApiImplicitParams({
97
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNumber", paramType = "query", value = "第几页"),
98
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query", value = "一页多少行"),
99
+            @ApiImplicitParam(dataTypeClass = String.class, name = "keywords", paramType = "query", value = "搜索关键字,目前仅支持姓名"),
100
+            @ApiImplicitParam(dataTypeClass = String.class, name = "buildingId", paramType = "query", value = "楼盘id必填")
101
+    })
102
+    public ResponseBean getMarkingCustList(@RequestParam int pageNumber, @RequestParam int pageSize, String keywords,@RequestParam("buildingId") String buildingId, HttpServletRequest request) {
103
+        if (pageNumber < 0 || pageSize < 0) {
104
+            return ResponseBean.error("分页参数不正确", ResponseBean.ERROR_ILLEGAL_PARAMS);
105
+        }
106
+
107
+        String openid = getOpenId(request);
108
+        return taRecommendCustomerService.getMarkingCustList(openid, keywords, pageNumber, pageSize,buildingId);
109
+    }
85 110
 
86 111
     /**
87 112
      * 我的客户列表

+ 9
- 0
src/main/java/com/yunzhi/marketing/entity/TaPolicy.java Näytä tiedosto

@@ -106,4 +106,13 @@ public class TaPolicy implements Serializable {
106 106
      */
107 107
     private Integer pvNum;
108 108
 
109
+    /**
110
+     * 是否热点
111
+     */
112
+    private Integer isHot;
113
+
114
+    /**
115
+     * 副标题
116
+     */
117
+    private String subtitle;
109 118
 }

+ 10
- 0
src/main/java/com/yunzhi/marketing/mapper/TaRecommendCustomerMapper.java Näytä tiedosto

@@ -7,6 +7,7 @@ import com.yunzhi.marketing.entity.TaPersonBuilding;
7 7
 import com.yunzhi.marketing.entity.TaRecommendCustomer;
8 8
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
9 9
 import com.yunzhi.marketing.excel.*;
10
+import com.yunzhi.marketing.po.TaRecommendCustomerPO;
10 11
 import org.apache.ibatis.annotations.Mapper;
11 12
 import org.apache.ibatis.annotations.Param;
12 13
 
@@ -302,4 +303,13 @@ public interface TaRecommendCustomerMapper extends BaseMapper<TaRecommendCustome
302 303
      * @return
303 304
      */
304 305
     Map<String, Number> checkCustomerBy(@Param("orgId") Integer orgId, @Param("personId") String personId, @Param("consultBuildingIds") List<String> consultBuildingIds, @Param("buildingId") String buildingId);
306
+
307
+    /**
308
+     * 驻场客户列表
309
+     * @param page
310
+     * @param keywords
311
+     * @param buildingId
312
+     * @return
313
+     */
314
+    IPage<TaRecommendCustomerPO> getMarkingCustList(IPage<TaRecommendCustomerPO> page,@Param("keywords") String keywords,@Param("buildingId") String buildingId);
305 315
 }

+ 19
- 0
src/main/java/com/yunzhi/marketing/po/TaRecommendCustomerPO.java Näytä tiedosto

@@ -0,0 +1,19 @@
1
+package com.yunzhi.marketing.po;
2
+
3
+import lombok.Data;
4
+
5
+@Data
6
+public class TaRecommendCustomerPO {
7
+
8
+    private String id;
9
+
10
+    private String name;
11
+
12
+    private String phone;
13
+
14
+    private String picture;
15
+
16
+    private String sex;
17
+
18
+    private String type;
19
+}

+ 11
- 0
src/main/java/com/yunzhi/marketing/service/ITaRecommendCustomerService.java Näytä tiedosto

@@ -196,4 +196,15 @@ public interface ITaRecommendCustomerService extends IService<TaRecommendCustome
196 196
      * @return
197 197
      */
198 198
     ResponseBean channelReportCust(ChannelReportDTO channelReportDTO) throws Exception;
199
+
200
+    /**
201
+     * 获取驻场的客户列表
202
+     * @param openid
203
+     * @param keywords
204
+     * @param pageNumber
205
+     * @param pageSize
206
+     * @param buildingId
207
+     * @return
208
+     */
209
+    ResponseBean getMarkingCustList(String openid, String keywords, int pageNumber, int pageSize, String buildingId);
199 210
 }

+ 34
- 0
src/main/java/com/yunzhi/marketing/service/impl/TaRecommendCustomerServiceImpl.java Näytä tiedosto

@@ -19,6 +19,7 @@ import com.yunzhi.marketing.dto.ChannelReportDTO;
19 19
 import com.yunzhi.marketing.excel.AgentsRecommendCustomer;
20 20
 import com.yunzhi.marketing.excel.ExcelRecommendCustomer;
21 21
 import com.yunzhi.marketing.excel.ReporRecommendCustomer;
22
+import com.yunzhi.marketing.po.TaRecommendCustomerPO;
22 23
 import com.yunzhi.marketing.service.IMiniAppService;
23 24
 import com.yunzhi.marketing.service.ITaRecommendCustomerService;
24 25
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -427,6 +428,39 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
427 428
         return ResponseBean.success(channelCustomer);
428 429
     }
429 430
 
431
+    /**
432
+     * 获取驻场的客户列表
433
+     *
434
+     * @param openid
435
+     * @param keywords
436
+     * @param pageNumber
437
+     * @param pageSize
438
+     * @param buildingId
439
+     * @return
440
+     */
441
+    @Override
442
+    public ResponseBean getMarkingCustList(String openid, String keywords, int pageNumber, int pageSize, String buildingId) {
443
+        List<TaPerson> taPersons = getPersonsByOpenId(openid);
444
+        if (null == taPersons || taPersons.size() != 1) {
445
+            return ResponseBean.error("验证当前人员信息失败", ResponseBean.ERROR_UNAVAILABLE);
446
+        }
447
+        TaPerson taPerson = taPersons.get(0);
448
+
449
+        // 验证当前人员是否是驻场顾问
450
+        LambdaQueryWrapper<TaPersonBuilding> lambdaQueryWrapper = new LambdaQueryWrapper<>();
451
+        lambdaQueryWrapper.eq(TaPersonBuilding::getPersonId,taPerson.getPersonId());
452
+        lambdaQueryWrapper.eq(TaPersonBuilding::getBuildingId,buildingId);
453
+        TaPersonBuilding taPersonBuilding = taPersonBuildingMapper.selectOne(lambdaQueryWrapper);
454
+        if (null == taPersonBuilding) {
455
+            return ResponseBean.error("你不是此楼盘的驻场顾问", ResponseBean.ERROR_ILLEGAL_PARAMS);
456
+        }
457
+
458
+        // 查询出此楼盘下的职业顾问
459
+        IPage<TaRecommendCustomerPO> page = new Page<>(pageNumber,pageSize);
460
+        IPage<TaRecommendCustomerPO> result = taRecommendCustomerMapper.getMarkingCustList(page, keywords,buildingId);
461
+        return ResponseBean.success(result);
462
+    }
463
+
430 464
     private void fillSomeFieldsOfCustomer(TaRecommendCustomer customer, TaPerson recommender, LocalDateTime now) {
431 465
         customer.setVerifyStatus(CommConstant.VERIFY_AGREE);
432 466
         customer.setStatus(CommConstant.CUSTOMER_REPORT);

+ 14
- 0
src/main/java/com/yunzhi/marketing/xlk/controller/ChannelCustomerController.java Näytä tiedosto

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7 7
 import com.yunzhi.marketing.base.BaseController;
8 8
 import com.yunzhi.marketing.base.ResponseBean;
9 9
 import com.yunzhi.marketing.xlk.dto.ChannelCustomerDTO;
10
+import com.yunzhi.marketing.xlk.dto.MarkingChannelCustomerDTO;
10 11
 import com.yunzhi.marketing.xlk.entity.ChannelCustomer;
11 12
 import com.yunzhi.marketing.xlk.service.IChannelCustomerService;
12 13
 import io.swagger.annotations.Api;
@@ -76,6 +77,19 @@ public class ChannelCustomerController extends BaseController {
76 77
         return iChannelCustomerService.auditCustomer(id,channelCustomerDTO);
77 78
     }
78 79
 
80
+
81
+    /**
82
+     * 驻场 确认到访
83
+     *
84
+     * @param
85
+     * @return
86
+     */
87
+    @ApiOperation(value = "wx-驻场确认到访", notes = "wx-驻场确认到访")
88
+    @RequestMapping(value="/wx/marking/channelCustomer",method= RequestMethod.PUT)
89
+    public ResponseBean channelCustomerUpdate(@RequestBody MarkingChannelCustomerDTO params){
90
+        return iChannelCustomerService.markingChannelCustomer(params);
91
+    }
92
+
79 93
     /**
80 94
      * 根据id查询对象
81 95
      * @param id  实体ID

+ 4
- 4
src/main/java/com/yunzhi/marketing/xlk/controller/InstitutionController.java Näytä tiedosto

@@ -98,7 +98,7 @@ public class InstitutionController extends BaseController {
98 98
      * @return
99 99
      */
100 100
     @ApiOperation(value = "admin-组织机构列表查询", notes = "admin-组织机构列表查询")
101
-    @RequestMapping(value="/institution/save",method= RequestMethod.POST)
101
+    @RequestMapping(value="/admin/institution/save",method= RequestMethod.POST)
102 102
     public ResponseBean institutionAdd(@RequestBody @Valid InstitutionDTO institutionDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
103 103
         ResponseBean responseBean = new ResponseBean();
104 104
         try {
@@ -122,7 +122,7 @@ public class InstitutionController extends BaseController {
122 122
      */
123 123
     @ApiOperation(value = "admin-组织机构列表删除", notes = "admin-组织机构列表删除")
124 124
     @ResponseBody
125
-    @RequestMapping(value="/institution/{id}", method= RequestMethod.DELETE)
125
+    @RequestMapping(value="/admin/institution/{id}", method= RequestMethod.DELETE)
126 126
     public ResponseBean institutionDelete(@PathVariable String id, @RequestHeader("authorization") String token, HttpServletRequest request){
127 127
         ResponseBean responseBean = new ResponseBean();
128 128
         try {
@@ -142,7 +142,7 @@ public class InstitutionController extends BaseController {
142 142
      * @return
143 143
      */
144 144
     @ApiOperation(value = "admin-组织机构列表修改", notes = "admin-组织机构列表修改")
145
-    @RequestMapping(value="/institution/{id}",method= RequestMethod.PUT)
145
+    @RequestMapping(value="/admin/institution/{id}",method= RequestMethod.PUT)
146 146
     public ResponseBean institutionUpdate(@PathVariable String id,
147 147
                                           @RequestBody InstitutionDTO institutionDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
148 148
         ResponseBean responseBean = new ResponseBean();
@@ -166,7 +166,7 @@ public class InstitutionController extends BaseController {
166 166
      * @param id  实体ID
167 167
      */
168 168
     @ApiOperation(value = "admin-组织机构列表查询详细", notes = "组织机构列表查询详细")
169
-    @RequestMapping(value="/institution/{id}",method= RequestMethod.GET)
169
+    @RequestMapping(value="/admin/institution/{id}",method= RequestMethod.GET)
170 170
     public ResponseBean institutionGet(@PathVariable String id, @RequestHeader("authorization") String token, HttpServletRequest request){
171 171
         ResponseBean responseBean = new ResponseBean();
172 172
         try {

+ 30
- 0
src/main/java/com/yunzhi/marketing/xlk/dto/MarkingChannelCustomerDTO.java Näytä tiedosto

@@ -0,0 +1,30 @@
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 java.io.Serializable;
9
+
10
+/**
11
+ * <p>
12
+ * 渠道报备客户表 
13
+ * </p>
14
+ *
15
+ * @author jobob
16
+ * @since 2021-07-19
17
+ */
18
+@Data
19
+@EqualsAndHashCode(callSuper = false)
20
+@Accessors(chain = true)
21
+@TableName("xlk_channel_customer")
22
+public class MarkingChannelCustomerDTO implements Serializable {
23
+
24
+    private String id;
25
+    /**
26
+     * customer / channel  一个代表业务客户 一个代表渠道推荐客户
27
+     */
28
+   private String type;
29
+
30
+}

+ 9
- 0
src/main/java/com/yunzhi/marketing/xlk/service/IChannelCustomerService.java Näytä tiedosto

@@ -3,6 +3,7 @@ package com.yunzhi.marketing.xlk.service;
3 3
 import com.baomidou.mybatisplus.extension.service.IService;
4 4
 import com.yunzhi.marketing.base.ResponseBean;
5 5
 import com.yunzhi.marketing.xlk.dto.ChannelCustomerDTO;
6
+import com.yunzhi.marketing.xlk.dto.MarkingChannelCustomerDTO;
6 7
 import com.yunzhi.marketing.xlk.entity.ChannelCustomer;
7 8
 
8 9
 /**
@@ -22,4 +23,12 @@ public interface IChannelCustomerService extends IService<ChannelCustomer> {
22 23
      * @return
23 24
      */
24 25
     ResponseBean auditCustomer(Integer id, ChannelCustomerDTO channelCustomerDTO);
26
+
27
+    /**
28
+     * 驻场确认到访
29
+     * @param id
30
+     * @param params
31
+     * @return
32
+     */
33
+    ResponseBean markingChannelCustomer(MarkingChannelCustomerDTO params);
25 34
 }

+ 90
- 5
src/main/java/com/yunzhi/marketing/xlk/service/impl/ChannelCustomerServiceImpl.java Näytä tiedosto

@@ -3,17 +3,19 @@ package com.yunzhi.marketing.xlk.service.impl;
3 3
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4 4
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
5 5
 import com.yunzhi.marketing.base.ResponseBean;
6
+import com.yunzhi.marketing.common.CommConstant;
6 7
 import com.yunzhi.marketing.common.StringUtils;
7 8
 import com.yunzhi.marketing.entity.TaRecommendCustomer;
8 9
 import com.yunzhi.marketing.mapper.TaRecommendCustomerMapper;
9 10
 import com.yunzhi.marketing.xlk.dto.ChannelCustomerDTO;
11
+import com.yunzhi.marketing.xlk.dto.MarkingChannelCustomerDTO;
10 12
 import com.yunzhi.marketing.xlk.entity.ChannelCustomer;
11 13
 import com.yunzhi.marketing.xlk.mapper.ChannelCustomerMapper;
12 14
 import com.yunzhi.marketing.xlk.service.IChannelCustomerService;
13 15
 import org.springframework.beans.factory.annotation.Autowired;
14 16
 import org.springframework.stereotype.Service;
15 17
 
16
-import java.util.List;
18
+import java.time.LocalDateTime;
17 19
 
18 20
 /**
19 21
  * <p>
@@ -53,16 +55,33 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
53 55
         LambdaQueryWrapper<TaRecommendCustomer> queryWrapper = new LambdaQueryWrapper<>();
54 56
         queryWrapper.eq(TaRecommendCustomer::getPhone,customer.getPhone());
55 57
         queryWrapper.eq(TaRecommendCustomer::getBuildingId,customer.getBuildingId());
56
-        TaRecommendCustomer taRecommendCustomer = taRecommendCustomerMapper.selectOne(queryWrapper);
57
-        if (null == taRecommendCustomer) {
58
+        TaRecommendCustomer recommendCustomer = taRecommendCustomerMapper.selectOne(queryWrapper);
59
+        if (null == recommendCustomer) {
58 60
             // 审核通过
59 61
             customer.setStatus("2");
60 62
             channelCustomerMapper.updateById(customer);
63
+            // 进业务客户表
64
+            TaRecommendCustomer taRecommendCustomer = new TaRecommendCustomer();
65
+            taRecommendCustomer.setName(customer.getName());
66
+            taRecommendCustomer.setPicture(customer.getPicture());
67
+            taRecommendCustomer.setPhone(customer.getPhone());
68
+            taRecommendCustomer.setSex(customer.getSex());
69
+            taRecommendCustomer.setRecommendPerson(customer.getRecommendPerson());
70
+            taRecommendCustomer.setBuildingId(customer.getBuildingId());
71
+            taRecommendCustomer.setReportRecommendStatus(CommConstant.RECOMMENDED);
72
+            taRecommendCustomer.setVerifyStatus(CommConstant.VERIFY_AGREE);
73
+            taRecommendCustomer.setCreateDate(LocalDateTime.now());
74
+            taRecommendCustomer.setReportDate(LocalDateTime.now());
75
+            taRecommendCustomer.setOrgId(customer.getOrgId());
76
+            taRecommendCustomer.setPersonId(customer.getPersonId());
77
+            taRecommendCustomer.setEntryType(CommConstant.ENTRY_CHANNEL_VERIFY);
78
+            taRecommendCustomer.setStatus(CommConstant.CUSTOMER_REPORT);
79
+            taRecommendCustomerMapper.insert(taRecommendCustomer);
61 80
             return ResponseBean.success("审核成功");
62 81
         }
63 82
 
64
-        if (StringUtils.isEmpty(taRecommendCustomer.getRealtyConsultant()) &&
65
-                (StringUtils.isEmpty(taRecommendCustomer.getRecommendPerson()) || taRecommendCustomer.getRecommendPerson().equals(customer.getRecommendPerson()))){
83
+        if (StringUtils.isEmpty(recommendCustomer.getRealtyConsultant()) &&
84
+                (StringUtils.isEmpty(recommendCustomer.getRecommendPerson()) || recommendCustomer.getRecommendPerson().equals(customer.getRecommendPerson()))){
66 85
             // 审核通过
67 86
             customer.setStatus("2");
68 87
             channelCustomerMapper.updateById(customer);
@@ -71,4 +90,70 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
71 90
 
72 91
         return ResponseBean.error("此客户是私客或已被报备", ResponseBean.ERROR_UNAVAILABLE);
73 92
     }
93
+
94
+    /**
95
+     * 驻场确认到访
96
+     *
97
+     * @param id
98
+     * @param params
99
+     * @return
100
+     */
101
+    @Override
102
+    public ResponseBean markingChannelCustomer(MarkingChannelCustomerDTO params) {
103
+        // 渠道推荐的客户
104
+        if ("channel".equals(params.getType())) {
105
+            ChannelCustomer customer = channelCustomerMapper.selectById(params.getId());
106
+            // 审核通过 先查看在ta_recommend_customer 手机号是否存在
107
+            LambdaQueryWrapper<TaRecommendCustomer> queryWrapper = new LambdaQueryWrapper<>();
108
+            queryWrapper.eq(TaRecommendCustomer::getPhone,customer.getPhone());
109
+            queryWrapper.eq(TaRecommendCustomer::getBuildingId,customer.getBuildingId());
110
+            TaRecommendCustomer recommendCustomer = taRecommendCustomerMapper.selectOne(queryWrapper);
111
+            if (null == recommendCustomer) {
112
+                // 审核通过
113
+                customer.setStatus("2");
114
+                channelCustomerMapper.updateById(customer);
115
+                // 进业务客户表
116
+                TaRecommendCustomer taRecommendCustomer = new TaRecommendCustomer();
117
+                taRecommendCustomer.setName(customer.getName());
118
+                taRecommendCustomer.setPicture(customer.getPicture());
119
+                taRecommendCustomer.setPhone(customer.getPhone());
120
+                taRecommendCustomer.setSex(customer.getSex());
121
+                taRecommendCustomer.setRecommendPerson(customer.getRecommendPerson());
122
+                taRecommendCustomer.setBuildingId(customer.getBuildingId());
123
+                taRecommendCustomer.setReportRecommendStatus(CommConstant.RECOMMENDED);
124
+                taRecommendCustomer.setVerifyStatus(CommConstant.VERIFY_AGREE);
125
+                taRecommendCustomer.setCreateDate(LocalDateTime.now());
126
+                taRecommendCustomer.setReportDate(LocalDateTime.now());
127
+                taRecommendCustomer.setOrgId(customer.getOrgId());
128
+                taRecommendCustomer.setPersonId(customer.getPersonId());
129
+                taRecommendCustomer.setEntryType(CommConstant.ENTRY_CHANNEL_VERIFY);
130
+                taRecommendCustomer.setStatus(CommConstant.CUSTOMER_VISITE);
131
+                taRecommendCustomerMapper.insert(taRecommendCustomer);
132
+                return ResponseBean.success("审核成功");
133
+            }
134
+
135
+            if (StringUtils.isEmpty(recommendCustomer.getRealtyConsultant()) &&
136
+                    (StringUtils.isEmpty(recommendCustomer.getRecommendPerson()) || recommendCustomer.getRecommendPerson().equals(customer.getRecommendPerson()))){
137
+                // 审核通过
138
+                customer.setStatus("2");
139
+                channelCustomerMapper.updateById(customer);
140
+
141
+                // 修改状态为确认到访状态
142
+                recommendCustomer.setRecommendPerson(customer.getRecommendPerson());
143
+                recommendCustomer.setVerifyStatus(CommConstant.VERIFY_AGREE);
144
+                recommendCustomer.setStatus(CommConstant.CUSTOMER_VISITE);
145
+                taRecommendCustomerMapper.updateById(recommendCustomer);
146
+                return ResponseBean.success("审核成功");
147
+            }
148
+        }else if ("customer".equals(params.getType())) {
149
+            // 置业顾问 经纪人推荐的客户
150
+            TaRecommendCustomer taRecommendCustomer = taRecommendCustomerMapper.selectById(params.getId());
151
+            taRecommendCustomer.setVerifyStatus(CommConstant.VERIFY_AGREE);
152
+            taRecommendCustomer.setStatus(CommConstant.CUSTOMER_VISITE);
153
+            taRecommendCustomerMapper.updateById(taRecommendCustomer);
154
+            return ResponseBean.success("审核成功");
155
+        }
156
+
157
+        return ResponseBean.error("此客户是私客或已被报备", ResponseBean.ERROR_UNAVAILABLE);
158
+    }
74 159
 }

+ 6
- 76
src/main/resources/application-dev.yml Näytä tiedosto

@@ -17,79 +17,9 @@ spring:
17 17
       max-file-size: 100MB
18 18
       max-request-size: 100MB
19 19
 
20
-##mybatis-plus
21
-mybatis-plus:
22
-  configuration:
23
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
24
-    call-setters-on-nulls: true
25
-  mapper-locations: classpath:mapper/**/*.xml
26
-wx:
27
-  miniapp:
28
-    appid: wxd6f47a9bb3052175
29
-    secret: 28f33b6bbc0f778c11a0bb234a7d6d4e
30
-    token:
31
-    aesKey:
32
-    msgDataFormat: JSON
33
-  tpls:
34
-  - name: notice
35
-    id: 6hWKexNlaVpAOvrcWxHHQ_Duz1gRIkg2-Clsktp2-Os
36
-    keywords: 4
37
-  - name: newCustomer
38
-    id: WiBYjqkE9KvwDv1WSq5vnuv5A6FSaOB8ETFcrVmtCEI
39
-    keywords: 4
40
-  - name: mainbiz
41
-    id: WiBYjqkE9KvwDv1WSq5vniGU4P0gvwlat-5ENYKpfxg
42
-    keywords: 6
43
-ali:
44
-  accessKeyId: LTAI5tPxzUpTbCtSVoN3eiEC
45
-  accessKeySecret: gRqRuNe6vftgyyBA7fYSglWIoUHntP
46
-  oss:
47
-    endpoint: oss-cn-shanghai.aliyuncs.com
48
-    bucketName: xlk-assets
49
-    bucketURL: https://xlk-assets.oss-accelerate.aliyuncs.com
50
-
51
-# 手机短信服务
52
-sms:
53
-  url: http://101.200.84.17:8081/sms
54
-  method: POST
55
-  contentType: "application/json;charset=UTF-8"
56
-  template:
57
-    code:
58
-    tel:
59
-    params:
60
-
61
-  # 以下为各模板 code
62
-  # 验证码
63
-  captcha:
64
-    # 模板 code
65
-    code: "0301"
66
-    # 有效时间 秒
67
-    expire: 120
68
-    # 验证码长度
69
-    size: 4
70
-    # 短信签名
71
-    sign: 营销云
72
-
73
-  visitor:
74
-    code: "0501"
75
-
76
-# 支付回调
77
-pay-notify: https://dev.fangdeal.cn/api/notify/
78
-#退款回调
79
-pay-refund: https://dev.fangdeal.cn/api/refund/
80
-
81
-#法大大服务器地址
82
-fadada:
83
-  appId: "403057"
84
-  appSecret: "xcIaK36Vc09yXXRdinXYcXhW"
85
-  version: "2.0"
86
-  authServeHost: "http://test.api.fabigbig.com:8888/api/"
87
-  serveHost: "https://testapi08.fadada.com/api/"
88
-  companyNotify: "https://dev.fangdeal.cn/api/fadd/company"
89
-  authReturnUrl: "https://dev.fangdeal.cn/channel/#/eContract/seal/detail?id="
90
-  authNotifyUrl: "https://dev.fangdeal.cn/api/fadd/autoAuthCompanySeal"
91
-  signNotify: "https://dev.fangdeal.cn/api/fadd/sign"
92
-  redirectUrl: "https://dev.fangdeal.cn/other/redirect.html"
93
-# file path
94
-file:
95
-  path: /images/
20
+## 日志
21
+logging:
22
+  path: D:\
23
+  config: classpath:log/logback-spring.xml
24
+  level:
25
+    root: info

+ 6
- 84
src/main/resources/application-prod.yml Näytä tiedosto

@@ -4,12 +4,9 @@ spring:
4 4
   application:
5 5
     name: zhiyun
6 6
   datasource:
7
-    username: marketing-cloud
8
-    password: uVV0kEQLFGqx4#mV
9
-    url: jdbc:mysql://rm-uf6z3z6jq11x653d77o.mysql.rds.aliyuncs.com:3306/marketing-cloud?useUnicode=true&serverTimezone=CTT&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true&zeroDateTimeBehavior=convertToNull
10
-#    username: marketing
11
-#    password: u@cSFJ5*kS9hGP7a
12
-#    url: jdbc:mysql://localhost:3306/marketing-cloud?useUnicode=true&serverTimezone=CTT&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true&zeroDateTimeBehavior=convertToNull
7
+    username: marketing
8
+    password: u@cSFJ5*kS9hGP7a
9
+    url: jdbc:mysql://localhost:3306/marketing-cloud?useUnicode=true&serverTimezone=CTT&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true&zeroDateTimeBehavior=convertToNull
13 10
     driver-class-name: com.mysql.cj.jdbc.Driver
14 11
     initial-size: 10 # 初始化连接数
15 12
     max-active: 20 # 最大连接数
@@ -20,84 +17,9 @@ spring:
20 17
       max-file-size: 10MB
21 18
       max-request-size: 50MB
22 19
 
23
-##mybatis-plus
24
-mybatis-plus:
25
-  configuration:
26
-    call-setters-on-nulls: true
27
-  mapper-locations: classpath:mapper/**/*.xml
28
-wx:
29
-  miniapp:
30
-    appid: wxd6f47a9bb3052175
31
-    secret: 28f33b6bbc0f778c11a0bb234a7d6d4e
32
-    token:
33
-    aesKey:
34
-    msgDataFormat: JSON
35
-  tpls:
36
-    - name: notice
37
-      id: 6hWKexNlaVpAOvrcWxHHQ_Duz1gRIkg2-Clsktp2-Os
38
-      keywords: 4
39
-    - name: newCustomer
40
-      id: WiBYjqkE9KvwDv1WSq5vnuv5A6FSaOB8ETFcrVmtCEI
41
-      keywords: 4
42
-    - name: mainbiz
43
-      id: WiBYjqkE9KvwDv1WSq5vniGU4P0gvwlat-5ENYKpfxg
44
-      keywords: 6
45
-ali:
46
-  accessKeyId: LTAI5tPxzUpTbCtSVoN3eiEC
47
-  accessKeySecret: gRqRuNe6vftgyyBA7fYSglWIoUHntP
48
-  oss:
49
-    endpoint: oss-cn-shanghai.aliyuncs.com
50
-    bucketName: xlk-assets
51
-    bucketURL: https://xlk-assets.oss-accelerate.aliyuncs.com
52
-
53
-# 手机短信服务
54
-sms:
55
-  # 先使用外网地址, 后期使用内网地址
56
-  url: http://101.200.84.17:8081/sms
57
-  method: POST
58
-  contentType: "application/json;charset=UTF-8"
59
-  template:
60
-    code:
61
-    tel:
62
-    params:
63
-
64
-  # 以下为各模板 code
65
-  # 验证码
66
-  captcha:
67
-    # 模板 code
68
-    code: "0301"
69
-    # 有效时间 秒
70
-    expire: 120
71
-    # 验证码长度
72
-    size: 4
73
-    # 短信签名
74
-    sign: 橙蕉
75
-
76
-  visitor:
77
-    code: "0501"
78
-
79 20
 #日志配置
80 21
 logging:
22
+  path: /home/xlk/marketing-cloud/service/logs
81 23
   config: classpath:log/logback-spring.xml
82
-  debug: true
83
-
84
-# 支付回调
85
-pay-notify: https://wx.fangdeal.cn/api/notify/
86
-#退款回调
87
-pay-refund: https://wx.fangdeal.cn/api/refund/
88
-
89
-#法大大服务器地址
90
-fadada:
91
-  appId: "500261"
92
-  appSecret: "go9yihmg7abS2lIBZpZ2yLSW"
93
-  version: "2.0"
94
-  authServeHost: "https://textapi.fadada.com/api2/"
95
-  serveHost: "https://textapi.fadada.com/api2/"
96
-  companyNotify: "https://wx.fangdeal.cn/api/fadd/company"
97
-  authReturnUrl: "http://admin.fangdeal.cn/#/eContract/seal/detail?id="
98
-  authNotifyUrl: "https://wx.fangdeal.cn/api/fadd/autoAuthCompanySeal"
99
-  signNotify: "https://wx.fangdeal.cn/api/fadd/sign"
100
-  redirectUrl: "https://wx.fangdeal.cn/other/redirect.html"
101
-# file path
102
-file:
103
-  path: /images/
24
+  level:
25
+    root: info

+ 25
- 0
src/main/resources/application-test.yml Näytä tiedosto

@@ -0,0 +1,25 @@
1
+server:
2
+  port: 8567
3
+spring:
4
+  application:
5
+    name: marketing-cloud
6
+  datasource:
7
+    username: marketing-cloud
8
+    password: uVV0kEQLFGqx4#mV
9
+    url: jdbc:mysql://rm-uf6z3z6jq11x653d77o.mysql.rds.aliyuncs.com:3306/marketing-cloud?useUnicode=true&serverTimezone=CTT&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true&zeroDateTimeBehavior=convertToNull
10
+    driver-class-name: com.mysql.cj.jdbc.Driver
11
+    initial-size: 10 # 初始化连接数
12
+    max-active: 20 # 最大连接数
13
+    min-idle: 8 # 最小空闲数
14
+    max-idle: 8 # 最大空闲数
15
+  servlet:
16
+    multipart:
17
+      max-file-size: 100MB
18
+      max-request-size: 100MB
19
+
20
+## 日志
21
+logging:
22
+  path: /yunpan/dev/logs
23
+  config: classpath:log/logback-spring.xml
24
+  level:
25
+    root: info

+ 79
- 0
src/main/resources/application.yml Näytä tiedosto

@@ -1,3 +1,82 @@
1
+
2
+##mybatis-plus
3
+mybatis-plus:
4
+  configuration:
5
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
6
+    call-setters-on-nulls: true
7
+  mapper-locations: classpath:mapper/**/*.xml
8
+wx:
9
+  miniapp:
10
+    appid:
11
+    secret:
12
+    token:
13
+    aesKey:
14
+    msgDataFormat: JSON
15
+  tpls:
16
+    - name: notice
17
+      id: 6hWKexNlaVpAOvrcWxHHQ_Duz1gRIkg2-Clsktp2-Os
18
+      keywords: 4
19
+    - name: newCustomer
20
+      id: WiBYjqkE9KvwDv1WSq5vnuv5A6FSaOB8ETFcrVmtCEI
21
+      keywords: 4
22
+    - name: mainbiz
23
+      id: WiBYjqkE9KvwDv1WSq5vniGU4P0gvwlat-5ENYKpfxg
24
+      keywords: 6
25
+ali:
26
+  accessKeyId: LTAI5tPxzUpTbCtSVoN3eiEC
27
+  accessKeySecret: gRqRuNe6vftgyyBA7fYSglWIoUHntP
28
+  oss:
29
+    endpoint: oss-cn-shanghai.aliyuncs.com
30
+    bucketName: xlk-assets
31
+    bucketURL: https://xlk-assets.oss-accelerate.aliyuncs.com
32
+
33
+# file path
34
+file:
35
+  path: /images/
36
+
37
+# 手机短信服务
38
+sms:
39
+  url:
40
+  method: POST
41
+  contentType: "application/json;charset=UTF-8"
42
+  template:
43
+    code:
44
+    tel:
45
+    params:
46
+
47
+  # 以下为各模板 code
48
+  # 验证码
49
+  captcha:
50
+    # 模板 code
51
+    code: "0301"
52
+    # 有效时间 秒
53
+    expire: 120
54
+    # 验证码长度
55
+    size: 4
56
+    # 短信签名
57
+    sign: 营销云
58
+
59
+  visitor:
60
+    code: "0501"
61
+
62
+# 支付回调
63
+pay-notify:
64
+#退款回调
65
+pay-refund:
66
+
67
+#法大大服务器地址
68
+fadada:
69
+  appId: ""
70
+  appSecret: ""
71
+  version: ""
72
+  authServeHost: ""
73
+  serveHost: ""
74
+  companyNotify: ""
75
+  authReturnUrl: ""
76
+  authNotifyUrl: ""
77
+  signNotify: ""
78
+  redirectUrl: ""
79
+
1 80
 ### spring
2 81
 spring:
3 82
   profiles:

+ 71
- 100
src/main/resources/log/logback-spring.xml Näytä tiedosto

@@ -1,114 +1,85 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <configuration debug="false">
3
-    <springProfile name="prod">
4
-        <!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
3
+    <!--引入默认的一些设置-->
4
+    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
5
+    <!--定义日志文件的存储地址 从springboot配置文件中获取路径-->
6
+    <springProperty scope="context" name="LOG_HOME" source="logging.path"/>
7
+    <!--springboot配置文件中获取日志级别-->
8
+    <springProperty scope="context" name="LOG_LEVEL" source="logging.level.root"/>
9
+    <!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
5 10
 <!--        <property name="LOG_HOME" value="/home/xlk/marketing-cloud/service/logs" />-->
6
-        <property name="LOG_HOME" value="/yunpan/dev/logs" />
7
-        <!-- 控制台输出 -->
8
-        <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
9
-            <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
10
-                <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
11
-                <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
12
-            </encoder>
13
-        </appender>
14
-        <!-- 按照每天生成日志文件 -->
15
-        <appender name="FILE"  class="ch.qos.logback.core.rolling.RollingFileAppender">
16
-            <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
17
-                <!--日志文件输出的文件名-->
18
-                <FileNamePattern>${LOG_HOME}/marketing-%d{yyyy-MM-dd}.log</FileNamePattern>
19
-                <!--日志文件保留天数-->
20
-                <MaxHistory>30</MaxHistory>
21
-            </rollingPolicy>
22
-            <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
23
-                <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
24
-                <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
25
-            </encoder>
26
-            <!--日志文件最大的大小-->
27
-            <!--        <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">-->
28
-            <!--            <MaxFileSize>10MB</MaxFileSize>-->
29
-            <!--        </triggeringPolicy>-->
30
-        </appender>
11
+<!--    <property name="LOG_HOME" value="/yunpan/dev/logs" />-->
12
+    <!-- 控制台输出 -->
13
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
14
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
15
+            <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
16
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
17
+        </encoder>
18
+    </appender>
19
+    <!-- 按照每天生成日志文件 -->
20
+    <appender name="FILE"  class="ch.qos.logback.core.rolling.RollingFileAppender">
21
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
22
+            <!--日志文件输出的文件名-->
23
+            <FileNamePattern>${LOG_HOME}/marketing-%d{yyyy-MM-dd}.log</FileNamePattern>
24
+            <!--日志文件保留天数-->
25
+            <MaxHistory>30</MaxHistory>
26
+        </rollingPolicy>
27
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
28
+            <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
29
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
30
+        </encoder>
31
+        <!--日志文件最大的大小-->
32
+        <!--        <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">-->
33
+        <!--            <MaxFileSize>10MB</MaxFileSize>-->
34
+        <!--        </triggeringPolicy>-->
35
+    </appender>
36
+
37
+    <!-- 按照每天生成日志文件 -->
38
+    <appender name="MYSQL"  class="ch.qos.logback.core.rolling.RollingFileAppender">
39
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
40
+            <!--日志文件输出的文件名-->
41
+            <FileNamePattern>${LOG_HOME}/marketing-%d{yyyy-MM-dd}-sql.log</FileNamePattern>
42
+            <!--日志文件保留天数-->
43
+            <MaxHistory>30</MaxHistory>
44
+        </rollingPolicy>
45
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
46
+            <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
47
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
48
+        </encoder>
49
+        <!--日志文件最大的大小-->
50
+        <!--                <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">-->
51
+        <!--                    <MaxFileSize>1024MB</MaxFileSize>-->
52
+        <!--                </triggeringPolicy>-->
53
+    </appender>
31 54
 
32
-        <!-- 按照每天生成日志文件 -->
33
-        <appender name="MYSQL"  class="ch.qos.logback.core.rolling.RollingFileAppender">
34
-            <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
35
-                <!--日志文件输出的文件名-->
36
-                <FileNamePattern>${LOG_HOME}/marketing-%d{yyyy-MM-dd}-sql.log</FileNamePattern>
37
-                <!--日志文件保留天数-->
38
-                <MaxHistory>30</MaxHistory>
39
-            </rollingPolicy>
40
-            <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
41
-                <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
42
-                <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
43
-            </encoder>
44
-            <!--日志文件最大的大小-->
45
-            <!--                <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">-->
46
-            <!--                    <MaxFileSize>1024MB</MaxFileSize>-->
47
-            <!--                </triggeringPolicy>-->
48
-        </appender>
55
+    <!--myibatis log configure-->
56
+    <logger name="com.yunzhi.marketing.mapper" level="DEBUG" additivity="false">
57
+        <appender-ref ref="MYSQL" />
58
+    </logger>
49 59
 
50
-        <!--myibatis log configure-->
51
-        <logger name="com.yunzhi.marketing.mapper" level="DEBUG" additivity="false">
60
+    <!--生产环境:打印控制台和输出到文件-->
61
+    <springProfile name="prod">
62
+        <root level="${LOG_LEVEL}">
63
+            <appender-ref ref="STDOUT"/>
64
+            <appender-ref ref="FILE"/>
52 65
             <appender-ref ref="MYSQL" />
53
-        </logger>
66
+        </root>
54 67
     </springProfile>
55 68
 
69
+    <!--开发环境:打印控制台-->
56 70
     <springProfile name="dev">
57
-        <!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
58
-        <property name="LOG_HOME" value="/yunpan/dev/logs" />
59
-        <!-- 控制台输出 -->
60
-        <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
61
-            <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
62
-                <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
63
-                <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
64
-            </encoder>
65
-        </appender>
66
-        <!-- 按照每天生成日志文件 -->
67
-        <appender name="FILE"  class="ch.qos.logback.core.rolling.RollingFileAppender">
68
-            <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
69
-                <!--日志文件输出的文件名-->
70
-                <FileNamePattern>${LOG_HOME}/marketing-%d{yyyy-MM-dd}.log</FileNamePattern>
71
-                <!--日志文件保留天数-->
72
-                <MaxHistory>30</MaxHistory>
73
-            </rollingPolicy>
74
-            <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
75
-                <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
76
-                <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
77
-            </encoder>
78
-            <!--日志文件最大的大小-->
79
-            <!--        <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">-->
80
-            <!--            <MaxFileSize>10MB</MaxFileSize>-->
81
-            <!--        </triggeringPolicy>-->
82
-        </appender>
83
-
84
-        <!-- 按照每天生成日志文件 -->
85
-        <appender name="MYSQL"  class="ch.qos.logback.core.rolling.RollingFileAppender">
86
-            <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
87
-                <!--日志文件输出的文件名-->
88
-                <FileNamePattern>${LOG_HOME}/marketing-%d{yyyy-MM-dd}-sql.log</FileNamePattern>
89
-                <!--日志文件保留天数-->
90
-                <MaxHistory>30</MaxHistory>
91
-            </rollingPolicy>
92
-            <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
93
-                <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
94
-                <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
95
-            </encoder>
96
-            <!--日志文件最大的大小-->
97
-            <!--                <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">-->
98
-            <!--                    <MaxFileSize>1024MB</MaxFileSize>-->
99
-            <!--                </triggeringPolicy>-->
100
-        </appender>
71
+        <root level="${LOG_LEVEL}">
72
+            <appender-ref ref="STDOUT"/>
73
+        </root>
74
+    </springProfile>
101 75
 
102
-        <!--myibatis log configure-->
103
-        <logger name="com.yunzhi.marketing.mapper" level="DEBUG" additivity="false">
76
+    <!--测试环境:打印控制台-->
77
+    <springProfile name="test">
78
+        <root level="${LOG_LEVEL}">
79
+            <appender-ref ref="STDOUT"/>
80
+            <appender-ref ref="FILE"/>
104 81
             <appender-ref ref="MYSQL" />
105
-        </logger>
82
+        </root>
106 83
     </springProfile>
107 84
 
108
-    <!-- 日志输出级别 -->
109
-    <root level="INFO">
110
-        <appender-ref ref="STDOUT" />
111
-        <appender-ref ref="FILE" />
112
-        <appender-ref ref="MYSQL" />
113
-    </root>
114 85
 </configuration>

+ 31
- 0
src/main/resources/mapper/TaRecommendCustomerMapper.xml Näytä tiedosto

@@ -942,4 +942,35 @@ FROM
942 942
             AND t.person_id = #{personId}
943 943
             AND t.status > -1
944 944
     </select>
945
+    <select id="getMarkingCustList" resultType="com.yunzhi.marketing.po.TaRecommendCustomerPO">
946
+        SELECT
947
+            customer_id AS id,
948
+            name,
949
+            phone,
950
+            picture,
951
+            sex,
952
+            "customer" AS type
953
+        FROM
954
+            ta_recommend_customer
955
+        WHERE
956
+            building_id = #{buildingId}
957
+        <if test="keywords != null and keywords !=''">
958
+            and name like CONCAT('%',#{keywords}, '%')
959
+        </if>
960
+    UNION ALL
961
+        SELECT
962
+            channel_customer_id AS id,
963
+            NAME,
964
+            phone,
965
+            picture,
966
+            sex,
967
+            "channel" AS type
968
+        FROM
969
+            xlk_channel_customer
970
+        WHERE
971
+            building_id = #{buildingId}
972
+        <if test="keywords != null and keywords !=''">
973
+            and name like CONCAT('%',#{keywords}, '%')
974
+        </if>
975
+    </select>
945 976
 </mapper>