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

Commit c7f85720 authored by 胡佳晨's avatar 胡佳晨

Merge branch 'pre' into pre_change_galaxy

parents cc99fcb2 0830421d
...@@ -30,7 +30,7 @@ public class AnticipateValueVo implements Cloneable { ...@@ -30,7 +30,7 @@ public class AnticipateValueVo implements Cloneable {
@ApiModelProperty(value = "预约结束时间") @ApiModelProperty(value = "预约结束时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime aboutEndDate; private LocalDateTime aboutEndDate;
@ApiModelProperty("预约状态(0:未开始,1:可预约,3:已结束)") @ApiModelProperty("预约状态(0:未开始,1:可预约,2:已结束)")
private Integer state; private Integer state;
@ApiModelProperty("预约规则") @ApiModelProperty("预约规则")
private String rule; private String rule;
......
...@@ -6,6 +6,7 @@ import lombok.Data; ...@@ -6,6 +6,7 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime;
/** /**
* @Author: GH * @Author: GH
...@@ -34,4 +35,7 @@ public class GoblinGoodAnticipateUserVo implements Serializable { ...@@ -34,4 +35,7 @@ public class GoblinGoodAnticipateUserVo implements Serializable {
@ApiModelProperty(value = "用户状态") @ApiModelProperty(value = "用户状态")
private Integer state; private Integer state;
@ApiModelProperty(value = "用户预约时间")
private LocalDateTime createdDate;
} }
...@@ -27,8 +27,8 @@ public class GoblinNftOrderListParam { ...@@ -27,8 +27,8 @@ public class GoblinNftOrderListParam {
private String shortOrderCode; private String shortOrderCode;
@ApiModelProperty(value = "订单编号") @ApiModelProperty(value = "订单编号")
private String orderCode; private String orderCode;
@ApiModelProperty(value = "发放HASH") @ApiModelProperty(value = "哈希值")
private String tradingTxhash; private String nftId;
@ApiModelProperty(value = "购买方式") @ApiModelProperty(value = "购买方式")
private Integer orderType; private Integer orderType;
@ApiModelProperty(value = "支付方式") @ApiModelProperty(value = "支付方式")
......
...@@ -27,8 +27,8 @@ public class GoblinNftOrderRefundListParam { ...@@ -27,8 +27,8 @@ public class GoblinNftOrderRefundListParam {
private String shortOrderCode; private String shortOrderCode;
@ApiModelProperty(value = "订单编号") @ApiModelProperty(value = "订单编号")
private String orderCode; private String orderCode;
@ApiModelProperty(value = "发放HASH") @ApiModelProperty(value = "哈希值")
private String tradingTxhash; private String nftId;
@ApiModelProperty(value = "购买方式") @ApiModelProperty(value = "购买方式")
private Integer orderType; private Integer orderType;
@ApiModelProperty(value = "支付方式") @ApiModelProperty(value = "支付方式")
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
<input type="text" name="orderCode"/> <input type="text" name="orderCode"/>
</li> </li>
<li> <li>
<label>发放HASH</label> <label>哈希值</label>
<input type="text" name="tradingTxhash"/> <input type="text" name="nftId"/>
</li> </li>
</div> </div>
<div class="col-sm-12"> <div class="col-sm-12">
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
}, },
{ {
field: 'createdAt', field: 'createdAt',
title: '发起时间' title: '申请时间'
}, },
{ {
field: 'userId', field: 'userId',
...@@ -175,12 +175,12 @@ ...@@ -175,12 +175,12 @@
title: '藏品名称' title: '藏品名称'
}, },
{ {
field: 'releaseAt', field: 'tradingAt',
title: '发行时间' title: '上链时间'
}, },
{ {
field: 'tradingTxhash', field: 'nftId',
title: '发放HASH' title: '哈希值'
}] }]
}; };
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
<input type="text" name="orderCode"/> <input type="text" name="orderCode"/>
</li> </li>
<li> <li>
<label>发放HASH</label> <label>哈希值</label>
<input type="text" name="tradingTxhash"/> <input type="text" name="nftId"/>
</li> </li>
</div> </div>
<div class="col-sm-12"> <div class="col-sm-12">
...@@ -146,6 +146,10 @@ ...@@ -146,6 +146,10 @@
return $.table.selectDictLabel(statusDic, value); return $.table.selectDictLabel(statusDic, value);
}, },
}, },
{
field: 'createdAt',
title: '下单时间'
},
{ {
field: 'payTime', field: 'payTime',
title: '支付时间' title: '支付时间'
...@@ -155,12 +159,12 @@ ...@@ -155,12 +159,12 @@
title: '藏品名称' title: '藏品名称'
}, },
{ {
field: 'releaseAt', field: 'tradingAt',
title: '发行时间' title: '上链时间'
}, },
{ {
field: 'tradingTxhash', field: 'nftId',
title: '发放HASH' title: '哈希值'
}] }]
}; };
......
...@@ -24,14 +24,16 @@ public class GoblinNftOrderListExcelDto implements Serializable, Cloneable { ...@@ -24,14 +24,16 @@ public class GoblinNftOrderListExcelDto implements Serializable, Cloneable {
private String priceActual; private String priceActual;
@Excel(name = "订单状态") @Excel(name = "订单状态")
private String status; private String status;
@Excel(name = "下大美时间")
private String createdAt;
@Excel(name = "支付时间") @Excel(name = "支付时间")
private String payTime; private String payTime;
@Excel(name = "藏品名称") @Excel(name = "藏品名称")
private String name; private String name;
@Excel(name = "发放时间") @Excel(name = "上链时间")
private String releaseAt; private String tradingAt;
@Excel(name = "发放HASH") @Excel(name = "哈希值")
private String tradingTxhash; private String nftId;
private static final GoblinNftOrderListExcelDto obj = new GoblinNftOrderListExcelDto(); private static final GoblinNftOrderListExcelDto obj = new GoblinNftOrderListExcelDto();
...@@ -64,10 +66,11 @@ public class GoblinNftOrderListExcelDto implements Serializable, Cloneable { ...@@ -64,10 +66,11 @@ public class GoblinNftOrderListExcelDto implements Serializable, Cloneable {
this.setPayType(DictUtils.getDictLabel("zhengzai_pay_type", String.valueOf(source.getPayType()))); this.setPayType(DictUtils.getDictLabel("zhengzai_pay_type", String.valueOf(source.getPayType())));
this.setPriceActual(source.getPriceActual()); this.setPriceActual(source.getPriceActual());
this.setStatus(DictUtils.getDictLabel("zhengzai_goblin_nft_order_status", String.valueOf(source.getStatus()))); this.setStatus(DictUtils.getDictLabel("zhengzai_goblin_nft_order_status", String.valueOf(source.getStatus())));
this.setCreatedAt(source.getCreatedAt());
this.setPayTime(source.getPayTime()); this.setPayTime(source.getPayTime());
this.setName(source.getName()); this.setName(source.getName());
this.setReleaseAt(source.getReleaseAt()); this.setTradingAt(source.getTradingAt());
this.setTradingTxhash(source.getTradingTxhash()); this.setNftId(source.getNftId());
return this; return this;
} }
} }
...@@ -206,8 +206,6 @@ liquidnet: ...@@ -206,8 +206,6 @@ liquidnet:
android: android:
appkey: 5c6cf6cbb465f592e4000bae appkey: 5c6cf6cbb465f592e4000bae
appMasterSecret: dmsho74wlpd1hp7vrwp9bjehzwo29pza appMasterSecret: dmsho74wlpd1hp7vrwp9bjehzwo29pza
shumei:
url:
easemob: easemob:
api-url: https://a1.easemob.com api-url: https://a1.easemob.com
org-name: 1106210901175651 org-name: 1106210901175651
......
...@@ -207,8 +207,6 @@ liquidnet: ...@@ -207,8 +207,6 @@ liquidnet:
android: android:
appkey: 5c6cf6cbb465f592e4000bae appkey: 5c6cf6cbb465f592e4000bae
appMasterSecret: dmsho74wlpd1hp7vrwp9bjehzwo29pza appMasterSecret: dmsho74wlpd1hp7vrwp9bjehzwo29pza
shumei:
url:
easemob: easemob:
api-url: https://a1.easemob.com api-url: https://a1.easemob.com
org-name: 1106210901175651 org-name: 1106210901175651
...@@ -230,5 +228,4 @@ liquidnet: ...@@ -230,5 +228,4 @@ liquidnet:
expressType: 2 # 默认顺丰特快 expressType: 2 # 默认顺丰特快
depositumInfo: 演出纸质票 depositumInfo: 演出纸质票
#application-test-end #application-test-end
\ No newline at end of file
...@@ -41,4 +41,3 @@ liquidnet: ...@@ -41,4 +41,3 @@ liquidnet:
apple: apple:
urlVerify: https://sandbox.itunes.apple.com/verifyReceipt urlVerify: https://sandbox.itunes.apple.com/verifyReceipt
...@@ -111,7 +111,6 @@ global-auth: ...@@ -111,7 +111,6 @@ global-auth:
- ${liquidnet.info.context}/nftGoods/list - ${liquidnet.info.context}/nftGoods/list
- ${liquidnet.info.context}/nftGoods/detail - ${liquidnet.info.context}/nftGoods/detail
- ${liquidnet.info.context}/rsc/** - ${liquidnet.info.context}/rsc/**
oncheck-url-pattern: oncheck-url-pattern:
- -
# ----------------------------------------------------------- # -----------------------------------------------------------
......
...@@ -14,11 +14,11 @@ liquidnet: ...@@ -14,11 +14,11 @@ liquidnet:
level: debug level: debug
# rabbitmq: # rabbitmq:
# connection-timeout: 5000 # connection-timeout: 5000
mysql: # mysql:
database-name: dev_ln_scene # database-name: dev_ln_scene
mongodb: # mongodb:
sslEnabled: false # sslEnabled: false
database: dev_ln_scene # database: dev_ln_scene
dragon: dragon:
url: ${liquidnet.service.dragon.notifyUrl} url: ${liquidnet.service.dragon.notifyUrl}
alipay: alipay:
......
...@@ -14,11 +14,11 @@ liquidnet: ...@@ -14,11 +14,11 @@ liquidnet:
level: info level: info
# rabbitmq: # rabbitmq:
# connection-timeout: 5000 # connection-timeout: 5000
mysql: # mysql:
database-name: test_ln_scene # database-name: test_ln_scene
mongodb: # mongodb:
sslEnabled: false # sslEnabled: false
database: test_ln_scene # database: test_ln_scene
dragon: dragon:
url: ${liquidnet.service.dragon.notifyUrl} url: ${liquidnet.service.dragon.notifyUrl}
alipay: alipay:
......
...@@ -150,3 +150,5 @@ acpsdk: ...@@ -150,3 +150,5 @@ acpsdk:
middleCertPath: ${liquidnet.dragon.unionpay.certs-path}/${liquidnet.dragon.unionpay.certs-prefix}_middle.cer middleCertPath: ${liquidnet.dragon.unionpay.certs-path}/${liquidnet.dragon.unionpay.certs-prefix}_middle.cer
# 验签根证书路径(银联提供) # 验签根证书路径(银联提供)
rootCertPath: ${liquidnet.dragon.unionpay.certs-path}/${liquidnet.dragon.unionpay.certs-prefix}_root.cer rootCertPath: ${liquidnet.dragon.unionpay.certs-path}/${liquidnet.dragon.unionpay.certs-prefix}_root.cer
apple:
urlVerify: ${liquidnet.dragon.apple.urlVerify}
\ No newline at end of file
...@@ -11,7 +11,8 @@ public class GoblinNftOrderListDto { ...@@ -11,7 +11,8 @@ public class GoblinNftOrderListDto {
private String priceActual; private String priceActual;
private Integer status; private Integer status;
private String payTime; private String payTime;
private String createdAt;
private String name; private String name;
private String releaseAt; private String tradingAt;
private String tradingTxhash; private String nftId;
} }
...@@ -16,7 +16,8 @@ public class GoblinNftOrderRefundListDto { ...@@ -16,7 +16,8 @@ public class GoblinNftOrderRefundListDto {
private Integer orderType; private Integer orderType;
private String payType; private String payType;
private String payTime; private String payTime;
private String orderCreatedAt;
private String name; private String name;
private String releaseAt; private String tradingAt;
private String tradingTxhash; private String nftId;
} }
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
<select id="searchList" resultType="com.liquidnet.service.goblin.dto.admin.GoblinNftOrderListDto"> <select id="searchList" resultType="com.liquidnet.service.goblin.dto.admin.GoblinNftOrderListDto">
select select
a.user_id,a.order_code,a.order_type,a.pay_type,a.price_actual,a.status,a.pay_time, a.user_id,a.order_code,a.order_type,a.pay_type,a.price_actual,a.status,a.pay_time,a.created_at,
b.name, b.name,
c.release_at, c.trading_txhash c.trading_at, c.nft_id
from goblin_nft_order as a from goblin_nft_order as a
left join goblin_goods_sku as b on b.sku_id = a.sku_id left join goblin_goods_sku as b on b.sku_id = a.sku_id
left join goblin_user_digital_artwork as c on c.order_id = a.order_id left join goblin_user_digital_artwork as c on c.order_id = a.order_id
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
<if test="orderCode!=''"> <if test="orderCode!=''">
and a.order_code = #{orderCode} and a.order_code = #{orderCode}
</if> </if>
<if test="tradingTxhash!=''"> <if test="nftId!=''">
and c.trading_txhash = #{tradingTxhash} and c.nft_id = #{nftId}
</if> </if>
<if test="orderType != null and orderType!=''"> <if test="orderType != null and orderType!=''">
and a.order_type = #{orderType} and a.order_type = #{orderType}
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
<select id="searchList" resultType="com.liquidnet.service.goblin.dto.admin.GoblinNftOrderRefundListDto"> <select id="searchList" resultType="com.liquidnet.service.goblin.dto.admin.GoblinNftOrderRefundListDto">
select select
d.refund_code,d.price,d.status,d.refund_at,d.error_reason,d.created_at, d.refund_code,d.price,d.status,d.refund_at,d.error_reason,d.created_at,
a.user_id,a.order_code,a.order_type,a.pay_type,a.pay_time, a.user_id,a.order_code,a.order_type,a.pay_type,a.pay_time,a.created_at as order_created_at,
b.name, b.name,
c.release_at, c.trading_txhash c.trading_at, c.nft_id
from goblin_nft_order_refund as d from goblin_nft_order_refund as d
left join goblin_nft_order as a on a.order_id = d.order_id left join goblin_nft_order as a on a.order_id = d.order_id
left join goblin_goods_sku as b on b.sku_id = a.sku_id left join goblin_goods_sku as b on b.sku_id = a.sku_id
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<if test="orderCode!=''"> <if test="orderCode!=''">
and a.order_code = #{orderCode} and a.order_code = #{orderCode}
</if> </if>
<if test="tradingTxhash!=''"> <if test="nftId!=''">
and c.trading_txhash = #{tradingTxhash} and c.nft_id = #{nftId}
</if> </if>
<if test="orderType != null and orderType!=''"> <if test="orderType != null and orderType!=''">
and a.order_type = #{orderType} and a.order_type = #{orderType}
......
...@@ -220,10 +220,10 @@ CREATE TABLE `goblin_goods_anticipate_user` ( ...@@ -220,10 +220,10 @@ CREATE TABLE `goblin_goods_anticipate_user` (
`phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '手机号', `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '手机号',
`sku_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'sku_id', `sku_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'sku_id',
`state` int NOT NULL DEFAULT 0 COMMENT '状态(0:正常(默认))', `state` int NOT NULL DEFAULT 0 COMMENT '状态(0:正常(默认))',
`created_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '预约表关联user表' ROW_FORMAT = Dynamic; ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '预约表关联user表' ROW_FORMAT = Dynamic;
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `goblin_goods_anticipate_value`; DROP TABLE IF EXISTS `goblin_goods_anticipate_value`;
......
...@@ -17,6 +17,7 @@ import org.apache.commons.lang.StringUtils; ...@@ -17,6 +17,7 @@ import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.LinkedList; import java.util.LinkedList;
/** /**
...@@ -64,6 +65,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS ...@@ -64,6 +65,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
String mobile = StringUtils.defaultString(((String) CurrentUtil.getTokenClaims().get(CurrentUtil.TOKEN_MOBILE)), ""); String mobile = StringUtils.defaultString(((String) CurrentUtil.getTokenClaims().get(CurrentUtil.TOKEN_MOBILE)), "");
user.setPhone(mobile); user.setPhone(mobile);
user.setState(0); user.setState(0);
user.setCreatedDate(LocalDateTime.now());
//mongodb记录 //mongodb记录
goblinRedisUtils.setUserAboutSku(user); goblinRedisUtils.setUserAboutSku(user);
//用户没有预约过 //用户没有预约过
...@@ -72,7 +74,8 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS ...@@ -72,7 +74,8 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
user.getUid(), user.getUid(),
skuId, skuId,
user.getPhone(), user.getPhone(),
0 0,
user.getCreatedDate()
}); });
sendRedis("goblin_goods_anticipate_user", sqlValue); sendRedis("goblin_goods_anticipate_user", sqlValue);
goblinRedisUtils.setSkuIdPeople(skuId); goblinRedisUtils.setSkuIdPeople(skuId);
......
...@@ -139,7 +139,7 @@ goblin_goods_anticipate=INSERT INTO goblin_goods_anticipate(ant_id,`rule`,create ...@@ -139,7 +139,7 @@ goblin_goods_anticipate=INSERT INTO goblin_goods_anticipate(ant_id,`rule`,create
goblin_goods_anticipate_value=INSERT INTO goblin_goods_anticipate_value (uid,ant_id,sku_name,sku_id,spu_id,about_people,actual_people,rule,about_start_date,about_end_date,created_date,del_tag) VALUES(?,?,?,?,?,?,?,?,?,?,?,?) goblin_goods_anticipate_value=INSERT INTO goblin_goods_anticipate_value (uid,ant_id,sku_name,sku_id,spu_id,about_people,actual_people,rule,about_start_date,about_end_date,created_date,del_tag) VALUES(?,?,?,?,?,?,?,?,?,?,?,?)
goblin_goods_anticipate_value_update_proper=UPDATE goblin_goods_anticipate_value SET about_people = ?,update_date = NOW() WHERE sku_id = ? goblin_goods_anticipate_value_update_proper=UPDATE goblin_goods_anticipate_value SET about_people = ?,update_date = NOW() WHERE sku_id = ?
goblin_goods_anticipate_value_delete=UPDATE goblin_goods_anticipate_value SET `del_tag` = 1,update_date = NOW() WHERE sku_id = ? goblin_goods_anticipate_value_delete=UPDATE goblin_goods_anticipate_value SET `del_tag` = 1,update_date = NOW() WHERE sku_id = ?
goblin_goods_anticipate_user=INSERT INTO goblin_goods_anticipate_user(uid,sku_id,phone,state) VALUES(?,?,?,?) goblin_goods_anticipate_user=INSERT INTO goblin_goods_anticipate_user(uid,sku_id,phone,state,created_date) VALUES(?,?,?,?,?)
goblin_goods_anticipate_user_update=UPDATE goblin_goods_anticipate_user SET state = 1 WHERE uid = ? AND sku_id = ? goblin_goods_anticipate_user_update=UPDATE goblin_goods_anticipate_user SET state = 1 WHERE uid = ? AND sku_id = ?
goblin_goods_anticipate_user_update_sku=UPDATE goblin_goods_anticipate_user SET state = 1 WHERE sku_id = ? goblin_goods_anticipate_user_update_sku=UPDATE goblin_goods_anticipate_user SET state = 1 WHERE sku_id = ?
#---- \u4E1A\u52A1\u8D26\u53F7\u8BB0\u5F55 #---- \u4E1A\u52A1\u8D26\u53F7\u8BB0\u5F55
......
...@@ -379,7 +379,7 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService { ...@@ -379,7 +379,7 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
httpData.add("clientIp", CurrentUtil.getCliIpAddr()); httpData.add("clientIp", CurrentUtil.getCliIpAddr());
httpData.add("notifyUrl", synUrl); httpData.add("notifyUrl", synUrl);
httpData.add("createDate", LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); httpData.add("createDate", LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
httpData.add("expireTime", "5"); httpData.add("expireTime", "10");
httpData.add("payType", nftOrder.getPayType()); httpData.add("payType", nftOrder.getPayType());
httpData.add("deviceFrom", nftOrder.getDeviceFrom()); httpData.add("deviceFrom", nftOrder.getDeviceFrom());
if (nftOrder.getDeviceFrom().equals("js") || nftOrder.getDeviceFrom().equals("applet")) { if (nftOrder.getDeviceFrom().equals("js") || nftOrder.getDeviceFrom().equals("applet")) {
...@@ -598,36 +598,41 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService { ...@@ -598,36 +598,41 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
if (Objects.equals(1, syncOrderParam.getStatus())) { if (Objects.equals(1, syncOrderParam.getStatus())) {
String uid = orderVo.getUserId(); String uid = orderVo.getUserId();
Integer orderStatusOld = orderVo.getStatus();
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
if (Objects.equals(orderVo.getStatus(), GoblinStatusConst.NftStatus.ORDER_STATUS_3.getValue())) {// 超时支付 // 更新订单信息
log.info("Nft订单超时支付 param:[orderCode:{}]", orderCode); if (StringUtil.isEmpty(syncOrderParam.getPaymentType())) {
// 处理为退款中 orderVo.setPaymentType("");
orderVo.setStatus(GoblinStatusConst.NftStatus.ORDER_STATUS_4.getValue()); } else {
orderVo.setUpdatedAt(now);
LinkedList<String> sqls = CollectionUtil.linkedListString();
LinkedList<Object[]> sqlDataOrder = CollectionUtil.linkedListObjectArr();
sqls.add(SqlMapping.get("goblin_nft_order.update.refund"));
sqlDataOrder.add(new Object[]{
orderVo.getStatus(), now, orderId, now, now
});
nftOrderUtils.setNftOrder(orderVo);
// mongo
goblinMongoUtils.updateGoblinNftOrderVo(orderVo);
// mysql
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_NFT_ORDER.getKey(),
SqlMapping.gets(sqls, sqlDataOrder));
// 退款
nftOrderUtils.refundOrderSku(orderId, syncOrderParam.getPaymentId(), syncOrderParam.getPaymentType(), orderVo.getPayType());
} else {// 正常流程
orderVo.setPaymentType(syncOrderParam.getPaymentType()); orderVo.setPaymentType(syncOrderParam.getPaymentType());
}
if (StringUtil.isEmpty(syncOrderParam.getPaymentId())) {
orderVo.setPaymentId("");
} else {
orderVo.setPaymentId(syncOrderParam.getPaymentId()); orderVo.setPaymentId(syncOrderParam.getPaymentId());
}
if (StringUtil.isEmpty(syncOrderParam.getCode())) {
orderVo.setPayCode("");
} else {
orderVo.setPayCode(syncOrderParam.getCode()); orderVo.setPayCode(syncOrderParam.getCode());
}
if (StringUtil.isEmpty(syncOrderParam.getPaymentAt())) {
orderVo.setPayTime(now);
} else {
LocalDateTime payTime = LocalDateTime.parse(syncOrderParam.getPaymentAt(), DTF_YMD_HMS); LocalDateTime payTime = LocalDateTime.parse(syncOrderParam.getPaymentAt(), DTF_YMD_HMS);
orderVo.setPayTime(payTime); orderVo.setPayTime(payTime);
orderVo.setStatus(GoblinStatusConst.NftStatus.ORDER_STATUS_2.getValue()); }
orderVo.setUpdatedAt(now); orderVo.setUpdatedAt(now);
if (Objects.equals(orderStatusOld, GoblinStatusConst.NftStatus.ORDER_STATUS_3.getValue())) {// 超时支付 退款中状态
orderVo.setStatus(GoblinStatusConst.NftStatus.ORDER_STATUS_4.getValue());
} else {// 正常流程 已付款状态
orderVo.setStatus(GoblinStatusConst.NftStatus.ORDER_STATUS_2.getValue());
}
// redis
nftOrderUtils.setNftOrder(orderVo);
// mongo
goblinMongoUtils.updateGoblinNftOrderVo(orderVo);
// mysql
LinkedList<String> sqls = CollectionUtil.linkedListString(); LinkedList<String> sqls = CollectionUtil.linkedListString();
LinkedList<Object[]> sqlDataOrder = CollectionUtil.linkedListObjectArr(); LinkedList<Object[]> sqlDataOrder = CollectionUtil.linkedListObjectArr();
sqls.add(SqlMapping.get("goblin_nft_order.update.pay")); sqls.add(SqlMapping.get("goblin_nft_order.update.pay"));
...@@ -636,15 +641,13 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService { ...@@ -636,15 +641,13 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
orderVo.getPayTime(), orderVo.getStatus(), orderVo.getUpdatedAt(), orderVo.getPayTime(), orderVo.getStatus(), orderVo.getUpdatedAt(),
orderId, now, now orderId, now, now
}); });
// redis
nftOrderUtils.setNftOrder(orderVo);
// mongo
goblinMongoUtils.updateGoblinNftOrderVo(orderVo);
// mysql
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_NFT_ORDER.getKey(), queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_NFT_ORDER.getKey(),
SqlMapping.gets(sqls, sqlDataOrder)); SqlMapping.gets(sqls, sqlDataOrder));
// 处理订单退款和其他流程
if (Objects.equals(orderStatusOld, GoblinStatusConst.NftStatus.ORDER_STATUS_3.getValue())) {// 超时支付 退款
log.info("Nft订单超时支付 param:[orderCode:{}]", orderCode);
nftOrderUtils.refundOrderSku(orderId, syncOrderParam.getPaymentId(), syncOrderParam.getPaymentType(), orderVo.getPayType());
} else {// 正常流程
// 通知生成藏品 // 通知生成藏品
// GoblinQueueBizArtworkGenDto artworkGenDto = GoblinQueueBizArtworkGenDto.getNew(); // GoblinQueueBizArtworkGenDto artworkGenDto = GoblinQueueBizArtworkGenDto.getNew();
// artworkGenDto.setOrderId(orderId); // artworkGenDto.setOrderId(orderId);
...@@ -653,13 +656,10 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService { ...@@ -653,13 +656,10 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
// artworkGenDto.setSource(1); // artworkGenDto.setSource(1);
// queueUtils.sendMsgByRedis(MQConst.GoblinQueue.BIZ_ARTWORK_GEN.getKey(), artworkGenDto.toJson()); // queueUtils.sendMsgByRedis(MQConst.GoblinQueue.BIZ_ARTWORK_GEN.getKey(), artworkGenDto.toJson());
this.generateUserArtwork(orderVo); this.generateUserArtwork(orderVo);
// 增加销量 // 增加销量
goblinRedisUtils.incrSkuSaleCount(orderVo.getSpuId(), orderVo.getSkuId(), orderVo.getNum()); goblinRedisUtils.incrSkuSaleCount(orderVo.getSpuId(), orderVo.getSkuId(), orderVo.getNum());
// 加积分 // 加积分
goblinOrderUtils.doTask(uid, orderVo.getPriceActual()); goblinOrderUtils.doTask(uid, orderVo.getPriceActual());
} }
// 写入用户订单列表 因取消的订单不展示 所以放在这里 // 写入用户订单列表 因取消的订单不展示 所以放在这里
nftOrderUtils.addNftOrderList(uid, orderVo.getOrderId()); nftOrderUtils.addNftOrderList(uid, orderVo.getOrderId());
......
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