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

Commit b530b661 authored by 胡佳晨's avatar 胡佳晨

修改 回调mongo

parent 79c76215
...@@ -102,12 +102,12 @@ public class MixOrderServiceImpl implements IMixOrderService { ...@@ -102,12 +102,12 @@ public class MixOrderServiceImpl implements IMixOrderService {
if (limitCount != 0) { if (limitCount != 0) {
int buyCount = redisUtils.incrMixLimit(mixId, uid); int buyCount = redisUtils.incrMixLimit(mixId, uid);
isUseLimit = true; isUseLimit = true;
log.debug("limit = "+buyCount); log.debug("limit = " + buyCount);
if (buyCount > limitCount) { if (buyCount > limitCount) {
redisUtils.decrMixLimit(mixId, uid); redisUtils.decrMixLimit(mixId, uid);
return ResponseDto.failure("超出限购数量"); return ResponseDto.failure("超出限购数量");
} }
}else{ } else {
int buyCount = redisUtils.incrMixLimit(mixId, uid); int buyCount = redisUtils.incrMixLimit(mixId, uid);
} }
//构建 各个商品信息 //构建 各个商品信息
...@@ -629,7 +629,7 @@ public class MixOrderServiceImpl implements IMixOrderService { ...@@ -629,7 +629,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
//redis //redis
redisUtils.setGoblinOrderSku(orderSkuVo.getOrderSkuId(), orderSkuVo); redisUtils.setGoblinOrderSku(orderSkuVo.getOrderSkuId(), orderSkuVo);
//mongo //mongo
mongoUtils.updateGoblinOrderSkuVo(orderSkuVo.getOrderSkuId(), orderSkuVo); queueUtils.setMongoList(GoblinOrderSkuVo.class.getSimpleName(), "orderSkuId", orderSkuVo.getOrderSkuId(), GoblinRedisConst.REDIS_GOBLIN_ORDER_SKU, 2);
//mongo 添加操作日志 //mongo 添加操作日志
GoblinOrderLogVo logVo = GoblinOrderLogVo.getNew(); GoblinOrderLogVo logVo = GoblinOrderLogVo.getNew();
logVo.setOrderId(orderVo.getOrderId()); logVo.setOrderId(orderVo.getOrderId());
...@@ -647,6 +647,7 @@ public class MixOrderServiceImpl implements IMixOrderService { ...@@ -647,6 +647,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
logVo.setOperationType(GoblinStatusConst.Type.OPERATION_TYPE_1.getValue()); logVo.setOperationType(GoblinStatusConst.Type.OPERATION_TYPE_1.getValue());
logVo.setCreatedAt(LocalDateTime.now()); logVo.setCreatedAt(LocalDateTime.now());
mongoUtils.insertGoblinOrderLogVo(logVo); mongoUtils.insertGoblinOrderLogVo(logVo);
//mysql //mysql
sqlDataSku.add(new Object[]{ sqlDataSku.add(new Object[]{
GoblinStatusConst.Status.ORDER_STATUS_2.getValue(), now, GoblinStatusConst.Status.ORDER_STATUS_2.getValue(), now,
...@@ -662,9 +663,7 @@ public class MixOrderServiceImpl implements IMixOrderService { ...@@ -662,9 +663,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
orderVo.setPaymentType(paymentType); orderVo.setPaymentType(paymentType);
orderVo.setOrderSkuVoIds(skuList); orderVo.setOrderSkuVoIds(skuList);
redisUtils.setGoblinOrder(orderId, orderVo); redisUtils.setGoblinOrder(orderId, orderVo);
redisUtils.setOffCode(orderVo.getWriteOffCode(), orderVo.getMasterOrderCode()); queueUtils.setMongoList(GoblinStoreOrderVo.class.getSimpleName(), "orderId", orderVo.getOrderId(), GoblinRedisConst.REDIS_GOBLIN_ORDER, 2);
//mongo
mongoUtils.updateGoblinStoreOrderVo(orderId, orderVo);
//mysql //mysql
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_ORDER_CREATE_PAY.getKey(), queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_ORDER_CREATE_PAY.getKey(),
SqlMapping.gets(sqls, sqlDataOrder, sqlDataSku)); SqlMapping.gets(sqls, sqlDataOrder, sqlDataSku));
......
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