傅行帆 3 年之前
父節點
當前提交
19ec0cff90

+ 3
- 1
src/main/java/com/yunzhi/marketing/service/impl/TaRecommendCustomerServiceImpl.java 查看文件

667
 
667
 
668
         // 兼容渠道报备客户
668
         // 兼容渠道报备客户
669
         if (null == taRecommendCustomer) {
669
         if (null == taRecommendCustomer) {
670
-            ChannelCustomer customer = channelCustomerMapper.selectById(id);
670
+            LambdaQueryWrapper<ChannelCustomer> channelCustomerLambdaQueryWrapper = new LambdaQueryWrapper<>();
671
+            channelCustomerLambdaQueryWrapper.eq(ChannelCustomer::getCustomerId,id);
672
+            ChannelCustomer customer = channelCustomerMapper.selectOne(channelCustomerLambdaQueryWrapper);
671
             BeanUtils.copyProperties(customer,taRecommendCustomer);
673
             BeanUtils.copyProperties(customer,taRecommendCustomer);
672
         }
674
         }
673
 
675
 

+ 9
- 2
src/main/java/com/yunzhi/marketing/xlk/controller/ChannelCustomerController.java 查看文件

8
 import com.yunzhi.marketing.base.ResponseBean;
8
 import com.yunzhi.marketing.base.ResponseBean;
9
 import com.yunzhi.marketing.entity.TaPerson;
9
 import com.yunzhi.marketing.entity.TaPerson;
10
 import com.yunzhi.marketing.service.ITaPersonService;
10
 import com.yunzhi.marketing.service.ITaPersonService;
11
+import com.yunzhi.marketing.service.ITaRecommendCustomerService;
11
 import com.yunzhi.marketing.xlk.dto.*;
12
 import com.yunzhi.marketing.xlk.dto.*;
12
 import com.yunzhi.marketing.xlk.entity.ChannelCustomer;
13
 import com.yunzhi.marketing.xlk.entity.ChannelCustomer;
13
 import com.yunzhi.marketing.xlk.service.IChannelCustomerService;
14
 import com.yunzhi.marketing.xlk.service.IChannelCustomerService;
40
     @Autowired
41
     @Autowired
41
     public IChannelCustomerService iChannelCustomerService;
42
     public IChannelCustomerService iChannelCustomerService;
42
 
43
 
44
+    @Autowired
45
+    ITaRecommendCustomerService taRecommendCustomerService;
46
+
43
     @Autowired
47
     @Autowired
44
     private ITaPersonService taPersonService;
48
     private ITaPersonService taPersonService;
45
 
49
 
94
     @ApiOperation(value = "admin-渠道报备客户审核", notes = "admin-渠道报备客户审核")
98
     @ApiOperation(value = "admin-渠道报备客户审核", notes = "admin-渠道报备客户审核")
95
     @RequestMapping(value="/admin/channelCustomer/{id}",method= RequestMethod.PUT)
99
     @RequestMapping(value="/admin/channelCustomer/{id}",method= RequestMethod.PUT)
96
     public ResponseBean channelCustomerUpdate(@PathVariable String id,
100
     public ResponseBean channelCustomerUpdate(@PathVariable String id,
101
+                                              @RequestHeader("authorization") String token,
97
                                         @RequestBody ChannelCustomerDTO channelCustomerDTO){
102
                                         @RequestBody ChannelCustomerDTO channelCustomerDTO){
98
         return iChannelCustomerService.auditCustomer(id,channelCustomerDTO);
103
         return iChannelCustomerService.auditCustomer(id,channelCustomerDTO);
99
     }
104
     }
164
      * 根据id查询对象
169
      * 根据id查询对象
165
      * @param id  实体ID
170
      * @param id  实体ID
166
      */
171
      */
172
+    @ApiOperation(value = "森哥看这里-admin-后台获取详情信息", notes = "森哥看这里-admin-后台获取详情信息")
167
     @RequestMapping(value="/admin/channelCustomer/{id}",method= RequestMethod.GET)
173
     @RequestMapping(value="/admin/channelCustomer/{id}",method= RequestMethod.GET)
168
-    public ResponseBean channelCustomerGet(@PathVariable String id){
174
+    public ResponseBean channelCustomerGet(@PathVariable String id, @RequestHeader("authorization") String token){
169
         ResponseBean responseBean = new ResponseBean();
175
         ResponseBean responseBean = new ResponseBean();
170
         try {
176
         try {
171
-            responseBean.addSuccess(iChannelCustomerService.getById(id));
177
+            ChannelCustomer channelCustomer = iChannelCustomerService.getById(id);
178
+            responseBean.addSuccess(taRecommendCustomerService.getCustDetail(channelCustomer.getCustomerId()));
172
         }catch (Exception e){
179
         }catch (Exception e){
173
             e.printStackTrace();
180
             e.printStackTrace();
174
             logger.error("channelCustomerDelete -=- {}",e.toString());
181
             logger.error("channelCustomerDelete -=- {}",e.toString());

+ 8
- 18
src/main/resources/mapper/xlk/ChannelCustomerMapper.xml 查看文件

131
     </select>
131
     </select>
132
     <select id="getNewCustomerDetail" resultType="com.yunzhi.marketing.xlk.vo.CustomerDetailVO">
132
     <select id="getNewCustomerDetail" resultType="com.yunzhi.marketing.xlk.vo.CustomerDetailVO">
133
         SELECT
133
         SELECT
134
-        <if test="params.type == 'day''">
135
-            date_format( t.create_date, '%d' ) as coordinate,
136
-        </if>
137
-        <if test="params.type == 'month''">
138
-            date_format( t.create_date, '%m' ) as coordinate,
139
-        </if>
140
-        COUNT(1) as customerNum
134
+            date_format( t.create_date, '%Y-%m-%d' ) as coordinate,
135
+            COUNT(1) as customerNum
141
         FROM
136
         FROM
142
         xlk_channel_customer t
137
         xlk_channel_customer t
143
         WHERE t.channel_id  = #{params.channelId}
138
         WHERE t.channel_id  = #{params.channelId}
149
         <if test="params.startDate == null or params.endDate == null">
144
         <if test="params.startDate == null or params.endDate == null">
150
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
145
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
151
         </if>
146
         </if>
152
-        <if test="params.type == 'day''">
147
+        <if test="params.type == 'day'">
153
             group by date_format( t.create_date, '%Y-%m-%d' )
148
             group by date_format( t.create_date, '%Y-%m-%d' )
154
         </if>
149
         </if>
155
-        <if test="params.type == 'month''">
150
+        <if test="params.type == 'month'">
156
             group by date_format( t.create_date, '%Y-%m' )
151
             group by date_format( t.create_date, '%Y-%m' )
157
         </if>
152
         </if>
158
     </select>
153
     </select>
159
     <select id="getSuccessCustomerDetail" resultType="com.yunzhi.marketing.xlk.vo.CustomerDetailVO">
154
     <select id="getSuccessCustomerDetail" resultType="com.yunzhi.marketing.xlk.vo.CustomerDetailVO">
160
         SELECT
155
         SELECT
161
-        <if test="params.type == 'day''">
162
-            date_format( t.create_date, '%d' ) as coordinate,
163
-        </if>
164
-        <if test="params.type == 'month''">
165
-            date_format( t.create_date, '%m' ) as coordinate,
166
-        </if>
167
-        COUNT(1) as customerNum
156
+            date_format( t.create_date, '%%Y-%m-%d' ) as coordinate,
157
+            COUNT(1) as customerNum
168
         FROM
158
         FROM
169
         xlk_channel_customer t
159
         xlk_channel_customer t
170
         LEFT join ta_recommend_customer r on t.customer_id = r.customer_id
160
         LEFT join ta_recommend_customer r on t.customer_id = r.customer_id
177
         <if test="params.startDate == null or params.endDate == null">
167
         <if test="params.startDate == null or params.endDate == null">
178
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
168
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
179
         </if>
169
         </if>
180
-        <if test="params.type == 'day''">
170
+        <if test="params.type == 'day'">
181
             group by date_format( t.create_date, '%Y-%m-%d' )
171
             group by date_format( t.create_date, '%Y-%m-%d' )
182
         </if>
172
         </if>
183
-        <if test="params.type == 'month''">
173
+        <if test="params.type == 'month'">
184
             group by date_format( t.create_date, '%Y-%m' )
174
             group by date_format( t.create_date, '%Y-%m' )
185
         </if>
175
         </if>
186
     </select>
176
     </select>

+ 2
- 7
src/main/resources/mapper/xlk/CustomerVisitMapper.xml 查看文件

19
     </select>
19
     </select>
20
     <select id="getFollowCustomerDetail" resultType="com.yunzhi.marketing.xlk.vo.CustomerDetailVO">
20
     <select id="getFollowCustomerDetail" resultType="com.yunzhi.marketing.xlk.vo.CustomerDetailVO">
21
         SELECT
21
         SELECT
22
-        <if test="params.type == 'day''">
23
-            date_format( t.create_date, '%d' ) as coordinate,
24
-        </if>
25
-        <if test="params.type == 'month''">
26
-            date_format( t.create_date, '%m' ) as coordinate,
27
-        </if>
28
-        COUNT(1) as customerNum
22
+            date_format( t.create_date, '%Y-%m-%d' ) as coordinate,
23
+            COUNT(1) as customerNum
29
         FROM
24
         FROM
30
         xlk_channel_customer t
25
         xlk_channel_customer t
31
         INNER JOIN xlk_customer_visit v on t.customer_id = v.customer_id
26
         INNER JOIN xlk_customer_visit v on t.customer_id = v.customer_id