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

Commit 62a2238e authored by 胡佳晨's avatar 胡佳晨

增加 下单增加积分

parent 51e4bc01
......@@ -309,9 +309,12 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
//支付时间
LocalDateTime now = LocalDateTime.now();
String[] array = redisUtils.getMasterCode(orderMasterCode);
String uid = "zhengzai";
BigDecimal priceActual = BigDecimal.ZERO;
for (String orderId : array) {
GoblinStoreOrderVo orderVo = redisUtils.getGoblinOrder(orderId);
String uid = orderVo.getUserId();
uid = orderVo.getUserId();
priceActual = priceActual.add(orderVo.getPriceActual());
if (orderVo == null) {
log.error("订单号:" + orderMasterCode + " 订单不存在");
return "fail";//订单不存在
......@@ -393,6 +396,10 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_USER_ORDER_OPERA.getKey(),
SqlMapping.gets(sqls, sqlDataOrder, sqlDataSku));
}
//加分
if (noZhengzaiOrder(uid)) {
orderUtils.doTask(uid, priceActual);
}
} else {
// 业务处理失败
log.info("处理失败");
......@@ -469,4 +476,8 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
}
return canRefundTimeDateTime;
}
private boolean noZhengzaiOrder(String uid) {
return !uid.equals("zhengzai");
}
}
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