Authored by chenchao

Merge branch 'master' into test6.9.2

1 package com.yohoufo.order.controller; 1 package com.yohoufo.order.controller;
2 2
  3 +import com.yoho.core.dal.datasource.annotation.Database;
3 import com.yohoufo.common.ApiResponse; 4 import com.yohoufo.common.ApiResponse;
4 import com.yohoufo.order.model.InviteSettlementItemListVO; 5 import com.yohoufo.order.model.InviteSettlementItemListVO;
5 import com.yohoufo.order.model.InviteSettlementListVO; 6 import com.yohoufo.order.model.InviteSettlementListVO;
@@ -58,6 +59,7 @@ public class InviteSettlementController { @@ -58,6 +59,7 @@ public class InviteSettlementController {
58 } 59 }
59 60
60 @RequestMapping(value = "/erp/invite/settlement/help/settle") 61 @RequestMapping(value = "/erp/invite/settlement/help/settle")
  62 + @Database(ForceMaster = true)
61 public ApiResponse settle(@RequestParam(value = "settle_time", required = false) String settleTime) { 63 public ApiResponse settle(@RequestParam(value = "settle_time", required = false) String settleTime) {
62 inviteSettlementService.settle(Objects.nonNull(settleTime) ? LocalDateTime.parse(settleTime, DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) : LocalDateTime.now()); 64 inviteSettlementService.settle(Objects.nonNull(settleTime) ? LocalDateTime.parse(settleTime, DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) : LocalDateTime.now());
63 return new ApiResponse.ApiResponseBuilder().code(200).message("ok").build(); 65 return new ApiResponse.ApiResponseBuilder().code(200).message("ok").build();
@@ -151,6 +151,7 @@ public class InviterSettleService { @@ -151,6 +151,7 @@ public class InviterSettleService {
151 InviteSettlementItem.STATUS_SETTLED, 151 InviteSettlementItem.STATUS_SETTLED,
152 settlementId); 152 settlementId);
153 int totalElements = inviteSettlementItemMapper.selectCountByUidTypeAndInviteSettlementId(uid, type, settlementId); 153 int totalElements = inviteSettlementItemMapper.selectCountByUidTypeAndInviteSettlementId(uid, type, settlementId);
  154 + log.info("settle for calculateSettleAmountOfType1 totalElements is {}, uid is {}, uid is {}, settlementId is {}", totalElements, uid, type, settlementId);
154 return InviteSettlementUtils.calculateSettleAmountOfType1(totalElements); 155 return InviteSettlementUtils.calculateSettleAmountOfType1(totalElements);
155 } 156 }
156 157