2.4.5: hotfix-citypartner prize

master
Yixian 3 years ago
parent a8bc6dfc62
commit fa42e449d0

@ -511,7 +511,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
PayChannel payChannel = PayChannel.fromChannelCode(channel);
if (payChannel == PayChannel.ALIPAY_APS_IN_STORE || payChannel == PayChannel.ALIPAY_APS_CASHIER) {
Map<Boolean, List<JSONObject>> groupByPayType = oneChannel.getValue().stream().collect(Collectors.groupingBy(e -> e.getString("pay_type").equals("alipay_cn")));
Map<Boolean, List<JSONObject>> groupByPayType = oneChannel.getValue().stream().collect(Collectors.groupingBy(e -> "alipay_cn".equalsIgnoreCase(e.getString("pay_type"))));
for (Map.Entry<Boolean, List<JSONObject>> payType : groupByPayType.entrySet()) {
BigDecimal totalAps = BigDecimal.ZERO;
BigDecimal total_surageAps = BigDecimal.ZERO;
@ -525,7 +525,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
BigDecimal channelRate = null;
if (payChannel == PayChannel.ALIPAY_APS_IN_STORE) {
if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("aliapy_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("alipay_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : ((orgInfo.getBigDecimal("retail_interchange_fee_value").add(orgInfo.getBigDecimal("retail_service_fee_value"))).divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}

@ -35,6 +35,7 @@ import org.springframework.util.Assert;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.MessageFormat;
import java.util.Date;
import java.util.List;
@ -154,7 +155,7 @@ public class RefundServiceImpl implements RefundService, ApplicationEventPublish
OperatorType type = account != null ? OperatorType.PARTNER : OperatorType.MANAGER;
boolean requireAudit = type == OperatorType.PARTNER && PartnerRole.getRole(account.getIntValue("role")) == PartnerRole.CASHIER
&& clientConfig.getBooleanValue("enable_refund_auth");
logger.debug("applyer type=" + type + "; require audit=" + requireAudit);
logger.debug("applyer type={}; require audit={}", type, requireAudit);
paymentApi.clientRefundBalanceCheck(clientId, orderId, currency, feeAmount);
Assert.notNull(order, "Order Not exists");

Loading…
Cancel
Save