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

Commit b731dbea authored by 姜秀龙's avatar 姜秀龙

收钱吧 下单:定时关闭 null bug解决

parent bdd81e6e
package com.liquidnet.service.goblin.dto.vo; package com.liquidnet.service.goblin.dto.vo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.liquidnet.service.goblin.entity.GoblinOrderAttr;
import com.liquidnet.service.goblin.entity.GoblinStoreOrder; import com.liquidnet.service.goblin.entity.GoblinStoreOrder;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AccessLevel;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.Getter;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -66,8 +67,10 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable { ...@@ -66,8 +67,10 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable {
@ApiModelProperty(value = "正在下单是否出货[0-未出货|1-已出货]") @ApiModelProperty(value = "正在下单是否出货[0-未出货|1-已出货]")
private Integer zhengzaiStatus; private Integer zhengzaiStatus;
@ApiModelProperty(value = " 券id") @ApiModelProperty(value = " 券id")
@Getter(AccessLevel.NONE)
private String ucouponId; private String ucouponId;
@ApiModelProperty(value = " 店铺券id") @ApiModelProperty(value = " 店铺券id")
@Getter(AccessLevel.NONE)
private String storeCouponId; private String storeCouponId;
@ApiModelProperty(value = " 支付类型[wepay-微信支付|alipay-阿里支付|douyinpay-抖音支付|unionpay-银联支付]") @ApiModelProperty(value = " 支付类型[wepay-微信支付|alipay-阿里支付|douyinpay-抖音支付|unionpay-银联支付]")
private String payType; private String payType;
...@@ -158,6 +161,17 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable { ...@@ -158,6 +161,17 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable {
return mixName == null ? "" : mixName; return mixName == null ? "" : mixName;
} }
/**
* 与历史数据/下游逻辑一致:未用券时为非 null 的空串,避免队里关单等处 {@code getXxx().equals("")} 在字段为 null 时 NPE。
* 字段本身仍可为 null(反序列化),对外读取统一走空串。
*/
public String getStoreCouponId() {
return storeCouponId == null ? "" : storeCouponId;
}
public String getUcouponId() {
return ucouponId == null ? "" : ucouponId;
}
public GoblinStoreOrderVo copy(GoblinStoreOrder source,int erpHosting) { public GoblinStoreOrderVo copy(GoblinStoreOrder source,int erpHosting) {
if (null == source) return this; if (null == source) return this;
......
...@@ -194,8 +194,7 @@ goblin_nft_order.update_artwork=UPDATE goblin_nft_order SET artwork_id=? WHERE o ...@@ -194,8 +194,7 @@ goblin_nft_order.update_artwork=UPDATE goblin_nft_order SET artwork_id=? WHERE o
goblin_sku.stock=UPDATE goblin_goods_sku SET sku_stock = ? , stock = ?, updated_at = ? WHERE sku_erp_code = ? and erp_warehouse_no = ? goblin_sku.stock=UPDATE goblin_goods_sku SET sku_stock = ? , stock = ?, updated_at = ? WHERE sku_erp_code = ? and erp_warehouse_no = ?
#---- #----
candy_user_coupon.update_apply_refund=UPDATE candy_user_coupon SET state=?,operator=?,updated_at=? WHERE ucoupon_id=? candy_user_coupon.update_apply_refund=UPDATE candy_user_coupon SET state=?,operator=?,updated_at=? WHERE ucoupon_id=?
# ----- \u6536\u94B1\u5427 ---- # \u6536\u94B1\u5427\u4E0B\u5355 INSERT \u5DF2\u8FC1\u81F3 order \u670D\u52A1\uff1aliquidnet-service-order-impl/sqlmap.properties \u4E2D goblin_sqb_order.insert
goblin_sqb_order.insert=INSERT INTO goblin_sqb_order (order_id,user_id,performances_id,spu_id,sku_id,quantity,amount,sqb_order_sn,sqb_order_signature,sqb_acquiring_sn, sqb_acquiring_sign,sqb_checkout_items_id,status,created_at,updated_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
# ---- \u624B\u73AF\u8BA2\u5355 ---- # ---- \u624B\u73AF\u8BA2\u5355 ----
goblin_bracelet_order_insert = INSERT INTO `goblin_bracelet_order`(`order_id`, `user_id`, `bind_name`, `bind_mobile`, `bind_idcard`, `req_date`, `goods_desc`, `wristband_id`, `wristband_price`, `amount_id`, `amount_price`, `req_seq_id`, `hf_seq_id`, `trade_type`, `party_order_id`, `price`, `price_total`, `price_refund`, `refund_price_charges`, `refund_number`, `status`, `pay_status`, `created_at`, `updated_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) goblin_bracelet_order_insert = INSERT INTO `goblin_bracelet_order`(`order_id`, `user_id`, `bind_name`, `bind_mobile`, `bind_idcard`, `req_date`, `goods_desc`, `wristband_id`, `wristband_price`, `amount_id`, `amount_price`, `req_seq_id`, `hf_seq_id`, `trade_type`, `party_order_id`, `price`, `price_total`, `price_refund`, `refund_price_charges`, `refund_number`, `status`, `pay_status`, `created_at`, `updated_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
......
...@@ -212,7 +212,8 @@ public class GoblinSqbOrderServiceImpl implements IGoblinSqbOrderService { ...@@ -212,7 +212,8 @@ public class GoblinSqbOrderServiceImpl implements IGoblinSqbOrderService {
final String orderId = IDGenerator.nextSnowId(); final String orderId = IDGenerator.nextSnowId();
String masterOrderCode = IDGenerator.nextTimeId(); String masterOrderCode = IDGenerator.nextTimeId();
String orderCode = IDGenerator.nextTimeId(); String orderCode = IDGenerator.nextTimeId();
String now = LocalDateTime.now().format(DTF); LocalDateTime orderCreatedAt = LocalDateTime.now();
String now = orderCreatedAt.format(DTF);
// 获取商品和 SKU 信息,供后续订单基础信息拼接使用 // 获取商品和 SKU 信息,供后续订单基础信息拼接使用
GoblinGoodsInfoVo goodsInfo = goblinMongoUtils.getGoodsInfoVo(spuId); GoblinGoodsInfoVo goodsInfo = goblinMongoUtils.getGoodsInfoVo(spuId);
...@@ -245,7 +246,7 @@ public class GoblinSqbOrderServiceImpl implements IGoblinSqbOrderService { ...@@ -245,7 +246,7 @@ public class GoblinSqbOrderServiceImpl implements IGoblinSqbOrderService {
storeOrderVo.setDeviceFrom("shouqianba"); storeOrderVo.setDeviceFrom("shouqianba");
storeOrderVo.setOrderType(0); storeOrderVo.setOrderType(0);
storeOrderVo.setWriteOffCode("EMPTY"); storeOrderVo.setWriteOffCode("EMPTY");
storeOrderVo.setPayCountdownMinute(15); storeOrderVo.setPayCountdownMinute(5);
storeOrderVo.setCreatedAt(now); storeOrderVo.setCreatedAt(now);
// 2) 构建基础商城 SKU VO (GoblinOrderSkuVo) // 2) 构建基础商城 SKU VO (GoblinOrderSkuVo)
...@@ -347,7 +348,7 @@ public class GoblinSqbOrderServiceImpl implements IGoblinSqbOrderService { ...@@ -347,7 +348,7 @@ public class GoblinSqbOrderServiceImpl implements IGoblinSqbOrderService {
if (queueUtils != null) { if (queueUtils != null) {
queueUtils.sendMsgByRedis(com.liquidnet.service.base.constant.MQConst.GoblinQueue.GOBLIN_ORDER_CREATE_PAY.getKey(), queueUtils.sendMsgByRedis(com.liquidnet.service.base.constant.MQConst.GoblinQueue.GOBLIN_ORDER_CREATE_PAY.getKey(),
com.liquidnet.service.base.SqlMapping.gets(sqls, sqlDataSku, sqlDataOrder, sqlDataSqbOrder)); com.liquidnet.service.base.SqlMapping.gets(sqls, sqlDataSku, sqlDataOrder, sqlDataSqbOrder));
// 待支付超时回调等处理也可放入原有股票队列逻辑,暂省略 queueUtils.sendMsgByRedisGoblinStock(masterOrderCode, orderCreatedAt, "GOBLIN", 5);
} }
log.info("[收钱吧下单] 完成 MongoDB 及 MQ 落库,orderId={}, masterCode={}", orderId, masterOrderCode); log.info("[收钱吧下单] 完成 MongoDB 及 MQ 落库,orderId={}, masterCode={}", orderId, masterOrderCode);
......
...@@ -33,6 +33,8 @@ kylin_order_refund_entities.overtimeRefund=INSERT INTO kylin_order_refund_entiti ...@@ -33,6 +33,8 @@ kylin_order_refund_entities.overtimeRefund=INSERT INTO kylin_order_refund_entiti
goblin.order.create.order_insert=INSERT INTO goblin_store_order (`master_order_code`,`order_id`,`store_id`,`store_name`,`order_code`,`user_id`,`user_name`,`user_mobile`,`price_total`,`pay_code`,`price_actual`,`price_refund`,`price_express`,`price_coupon`,`store_price_coupon`,`price_voucher`,`status`,`ucoupon_id`,`store_coupon_id`,`pay_type`,`device_from`,`source`,`version`,`is_member`,`order_type`,`write_off_code`,`pay_countdown_minute`,`ip_address`,`market_id`,`market_type`,`created_at`,`mix_id`,`mix_code`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) goblin.order.create.order_insert=INSERT INTO goblin_store_order (`master_order_code`,`order_id`,`store_id`,`store_name`,`order_code`,`user_id`,`user_name`,`user_mobile`,`price_total`,`pay_code`,`price_actual`,`price_refund`,`price_express`,`price_coupon`,`store_price_coupon`,`price_voucher`,`status`,`ucoupon_id`,`store_coupon_id`,`pay_type`,`device_from`,`source`,`version`,`is_member`,`order_type`,`write_off_code`,`pay_countdown_minute`,`ip_address`,`market_id`,`market_type`,`created_at`,`mix_id`,`mix_code`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin.order.create.attr_insert=INSERT INTO goblin_order_attr (`order_attr_id`,`order_id`,`express_contacts`,`express_address`,`express_address_detail`,`express_phone`,`express_type`,`created_at`) VALUES (?,?,?,?,?,?,?,?) goblin.order.create.attr_insert=INSERT INTO goblin_order_attr (`order_attr_id`,`order_id`,`express_contacts`,`express_address`,`express_address_detail`,`express_phone`,`express_type`,`created_at`) VALUES (?,?,?,?,?,?,?,?)
goblin.order.create.sku_insert=INSERT INTO goblin_order_sku (`order_sku_id`,`order_id`,`spu_id`,`spu_name`,`spu_pic`,`sku_id`,`num`,`sku_price`,`sku_price_actual`,`sku_name`,`sku_no`,`sku_image`,`sku_specs`,`price_voucher`,`spu_erp_code`,`sku_erp_code`,`erp_type`,`erp_warehouse_no`,`erp_hosting`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) goblin.order.create.sku_insert=INSERT INTO goblin_order_sku (`order_sku_id`,`order_id`,`spu_id`,`spu_name`,`spu_pic`,`sku_id`,`num`,`sku_price`,`sku_price_actual`,`sku_name`,`sku_no`,`sku_image`,`sku_specs`,`price_voucher`,`spu_erp_code`,`sku_erp_code`,`erp_type`,`erp_warehouse_no`,`erp_hosting`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
# \u6536\u94B1\u5427\u6269\u5C55\u8868\uff08\u4e0e goblin \u670d\u52a1 sqlmap \u4e00\u81f4\uff09
goblin_sqb_order.insert=INSERT INTO goblin_sqb_order (order_id,user_id,performances_id,spu_id,sku_id,quantity,amount,sqb_order_sn,sqb_order_signature,sqb_acquiring_sn, sqb_acquiring_sign,sqb_checkout_items_id,status,created_at,updated_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_order_sku_assoc.insert=INSERT INTO goblin_order_sku_assoc (order_sku_id,is_true_name,id_type,id_name,id_no,operator,created_at) VALUES (?,?,?,?,?,?,?) goblin_order_sku_assoc.insert=INSERT INTO goblin_order_sku_assoc (order_sku_id,is_true_name,id_type,id_name,id_no,operator,created_at) VALUES (?,?,?,?,?,?,?)
#---- \u518D\u6B21\u652F\u4ED8 #---- \u518D\u6B21\u652F\u4ED8
goblin_order.pay.again=UPDATE goblin_store_order SET pay_type = ? ,device_from = ? ,pay_code = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.pay.again=UPDATE goblin_store_order SET pay_type = ? ,device_from = ? ,pay_code = ? 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