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