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

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

修改 回调mongo

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