Authored by chenchao

Merge branch 'master' into test6.9.2

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