记得上下班打卡 | git大法好,push需谨慎

Commit 13bfe4f2 authored by 胡佳晨's avatar 胡佳晨

修改参数打印和快递价格

parent 63c66cdd
...@@ -345,6 +345,7 @@ public class GoblinRedisConst { ...@@ -345,6 +345,7 @@ public class GoblinRedisConst {
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
public static final String GOBLIN_ORDER_LOG = PREFIX.concat("order:log:");//无用 public static final String GOBLIN_ORDER_LOG = PREFIX.concat("order:log:");//无用
public static final String GOBLIN_EXPRESS_PRICE = PREFIX.concat("express:price");//快递费
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
public static final String GOBLIN_NUM_LIST = PREFIX.concat("nft:num:");//$key+":"+$skuId 根据skuId获取序号list public static final String GOBLIN_NUM_LIST = PREFIX.concat("nft:num:");//$key+":"+$skuId 根据skuId获取序号list
......
...@@ -151,7 +151,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -151,7 +151,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
return orderUtils.orderException(skuAndPreListAndNumber, platformCodeList, storeCodeList, uid, "参数异常"); return orderUtils.orderException(skuAndPreListAndNumber, platformCodeList, storeCodeList, uid, "参数异常");
// throw new Exception("参数异常"); // throw new Exception("参数异常");
} }
return payOrder(preParam, orderSqlParams, uid); ResponseDto<GoblinPayInnerResultVo> data = payOrder(preParam, orderSqlParams, uid);
log.info(UserPathDto.setData("下单(唤起支付)", param, data));
return data;
} catch (Exception e) { } catch (Exception e) {
log.error("Kylin Order Pay Error = {}", e); log.error("Kylin Order Pay Error = {}", e);
Long time3 = System.currentTimeMillis(); Long time3 = System.currentTimeMillis();
...@@ -356,7 +358,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -356,7 +358,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
if (addressesVo == null) { if (addressesVo == null) {
storeOrder.setPriceExpress(BigDecimal.ZERO); storeOrder.setPriceExpress(BigDecimal.ZERO);
} else { } else {
storeOrder.setPriceExpress(BigDecimal.TEN); storeOrder.setPriceExpress(redisUtils.getExpressPrice());
} }
storeOrder.setPriceTotal(storeTotalPrice.add(storeOrder.getPriceExpress())); storeOrder.setPriceTotal(storeTotalPrice.add(storeOrder.getPriceExpress()));
BigDecimal priceActual = storeOrder.getPriceTotal().subtract(voucherPrice).subtract(storeVoucherPrice); BigDecimal priceActual = storeOrder.getPriceTotal().subtract(voucherPrice).subtract(storeVoucherPrice);
...@@ -616,7 +618,6 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -616,7 +618,6 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
String sqlData = SqlMapping.gets(sqls, sqlDataSku, sqlDataOrder, sqlDataAttr); String sqlData = SqlMapping.gets(sqls, sqlDataSku, sqlDataOrder, sqlDataAttr);
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_ORDER_CREATE_PAY.getKey(), sqlData); queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_ORDER_CREATE_PAY.getKey(), sqlData);
log.info(UserPathDto.setData("下单(唤起支付)", preParam, payInnerResultVo));
if (isFree && preParam.getPayType().equals("huifu")) { if (isFree && preParam.getPayType().equals("huifu")) {
SyncOrderParam syncOrderParam = SyncOrderParam.getNew(); SyncOrderParam syncOrderParam = SyncOrderParam.getNew();
syncOrderParam.setOrderCode(preParam.getOrderMasterCode()); syncOrderParam.setOrderCode(preParam.getOrderMasterCode());
......
...@@ -14,6 +14,7 @@ import org.springframework.stereotype.Component; ...@@ -14,6 +14,7 @@ import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
...@@ -722,4 +723,15 @@ public class GoblinRedisUtils { ...@@ -722,4 +723,15 @@ public class GoblinRedisUtils {
return (int) obj; return (int) obj;
} }
} }
//获取快递费
public BigDecimal getExpressPrice(){
String rdk = GoblinRedisConst.GOBLIN_EXPRESS_PRICE;
Object obj = redisUtil.get(rdk);
if (obj == null) {
return BigDecimal.TEN;
} else {
return (BigDecimal) obj;
}
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment