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

Commit 3f5a7127 authored by 胡佳晨's avatar 胡佳晨

Merge branch 'dev_gjy_now_order_detals_paycode' into dev_erp_gjy

parents bafbac98 590d186c
...@@ -2,6 +2,7 @@ package com.liquidnet.service.goblin.service.impl; ...@@ -2,6 +2,7 @@ package com.liquidnet.service.goblin.service.impl;
import com.liquidnet.commons.lang.util.CollectionUtil; import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.CurrentUtil; import com.liquidnet.commons.lang.util.CurrentUtil;
import com.liquidnet.service.adam.dto.vo.AdamUserInfoVo;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.SqlMapping; import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.base.constant.MQConst; import com.liquidnet.service.base.constant.MQConst;
...@@ -38,6 +39,8 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService { ...@@ -38,6 +39,8 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService {
GoblinOrderUtils orderUtils; GoblinOrderUtils orderUtils;
@Autowired @Autowired
IGoblinOrderAppService goblinOrderAppService; IGoblinOrderAppService goblinOrderAppService;
@Autowired
AdamRedisUtils adamRedisUtils;
@Override @Override
...@@ -234,6 +237,12 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService { ...@@ -234,6 +237,12 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService {
if (storeOrderVo.getUserId().equals(uid)) { if (storeOrderVo.getUserId().equals(uid)) {
continue; continue;
} }
AdamUserInfoVo userInfoVo = adamRedisUtils.getUserInfoVoByUid(uid);
if (userInfoVo == null) {
return ResponseDto.failure("用户不存在");
}
String userMobile = userInfoVo.getMobile();
storeOrderVo.setUserMobile(userMobile);
storeOrderVo.setUserId(uid); storeOrderVo.setUserId(uid);
priceActual = priceActual.add(storeOrderVo.getPriceActual()); priceActual = priceActual.add(storeOrderVo.getPriceActual());
//mongo //mongo
...@@ -244,7 +253,7 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService { ...@@ -244,7 +253,7 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService {
//mysql //mysql
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(), queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(),
SqlMapping.get("goblin_order.zhengzai.bind", SqlMapping.get("goblin_order.zhengzai.bind",
uid, now, storeOrderVo.getOrderId(), now, now)); userMobile, uid, now, storeOrderVo.getOrderId(), now, now));
} }
if (priceActual.compareTo(BigDecimal.ZERO) != 0) { if (priceActual.compareTo(BigDecimal.ZERO) != 0) {
goblinOrderUtils.integral(uid, priceActual, "购买商品", 1); goblinOrderUtils.integral(uid, priceActual, "购买商品", 1);
......
package com.liquidnet.service.goblin.util;
import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.service.adam.constant.AdamRedisConst;
import com.liquidnet.service.adam.dto.vo.AdamUserInfoVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Slf4j
@Component
public class AdamRedisUtils {
@Autowired
public RedisUtil redisUtil;
public AdamUserInfoVo getUserInfoVoByUid(String uid) {
String rk = AdamRedisConst.INFO_USER.concat(uid);
long s = System.currentTimeMillis();
AdamUserInfoVo vo = (AdamUserInfoVo) redisUtil.get(rk);
log.debug("#RDM耗时:{}ms", System.currentTimeMillis() - s);
return vo;
}
}
...@@ -96,7 +96,7 @@ goblin.self.market.insertRelation=INSERT INTO goblin_marketing_zhengzai (`zhengz ...@@ -96,7 +96,7 @@ goblin.self.market.insertRelation=INSERT INTO goblin_marketing_zhengzai (`zhengz
goblin.self.market.updateRelation=UPDATE goblin_marketing_zhengzai SET price_marketing=? ,stock_marketing=? , buy_factor=?,buy_roster=?,buy_limit=?,updated_at=? WHERE self_market_id =? and store_id =? and sku_id = ? goblin.self.market.updateRelation=UPDATE goblin_marketing_zhengzai SET price_marketing=? ,stock_marketing=? , buy_factor=?,buy_roster=?,buy_limit=?,updated_at=? WHERE self_market_id =? and store_id =? and sku_id = ?
goblin.self.market.delSpuRelation=UPDATE goblin_marketing_zhengzai SET del_flag = ?,updated_at = ? WHERE self_market_id =? and store_id =? and spu_id=? goblin.self.market.delSpuRelation=UPDATE goblin_marketing_zhengzai SET del_flag = ?,updated_at = ? WHERE self_market_id =? and store_id =? and spu_id=?
#---- \u8BA2\u5355\u7ED1\u5B9A[\u6B63\u5728\u4E0B\u5355] \u51FA\u8D27 #---- \u8BA2\u5355\u7ED1\u5B9A[\u6B63\u5728\u4E0B\u5355] \u51FA\u8D27
goblin_order.zhengzai.bind=UPDATE goblin_store_order SET user_id = ? ,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.zhengzai.bind=UPDATE goblin_store_order SET user_mobile = ? , user_id = ? ,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.zhengzai.push=UPDATE goblin_store_order SET zhengzai_status = ? ,status = ?,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.zhengzai.push=UPDATE goblin_store_order SET zhengzai_status = ? ,status = ?,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
#---- \u5546\u94FA\u8BA2\u5355\u64CD\u4F5C #---- \u5546\u94FA\u8BA2\u5355\u64CD\u4F5C
goblin_order.store.cancel=UPDATE goblin_store_order SET status = ? ,cancel_time = ? , cancel_reason = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.cancel=UPDATE goblin_store_order SET status = ? ,cancel_time = ? , cancel_reason = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
......
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