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

Commit 8ee7c233 authored by zhangguobing's avatar zhangguobing

~api:券商品业务-支付成功更新订单状态调整&发放券;

parent 9cdbece8
......@@ -78,6 +78,8 @@ public class GoblinOrderSkuVo implements Serializable, Cloneable {
@ApiModelProperty(value = "erp-仓库号")
private String erpWarehouseNo;
@ApiModelProperty(value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int skuType;
@ApiModelProperty(value = "是否实名[0-否|1-是,表示该商品需要实名关联],这里默认0")
private int isTrueName;
@ApiModelProperty(value = "关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证")
......
......@@ -29,6 +29,11 @@ public class GoblinOrderSkuAssoc implements Serializable {
*/
private String orderSkuId;
/**
* 是否实名[0-否|1-是,表示该商品需要实名关联]
*/
private Integer isTrueName;
/**
* 关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证
*/
......
......@@ -1272,6 +1272,7 @@ create table goblin_order_sku_assoc
mid bigint unsigned auto_increment primary key,
order_sku_id varchar(64) default '' null comment '订单sku_id',
is_true_name smallint default 0 comment '是否实名[0-否|1-是,表示该商品需要实名关联]',
id_type tinyint not null comment '关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证',
id_name varchar(30) not null comment '关联人姓名',
id_no varchar(30) not null comment '关联人证件号码',
......
......@@ -325,9 +325,9 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
if (2 == goodsInfoVo.getSpuType()) {// 券类商品为一个SPU对应一个SKU
initGoodsSkuCouponObjs.add(new Object[]{skuId, skuInfoVo.getBusiType(), skuInfoVo.getCouType(), skuInfoVo.getUseScope(),
skuInfoVo.getValFace(), skuInfoVo.getIsTrueName(), skuInfoVo.getValidity(), skuInfoVo.getEffectAt(), skuInfoVo.getExpireAt()});
initCandyCouponObjs.add(new Object[]{spuId, goodsInfoVo.getName(), goodsInfoVo.getIntro(), skuInfoVo.getBusiType(),
initCandyCouponObjs.add(new Object[]{skuId, goodsInfoVo.getName(), goodsInfoVo.getIntro(), skuInfoVo.getBusiType(),
skuInfoVo.getCouType(), skuInfoVo.getValFace(), skuInfoVo.getValidity(), skuInfoVo.getIsTrueName(),
skuInfoVo.getEffectAt(), skuInfoVo.getExpireAt(), goodsInfoVo.getCreatedBy(), goodsInfoVo.getCreatedAt()
skuInfoVo.getEffectAt(), skuInfoVo.getExpireAt(), createdBy, createdAt
});
String busiName = "%s系列";
switch (skuInfoVo.getUseScope()) {// 适用范围[101-音乐节|102-小型演出(livehouse演出)|103-巡演]
......@@ -341,7 +341,7 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
busiName = String.format(busiName, "巡演");
break;
}
initCandyCouponRuleObjs.add(new Object[]{IDGenerator.nextTimeId2(), spuId, skuInfoVo.getUseScope(), busiName, "", 1});
initCandyCouponRuleObjs.add(new Object[]{IDGenerator.nextTimeId2(), skuId, skuInfoVo.getUseScope(), busiName, "", 1});
}
skuInfoVo.getSkuSpecList().forEach(skuSpecDto -> initGoodsSkuSpecValueObjs.add(new Object[]{
......
......@@ -669,12 +669,14 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
// 关联人信息处理
GoblinOrderSkuParam orderSkuParam = orderSkuParamMap.get(orderSku.getSkuId());
if (Objects.isNull(orderSkuParam)) {
orderSkuVo.setSkuType(2);
orderSkuVo.setIsTrueName(1);
orderSkuVo.setIdType(orderSkuParam.getIdType());
orderSkuVo.setIdName(orderSkuParam.getIdName());
orderSkuVo.setIdNo(orderSkuParam.getIdNo());
initGoblinOrderSkuAssocObjs.add(new Object[]{orderSkuVo.getSkuId(), orderSkuVo.getIdType(), orderSkuVo.getIdName(), orderSkuVo.getIdNo(), uid, orderSkuVo.getCreatedAt()});
initGoblinOrderSkuAssocObjs.add(new Object[]{orderSkuVo.getSkuId(), orderSkuVo.getIsTrueName(),
orderSkuVo.getIdType(), orderSkuVo.getIdName(), orderSkuVo.getIdNo(), uid, orderSkuVo.getCreatedAt()});
}
redisUtils.setGoblinOrderSku(orderSkuVo.getOrderSkuId(), orderSkuVo);
goblinOrderSkuIdList.add(orderSkuVo.getOrderSkuId());
......@@ -916,13 +918,23 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
orderId, now, now
});
sqls.add(SqlMapping.get("goblin_order.pay.sku"));
sqls.add(SqlMapping.get("candy_mgt_coupon.pay.sku"));// 券类商品发放券
LinkedList<Object[]> initCandyMgtCouponObjs = CollectionUtil.linkedListObjectArr();// 券类商品发放券
List<String> skuList = orderVo.getOrderSkuVoIds();
for (String orderSkuVoIds : skuList) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuVoIds);
//增加销量
log.debug("增加销量 spuId=" + orderSkuVo.getSpuId() + ",skuId=" + orderSkuVo.getSkuId());
redisUtils.incrSkuSaleCount(orderSkuVo.getSpuId(), orderSkuVo.getSkuId(), orderSkuVo.getNum());
// orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_2.getValue());
if (2 == orderSkuVo.getSkuType()) {// 判定券类商品时,直接设置状态为已完成
storeOrder.setStatus(GoblinStatusConst.Status.ORDER_STATUS_4.getValue());
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_4.getValue());
// 券类商品创建发放券任务
initCandyMgtCouponObjs.add(new Object[]{IDGenerator.nextMilliId(), orderSkuVo.getSkuId(), orderVo.getUserMobile(), now, "COUPON_SKU", now});
} else {
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_2.getValue());
}
if (orderVo.getDeviceFrom().equals("micropay") && GoblinStatusConst.MarketPreStatus.MARKET_PRE_ZHENGZAI.getValue().equals(orderVo.getMarketType())) {
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_4.getValue());
orderSkuVo.setPushTime(now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
......
......@@ -33,12 +33,13 @@ 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.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_sku_assoc.insert=INSERT INTO goblin_order_sku_assoc (order_sku_id,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
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)
#---- \u8BA2\u5355\u521B\u5EFA&\u652F\u4ED8
goblin_order.pay.order=UPDATE goblin_store_order SET payment_type = ? ,payment_id=?,pay_code = ? ,pay_time = ?,write_off_code = ? ,zhengzai_status =?,status = ? ,updated_at = ?,push_time = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.pay.sku=UPDATE goblin_order_sku SET status = ? ,updated_at = ? ,push_time = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
candy_mgt_coupon.pay.sku=INSERT INTO candy_mgt_coupon (mcoupon_id,coupon_id,state,event_amt,event_type,event_limit,event_at,operator,created_at) VALUES (?,?,0,1,2,?,?,?,?)
goblin_order.store.refundPrice=UPDATE goblin_store_order SET price_refund = ? ,status = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.refundSkuPrice=UPDATE goblin_order_sku SET price_refund = ? ,status = ? , updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.refundBackOrder=UPDATE goblin_back_order SET status = ? ,refund_at=?, updated_at = ? WHERE back_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