张延森 2 lat temu
rodzic
commit
6c2b999b72

+ 1
- 1
src/main/java/com/yunzhi/marketing/broker/controller/BkNoticeController.java Wyświetl plik

62
         IPage<BkNotice> pg = new Page<>(pageNum, pageSize);
62
         IPage<BkNotice> pg = new Page<>(pageNum, pageSize);
63
         QueryWrapper<BkNotice> queryWrapper = new QueryWrapper<>();
63
         QueryWrapper<BkNotice> queryWrapper = new QueryWrapper<>();
64
         queryWrapper.eq(!StringUtils.isEmpty(noticeType), "notice_type", noticeType);
64
         queryWrapper.eq(!StringUtils.isEmpty(noticeType), "notice_type", noticeType);
65
-        queryWrapper.eq("wx".equals(client) && mine, "person_id", getPersonId(request));
65
+        queryWrapper.eq("wx".equals(client) && null != mine && mine, "person_id", getPersonId(request));
66
         queryWrapper.gt("status", CommConstant.STATUS_DELETE);
66
         queryWrapper.gt("status", CommConstant.STATUS_DELETE);
67
 
67
 
68
         if ("admin".equals(client)) {
68
         if ("admin".equals(client)) {

+ 1
- 3
src/main/java/com/yunzhi/marketing/service/impl/TaRecommendCustomerServiceImpl.java Wyświetl plik

814
             taRecommendCustomerVO.setCustomerVisit(customerVisit);
814
             taRecommendCustomerVO.setCustomerVisit(customerVisit);
815
         }
815
         }
816
 
816
 
817
-        LambdaQueryWrapper<ChannelCustomer> channelCustomerLambdaQueryWrapper = new LambdaQueryWrapper<>();
818
-        channelCustomerLambdaQueryWrapper.eq(ChannelCustomer::getCustomerId,id);
819
-        ChannelCustomer customer = channelCustomerMapper.selectOne(channelCustomerLambdaQueryWrapper);
817
+        ChannelCustomer customer = channelCustomerMapper.getMoreInfoById(null, id);
820
         if (null != customer) {
818
         if (null != customer) {
821
             taRecommendCustomerVO.setChannelCustomer(customer);
819
             taRecommendCustomerVO.setChannelCustomer(customer);
822
         }
820
         }

+ 2
- 2
src/main/java/com/yunzhi/marketing/xlk/controller/ChannelCustomerController.java Wyświetl plik

160
      */
160
      */
161
     @ApiOperation(value = "森哥看这里-wx-驻场确认结佣", notes = "森哥看这里-wx-驻场确认结佣")
161
     @ApiOperation(value = "森哥看这里-wx-驻场确认结佣", notes = "森哥看这里-wx-驻场确认结佣")
162
     @RequestMapping(value="/{plat}/marking/{bizType}",method= RequestMethod.PUT)
162
     @RequestMapping(value="/{plat}/marking/{bizType}",method= RequestMethod.PUT)
163
-    public ResponseBean commissionCustomer(@RequestParam String bizType,
163
+    public ResponseBean commissionCustomer(@PathVariable String bizType,
164
                                            @RequestBody MarkingSignatoryCustomerDTO params) throws Exception {
164
                                            @RequestBody MarkingSignatoryCustomerDTO params) throws Exception {
165
-        List<String> whiteList = Arrays.asList("commission", "signatory");
165
+        List<String> whiteList = Arrays.asList("commission", "signatory", "all-payment");
166
         if (!whiteList.contains(bizType)) {
166
         if (!whiteList.contains(bizType)) {
167
             return ResponseBean.error("404接口不存在", ResponseBean.ERROR_ILLEGAL_PARAMS);
167
             return ResponseBean.error("404接口不存在", ResponseBean.ERROR_ILLEGAL_PARAMS);
168
         }
168
         }

+ 3
- 0
src/main/java/com/yunzhi/marketing/xlk/dto/MarkingSignatoryCustomerDTO.java Wyświetl plik

36
 
36
 
37
     /** 待结算佣金 **/
37
     /** 待结算佣金 **/
38
     private Integer unsettledCommission;
38
     private Integer unsettledCommission;
39
+
40
+    /** 本次结佣 **/
41
+    private Integer currentCommission;
39
 }
42
 }

+ 1
- 1
src/main/java/com/yunzhi/marketing/xlk/mapper/ChannelCustomerMapper.java Wyświetl plik

57
 
57
 
58
     List<CustomerDetailVO> getSuccessCustomerDetail(@Param("params") StatisticsDTO statisticsDTo);
58
     List<CustomerDetailVO> getSuccessCustomerDetail(@Param("params") StatisticsDTO statisticsDTo);
59
 
59
 
60
-    ChannelCustomer getMoreInfoById(String id);
60
+    ChannelCustomer getMoreInfoById(@Param("channelCustomerId") String channelCustomerId, @Param("customerId") String customerId);
61
 
61
 
62
     List<ChannelCustomer> getRecommendedOrExpired(@Param("buildingId") String buildingId,@Param("phone") String phone);
62
     List<ChannelCustomer> getRecommendedOrExpired(@Param("buildingId") String buildingId,@Param("phone") String phone);
63
 }
63
 }

+ 4
- 4
src/main/java/com/yunzhi/marketing/xlk/service/impl/ChannelCustomerServiceImpl.java Wyświetl plik

511
 
511
 
512
     @Override
512
     @Override
513
     public ChannelCustomer getMoreInfoById(String id) {
513
     public ChannelCustomer getMoreInfoById(String id) {
514
-        return channelCustomerMapper.getMoreInfoById(id);
514
+        return channelCustomerMapper.getMoreInfoById(id, null);
515
     }
515
     }
516
 
516
 
517
     @Override
517
     @Override
608
         customer.setTotalCommission(intIfNvl(params.getTotalCommission()));
608
         customer.setTotalCommission(intIfNvl(params.getTotalCommission()));
609
 
609
 
610
         Integer settledCommission = intIfNvl(bkAccountRecordMapper.getTotalChargesBy(customer.getChannelCustomerId(), bizType));
610
         Integer settledCommission = intIfNvl(bkAccountRecordMapper.getTotalChargesBy(customer.getChannelCustomerId(), bizType));
611
-        settledCommission += intIfNvl(params.getSettledCommission()); // 最新的需要加上本次结算佣金
611
+        settledCommission += intIfNvl(params.getCurrentCommission()); // 最新的需要加上本次结算佣金
612
         recommendPerson.setSettledCommission(intIfNvl(recommendPerson.getSettledCommission()) -
612
         recommendPerson.setSettledCommission(intIfNvl(recommendPerson.getSettledCommission()) -
613
                 intIfNvl(customer.getSettledCommission()) +
613
                 intIfNvl(customer.getSettledCommission()) +
614
                 settledCommission);
614
                 settledCommission);
621
         // 生成佣金记录
621
         // 生成佣金记录
622
         BkAccountRecord bkAccountRecord = bkAccountRecordMapper.getRecordBy(customer.getChannelCustomerId(), bizType);
622
         BkAccountRecord bkAccountRecord = bkAccountRecordMapper.getRecordBy(customer.getChannelCustomerId(), bizType);
623
         if (bkAccountRecord != null) {
623
         if (bkAccountRecord != null) {
624
-            bkAccountRecord.setCharges(params.getSettledCommission());
624
+            bkAccountRecord.setCharges(params.getCurrentCommission());
625
             bkAccountRecordMapper.updateById(bkAccountRecord);
625
             bkAccountRecordMapper.updateById(bkAccountRecord);
626
         } else {
626
         } else {
627
             bkAccountRecord = new BkAccountRecord();
627
             bkAccountRecord = new BkAccountRecord();
630
             bkAccountRecord.setBuildingId(taBuilding.getBuildingId());
630
             bkAccountRecord.setBuildingId(taBuilding.getBuildingId());
631
             bkAccountRecord.setBuildingName(StringUtils.ifNull(taBuilding.getName(), taBuilding.getBuildingName()));
631
             bkAccountRecord.setBuildingName(StringUtils.ifNull(taBuilding.getName(), taBuilding.getBuildingName()));
632
             bkAccountRecord.setCustomerName(customer.getName());
632
             bkAccountRecord.setCustomerName(customer.getName());
633
-            bkAccountRecord.setCharges(intIfNvl(params.getSettledCommission()));
633
+            bkAccountRecord.setCharges(intIfNvl(params.getCurrentCommission()));
634
             bkAccountRecord.setChargeType(1);
634
             bkAccountRecord.setChargeType(1);
635
             bkAccountRecord.setChargeCode(bizType);
635
             bkAccountRecord.setChargeCode(bizType);
636
             bkAccountRecord.setStatus(CommConstant.STATUS_NORMAL);
636
             bkAccountRecord.setStatus(CommConstant.STATUS_NORMAL);

+ 7
- 2
src/main/resources/mapper/xlk/ChannelCustomerMapper.xml Wyświetl plik

192
             xlk_channel_customer t
192
             xlk_channel_customer t
193
                 LEFT JOIN ta_channel s ON t.channel_id = s.channel_id
193
                 LEFT JOIN ta_channel s ON t.channel_id = s.channel_id
194
             LEFT JOIN ta_person m ON m.person_id = t.recommend_person
194
             LEFT JOIN ta_person m ON m.person_id = t.recommend_person
195
-        WHERE
196
-            t.channel_customer_id = #{id}
195
+        WHERE 1 = 1
196
+             <if test="channelCustomerId != null and channelCustomerId != ''">
197
+                 AND t.channel_customer_id = #{channelCustomerId}
198
+            </if>
199
+            <if test="customerId != null and customerId != ''">
200
+                AND t.customer_id = #{customerId}
201
+            </if>
197
     </select>
202
     </select>
198
     <select id="getRecommendedOrExpired" resultType="com.yunzhi.marketing.xlk.entity.ChannelCustomer">
203
     <select id="getRecommendedOrExpired" resultType="com.yunzhi.marketing.xlk.entity.ChannelCustomer">
199
         SELECT
204
         SELECT