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

Commit d2755042 authored by 张国柄's avatar 张国柄

Merge remote-tracking branch 'origin/dev_goblin' into dev_goblin

parents 49ea1299 d1eed510
......@@ -92,6 +92,14 @@ public class GoblinFrontSelectGoodsServiceImpl extends ServiceImpl<GoblinFrontSe
goblinFrontSelectGoods1.setOrderType(goblinFrontSelectGoods.getOrderType());
goblinFrontSelectGoodsMapper.insert(goblinFrontSelectGoods1);
}
}else{
GoblinFrontSelectGoods goblinFrontSelectGoods1=new GoblinFrontSelectGoods();
goblinFrontSelectGoods1.setUpdateTime(LocalDateTime.now());
goblinFrontSelectGoods1.setDelTag(0);
goblinFrontSelectGoods1.setCreateTime(LocalDateTime.now());
goblinFrontSelectGoods1.setSelectGoodsId(IDGenerator.nextSnowId());
goblinFrontSelectGoods1.setOrderType(goblinFrontSelectGoods.getOrderType());
goblinFrontSelectGoodsMapper.insert(goblinFrontSelectGoods1);
}
/* if(goblinFrontSelectGoods.getMid()>0){
goblinFrontSelectGoods.setUpdateTime(LocalDateTime.now());
......
......@@ -98,7 +98,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
}
AdamRscPolymer01Vo userVo = null;
if (noZhengzaiOrder(uid)) {
long time1 = System.currentTimeMillis();
userVo = orderUtils.adamAddressEnterMember(uid, null, addressId);
log.info("adam接口调用:"+(System.currentTimeMillis()-time1)+"秒");
}
AdamAddressesVo addressesVo;
boolean isMember;
......@@ -228,6 +230,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
}
private GoblinOrderPreParam order(GoblinOrderParam param, GoblinOrderStoreParam storeParam, String uid, boolean isMember, AdamAddressesVo addressesVo, String orderMasterCode, String orderId, String orderCode, List<String> platformCodeList, List<String> storeCodeList) throws Exception {
long timeAll = System.currentTimeMillis();
String platVoucherCode = storeParam.getPlatVoucherCode();
String storeVoucherCode = storeParam.getStoreVoucherCode();
String storeId = storeParam.getStoreId();
......@@ -346,7 +349,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
}
long time1 = System.currentTimeMillis();
ResponseDto<GoblinUseResultVo> storeCouponVo = feignGoblinBaseClient.useCoupon(storeVoucherCode, "购买商品[" + orderCode + "]", storeTotalPrice, spuIds, uid);
log.info("goblin接口调用:"+(time1-System.currentTimeMillis()));
log.info("goblin接口调用:"+(System.currentTimeMillis()-time1)+"秒");
String typeVoucher;
if (!(storeCouponVo == null || storeCouponVo.getData() == null)) {
storeVoucherPrice = storeCouponVo.getData().getValue();
......@@ -422,10 +425,12 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
preParam.setStoreOrder(storeOrder);
preParam.setOrderAttr(orderAttr);
preParam.setOrderSkuList(goblinOrderSkuList);
log.info("订单生成耗时:"+(System.currentTimeMillis()-timeAll)+"秒");
return preParam;
}
private ResponseDto<GoblinPayInnerResultVo> payOrder(GoblinOrderPreParam preParam, List<GoblinOrderSqlParam> sqlParams, String uid) {
long timeAll = System.currentTimeMillis();
//是否免费
boolean isFree = false;
GoblinPayInnerResultVo payInnerResultVo;
......@@ -532,7 +537,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
GoblinOrderSkuVo orderSkuVo = GoblinOrderSkuVo.getNew();
BeanUtils.copyProperties(orderSku, orderSkuVo);
redisUtils.setGoblinOrderSku(orderSkuVo.getOrderSkuId(), orderSkuVo);
long time2 = System.currentTimeMillis();
mongoUtils.insertGoblinOrderSkuVo(orderSkuVo);
log.info("mongo新增订单:"+(System.currentTimeMillis()-time2)+"秒");
goblinOrderSkuIdList.add(orderSkuVo.getOrderSkuId());
}
GoblinStoreOrder storeOrder = item.getStoreOrder();
......@@ -562,7 +569,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
orderVo.setCreatedAt(getNowTime());
redisUtils.setGoblinOrder(orderVo.getOrderId(), orderVo);
redisUtils.setMasterCode(preParam.getOrderMasterCode(), preParam.getOrderIdList().substring(1));
long time3=System.currentTimeMillis();
mongoUtils.insertGoblinStoreOrderVo(orderVo);
log.info("mongo新增子订单:"+(System.currentTimeMillis()-time3)+"秒");
//redis 订单列表
if (noZhengzaiOrder(uid)) {
if (orderVo.getMarketType() == null) {
......@@ -588,6 +597,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
syncOrderParam.setPaymentType(null);
syncOrderParam.setStatus(1);
syncOrder(syncOrderParam);
log.info("支付单接口耗时:"+(System.currentTimeMillis()-timeAll)+"秒");
return ResponseDto.success(payInnerResultVo);
} else {
return ResponseDto.success(payInnerResultVo);
......
......@@ -35,7 +35,6 @@ public class GoblinOrderUtils {
GoblinRedisUtils redisUtils;
public AdamRscPolymer01Vo adamAddressEnterMember(String uid, String enterIds, String addressId) {
long time1 = System.currentTimeMillis();
try {
MultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString();
header.add("Accept", "application/json;charset=UTF-8");
......@@ -46,7 +45,6 @@ public class GoblinOrderUtils {
String resultData = HttpUtil.post(adamUrl + "/adam/rsc/inquire/of_buy_ticket", params, header);
ResponseDto<AdamRscPolymer01Vo> vo = JsonUtils.fromJson(resultData, new TypeReference<ResponseDto<AdamRscPolymer01Vo>>() {
});
log.info("adam接口调用:"+(time1-System.currentTimeMillis()));
if (null != vo.getData()) {
return vo.getData();
} else {
......
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