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

Commit 5544f016 authored by 胡佳晨's avatar 胡佳晨

提交 nft 下单接口

parent 8f934f85
......@@ -151,6 +151,20 @@ public class GoblinNftOrderVo implements Serializable, Cloneable {
@ApiModelProperty(value = "混合售名称")
private String mixName;
@ApiModelProperty(value = "erp-spuNo")
private String spuErpCode;
@ApiModelProperty(value = "erp-skuNo")
private String skuErpCode;
@ApiModelProperty(value = "ERP类型[wangdian-旺店通]")
private String erpType;
@ApiModelProperty(value = "ERP托管[0-否|1-是],默认0")
private int erpHosting;
@ApiModelProperty(value = "erp-仓库号")
private String erpWarehouseNo;
public String getMixId() {
return mixId == null ? "" : mixId;
}
......@@ -194,6 +208,13 @@ public class GoblinNftOrderVo implements Serializable, Cloneable {
this.setPayCode(source.getPayCode());
this.setIpAddress(source.getIpAddress());
this.setCreatedAt(source.getCreatedAt());
this.setSpuErpCode(source.getSpuErpCode());
this.setSkuErpCode(source.getSkuErpCode());
this.setErpType(source.getErpType());
this.setErpWarehouseNo(source.getErpWarehouseNo());
this.setErpHosting(source.getErpHosting());
return this;
}
......
......@@ -415,6 +415,19 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
nftOrder.setPayCountdownMinute(5);
nftOrder.setIpAddress(CurrentUtil.getCliIpAddr());
nftOrder.setCreatedAt(now);
GoblinGoodsSkuInfoVo skuVo ;
GoblinGoodsInfoVo spuVo = goblinRedisUtils.getGoodsInfoVo(spuId);
if(boxSkuId==null || "".equals(boxSkuId)) {
skuVo = goblinRedisUtils.getGoodsSkuInfoVo(payParam.getSkuId());
}else{
skuVo = goblinRedisUtils.getGoodsSkuInfoVo(boxSkuId);
}
nftOrder.setSpuErpCode(spuVo.getSpuErpCode());
nftOrder.setSkuErpCode(skuVo.getSkuErpCode());
nftOrder.setErpType(spuVo.getErpType());
nftOrder.setErpWarehouseNo(skuVo.getErpWarehouseNo());
nftOrder.setErpHosting(skuVo.getErpHosting());
return nftOrder;
} catch (Exception e) {
......@@ -532,7 +545,8 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
nftOrder.getNum(), nftOrder.getStoreId(), nftOrder.getStoreName(), nftOrder.getOrderCode(), nftOrder.getUserId(), nftOrder.getUserName(), nftOrder.getUserMobile(), nftOrder.getPriceTotal(), nftOrder.getPriceCoupon(),
nftOrder.getStorePriceCoupon(), nftOrder.getPriceRedEnvelope(), nftOrder.getPriceVoucher(), nftOrder.getPriceActual(), nftOrder.getUcouponId(), nftOrder.getStoreCouponId(), nftOrder.getRedEnvelopeCode(), nftOrder.getStatus(), nftOrder.getSource(),
nftOrder.getOrderType(), nftOrder.getPayType(), nftOrder.getDeviceFrom(), nftOrder.getVersion(), nftOrder.getPayCountdownMinute(), nftOrder.getIpAddress(), nftOrder.getCreatedAt(), nftOrder.getPayCode(),
nftOrder.getSkuTitle(), nftOrder.getListId(), nftOrder.getExCode(),"",""
nftOrder.getSkuTitle(), nftOrder.getListId(), nftOrder.getExCode(),"","",
nftOrder.getSpuErpCode(), nftOrder.getSkuErpCode(), nftOrder.getErpType(), nftOrder.getErpWarehouseNo(), nftOrder.getErpHosting(),
});
// 订单vo
......@@ -734,6 +748,7 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
String uid = orderVo.getUserId();
Integer orderStatusOld = orderVo.getStatus();
LocalDateTime now = LocalDateTime.now();
goblinOrderUtils.addErpPush(orderVo.getOrderId(),orderVo.getErpHosting());
// 更新订单信息
if (StringUtil.isEmpty(syncOrderParam.getPaymentType())) {
orderVo.setPaymentType("");
......
......@@ -599,7 +599,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
}
sqlDataSku.add(new Object[]{
orderSku.getOrderSkuId(), orderSku.getOrderId(), orderSku.getSpuId(), orderSku.getSpuName(), orderSku.getSpuPic(), orderSku.getSkuId(), orderSku.getNum(), orderSku.getSkuPrice(), orderSku.getSkuPriceActual(), orderSku.getSkuName(),
orderSku.getSkuNo(), orderSku.getSkuImage(), orderSku.getSkuSpecs(), orderSku.getPriceVoucher(), orderSku.getSpuErpCode(), orderSku.getSkuErpCode(), orderSku.getErpType(), orderSku.getErpWarehouseNo(), orderSku.getErpHosting(), orderSku.getCreatedAt()
orderSku.getSkuNo(), orderSku.getSkuImage(), orderSku.getSkuSpecs(), orderSku.getPriceVoucher(),
orderSku.getSpuErpCode(), orderSku.getSkuErpCode(), orderSku.getErpType(), orderSku.getErpWarehouseNo(), orderSku.getErpHosting(),
orderSku.getCreatedAt()
});
//订单 orderSku Vo
GoblinOrderSkuVo orderSkuVo = GoblinOrderSkuVo.getNew().copy(orderSku);
......
......@@ -47,7 +47,7 @@ goblin_order.store.refundLog=INSERT INTO goblin_back_order_log (`back_order_log_
goblin_order.store.backOrder=INSERT INTO goblin_back_order (`back_order_id`,`back_code`,`order_id`,`order_code`,`store_id`,`user_id`,`sku_id_nums`,`type`,`reason`,`describes`,`real_back_price`,`status`,`created_at`,`audit_at`,`error_reason`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
#-------- NFT -------
goblin_nft_order.insert=INSERT INTO goblin_nft_order (`order_id`,`spu_id`,`sku_id`,`box_sku_id`,`num`,`store_id`,`store_name`,`order_code`,`user_id`,`user_name`,`user_mobile`,`price_total`,`price_coupon`,`store_price_coupon`,`price_red_envelope`,`price_voucher`,`price_actual`,`ucoupon_id`,`store_coupon_id`,`red_envelope_code`,`status`,`source`,`order_type`,`pay_type`,`device_from`,`version`,`pay_countdown_minute`,`ip_address`,`created_at`,`pay_code`,sku_title,list_id,ex_code,mix_id,`mix_code`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_nft_order.insert=INSERT INTO goblin_nft_order (`order_id`,`spu_id`,`sku_id`,`box_sku_id`,`num`,`store_id`,`store_name`,`order_code`,`user_id`,`user_name`,`user_mobile`,`price_total`,`price_coupon`,`store_price_coupon`,`price_red_envelope`,`price_voucher`,`price_actual`,`ucoupon_id`,`store_coupon_id`,`red_envelope_code`,`status`,`source`,`order_type`,`pay_type`,`device_from`,`version`,`pay_countdown_minute`,`ip_address`,`created_at`,`pay_code`,sku_title,list_id,ex_code,mix_id,`mix_code`,`spu_erp_code`,`sku_erp_code`,`erp_type`,`erp_warehouse_no`,`erp_hosting`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_nft_order.update.pay=UPDATE goblin_nft_order SET payment_type = ?, payment_id=?, pay_code = ?, pay_time = ?, status = ?, updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_nft_order.update.refund=UPDATE goblin_nft_order SET status = ?, updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_nft_order_refund.insert=INSERT INTO goblin_nft_order_refund (`order_refund_id`,`refund_code`,`order_id`,`order_code`,`store_id`,`user_id`,`price`,`status`,`error_reason`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?)
......
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