记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
ed08ecaf
Commit
ed08ecaf
authored
Jun 10, 2022
by
jiangxiulong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/jxl_2269_payStatus' into jxl_2267_saleTime
parents
03e1ffc1
5334c00d
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
121 additions
and
7 deletions
+121
-7
GoblinRedisConst.java
...m/liquidnet/service/goblin/constant/GoblinRedisConst.java
+1
-0
GoblinNftGoodsSkuInfoVo.java
...uidnet/service/goblin/dto/vo/GoblinNftGoodsSkuInfoVo.java
+10
-6
PlatformGoblinNftOrderNotPayDto.java
...t/service/goblin/dto/PlatformGoblinNftOrderNotPayDto.java
+10
-0
GoblinNftOrderMapper.java
...liquidnet/service/goblin/mapper/GoblinNftOrderMapper.java
+2
-0
GoblinNftOrderMapper.xml
....liquidnet.service.goblin.mapper/GoblinNftOrderMapper.xml
+14
-0
FeignPlatformGoblinTaskClient.java
...ce/feign/platform/task/FeignPlatformGoblinTaskClient.java
+3
-0
PlatformGoblinTaskHandler.java
...vice/executor/main/handler/PlatformGoblinTaskHandler.java
+10
-0
GoblinNftGoodsAppServiceImpl.java
...ice/goblin/service/impl/GoblinNftGoodsAppServiceImpl.java
+5
-1
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+16
-0
PlatformGoblinNftOrderController.java
...troller/goblin/task/PlatformGoblinNftOrderController.java
+41
-0
GoblinRedisUtils.java
...om/liquidnet/service/platform/utils/GoblinRedisUtils.java
+9
-0
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/constant/GoblinRedisConst.java
View file @
ed08ecaf
...
@@ -134,6 +134,7 @@ public class GoblinRedisConst {
...
@@ -134,6 +134,7 @@ public class GoblinRedisConst {
public
static
final
String
REDIS_GOBLIN_NFT_GOODS_LIST_INFO
=
PREFIX
.
concat
(
"nft:goodsList:info:"
);
// nft商品列表单藏品详情 skuId
public
static
final
String
REDIS_GOBLIN_NFT_GOODS_LIST_INFO
=
PREFIX
.
concat
(
"nft:goodsList:info:"
);
// nft商品列表单藏品详情 skuId
public
static
final
String
REDIS_GOBLIN_NFT_NUM_ACCOUNT
=
PREFIX
.
concat
(
"nft:account:"
);
// nft用户数字账户是否开通 userId
public
static
final
String
REDIS_GOBLIN_NFT_NUM_ACCOUNT
=
PREFIX
.
concat
(
"nft:account:"
);
// nft用户数字账户是否开通 userId
public
static
final
String
REDIS_GOBLIN_NFT_NUM_ACCOUNT_INFO
=
PREFIX
.
concat
(
"nft:account:info:"
);
// nft用户数字账户开通信息 userId
public
static
final
String
REDIS_GOBLIN_NFT_NUM_ACCOUNT_INFO
=
PREFIX
.
concat
(
"nft:account:info:"
);
// nft用户数字账户开通信息 userId
public
static
final
String
REDIS_GOBLIN_NFT_NOT_PAY_NUM
=
PREFIX
.
concat
(
"nft:notPay:"
);
// nft藏品待支付订单数量 skuId:listId
/**
/**
* {goblin:nft:certmeta:{idType+idNo},{idname,mobile}}
* {goblin:nft:certmeta:{idType+idNo},{idname,mobile}}
*/
*/
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinNftGoodsSkuInfoVo.java
View file @
ed08ecaf
...
@@ -94,19 +94,23 @@ public class GoblinNftGoodsSkuInfoVo implements Serializable, Cloneable {
...
@@ -94,19 +94,23 @@ public class GoblinNftGoodsSkuInfoVo implements Serializable, Cloneable {
@ApiModelProperty
(
position
=
65
,
value
=
"是否开启兑换 1未开启 2已开启"
)
@ApiModelProperty
(
position
=
65
,
value
=
"是否开启兑换 1未开启 2已开启"
)
private
int
isExchange
;
private
int
isExchange
;
@ApiModelProperty
(
position
=
65
,
value
=
"单品AR文件URL-iOS版"
)
@ApiModelProperty
(
position
=
66
,
value
=
"待支付订单数量"
)
private
int
notPayNum
;
@ApiModelProperty
(
position
=
67
,
value
=
"单品AR文件URL-iOS版"
)
private
String
arUrlIos
;
private
String
arUrlIos
;
@ApiModelProperty
(
position
=
6
6
,
value
=
"单品AR文件URL-Android版"
)
@ApiModelProperty
(
position
=
6
8
,
value
=
"单品AR文件URL-Android版"
)
private
String
arUrlAndroid
;
private
String
arUrlAndroid
;
@ApiModelProperty
(
position
=
67
,
value
=
"标签[0-提前购买|1-分段购买]"
)
@ApiModelProperty
(
position
=
69
,
value
=
"标签[0-提前购买|1-分段购买]"
)
private
Integer
tagType
;
private
Integer
tagType
;
@ApiModelProperty
(
position
=
68
,
value
=
"分批购活动id"
)
@ApiModelProperty
(
position
=
70
,
value
=
"分批购活动id"
)
private
String
listId
;
private
String
listId
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@ApiModelProperty
(
position
=
69
,
value
=
"sku正常开售时间"
)
@ApiModelProperty
(
position
=
71
,
value
=
"sku正常开售时间"
)
private
LocalDateTime
baseSaleStartTime
;
private
LocalDateTime
baseSaleStartTime
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@ApiModelProperty
(
position
=
7
0
,
value
=
"下个分段购开始时间,如果为null则没有"
)
@ApiModelProperty
(
position
=
7
2
,
value
=
"下个分段购开始时间,如果为null则没有"
)
private
LocalDateTime
nextSaleStartTime
;
private
LocalDateTime
nextSaleStartTime
;
private
static
final
GoblinNftGoodsSkuInfoVo
obj
=
new
GoblinNftGoodsSkuInfoVo
();
private
static
final
GoblinNftGoodsSkuInfoVo
obj
=
new
GoblinNftGoodsSkuInfoVo
();
...
...
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/dto/PlatformGoblinNftOrderNotPayDto.java
0 → 100644
View file @
ed08ecaf
package
com
.
liquidnet
.
service
.
goblin
.
dto
;
import
lombok.Data
;
@Data
public
class
PlatformGoblinNftOrderNotPayDto
{
private
String
skuId
;
private
String
listId
;
private
int
notPayNum
;
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/mapper/GoblinNftOrderMapper.java
View file @
ed08ecaf
package
com
.
liquidnet
.
service
.
goblin
.
mapper
;
package
com
.
liquidnet
.
service
.
goblin
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.liquidnet.service.goblin.dto.PlatformGoblinNftOrderNotPayDto
;
import
com.liquidnet.service.goblin.dto.admin.GoblinNftOrderListDto
;
import
com.liquidnet.service.goblin.dto.admin.GoblinNftOrderListDto
;
import
com.liquidnet.service.goblin.entity.GoblinNftOrder
;
import
com.liquidnet.service.goblin.entity.GoblinNftOrder
;
...
@@ -19,4 +20,5 @@ public interface GoblinNftOrderMapper extends BaseMapper<GoblinNftOrder> {
...
@@ -19,4 +20,5 @@ public interface GoblinNftOrderMapper extends BaseMapper<GoblinNftOrder> {
List
<
GoblinNftOrderListDto
>
searchList
(
Map
<
String
,
Object
>
convertBeanToMap
);
List
<
GoblinNftOrderListDto
>
searchList
(
Map
<
String
,
Object
>
convertBeanToMap
);
List
<
PlatformGoblinNftOrderNotPayDto
>
selectOrderList
();
}
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/resources/com.liquidnet.service.goblin.mapper/GoblinNftOrderMapper.xml
View file @
ed08ecaf
...
@@ -55,4 +55,18 @@
...
@@ -55,4 +55,18 @@
-- order by a.created_at desc
-- order by a.created_at desc
order by a.mid desc
order by a.mid desc
</select>
</select>
<select
id=
"selectOrderList"
resultType=
"com.liquidnet.service.goblin.dto.PlatformGoblinNftOrderNotPayDto"
>
select sku_id,
list_id,
sum(if(status = 1, num, 0)) as notPayNum
-- # select status, created_at,pay_time,updated_at,cancel_time,sku_id,list_id
from goblin_nft_order
where 1 > 0
-- # and sku_title = '正在现场盲盒 正在现场盲盒'
and pay_type != 'EXCODE'
-- # and status = 3
and created_at > DATE_SUB(NOW(), INTERVAL 10 MINUTE)
-- # and created_at > DATE_SUB('2022-06-07 12:10:24', INTERVAL 10 MINUTE)
group by sku_id, list_id;
</select>
</mapper>
</mapper>
liquidnet-bus-feign/liquidnet-api-feign-platform/src/main/java/com/liquidnet/service/feign/platform/task/FeignPlatformGoblinTaskClient.java
View file @
ed08ecaf
...
@@ -4,6 +4,7 @@ import com.liquidnet.service.base.ResponseDto;
...
@@ -4,6 +4,7 @@ import com.liquidnet.service.base.ResponseDto;
import
feign.hystrix.FallbackFactory
;
import
feign.hystrix.FallbackFactory
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
...
@@ -30,4 +31,6 @@ public interface FeignPlatformGoblinTaskClient {
...
@@ -30,4 +31,6 @@ public interface FeignPlatformGoblinTaskClient {
ResponseDto
<
String
>
codeCount
();
ResponseDto
<
String
>
codeCount
();
@GetMapping
(
"task/nft/order/notPayNum"
)
ResponseDto
<
String
>
getNotPayNum
();
}
}
liquidnet-bus-service/liquidnet-service-executor-all/liquidnet-service-executor-main/src/main/java/com/liquidnet/service/executor/main/handler/PlatformGoblinTaskHandler.java
View file @
ed08ecaf
...
@@ -53,4 +53,14 @@ public class PlatformGoblinTaskHandler {
...
@@ -53,4 +53,14 @@ public class PlatformGoblinTaskHandler {
}
}
}
}
@XxlJob
(
value
=
"sev-platform:getNotPayNum"
)
public
void
getNotPayNum
()
{
// 查询待支付订单数量
try
{
XxlJobHelper
.
handleSuccess
(
"结果:"
+
feignPlatformGoblinTaskClient
.
getNotPayNum
().
toJson
());
}
catch
(
Exception
e
)
{
XxlJobHelper
.
log
(
e
);
XxlJobHelper
.
handleFail
();
}
}
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinNftGoodsAppServiceImpl.java
View file @
ed08ecaf
...
@@ -145,6 +145,9 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
...
@@ -145,6 +145,9 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
// 1
// 1
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
now
=
LocalDateTime
.
now
();
HashMap
<
String
,
Object
>
map
=
goblinRedisUtils
.
getGoodsSkuInfoVo
(
now
,
skuId
);
HashMap
<
String
,
Object
>
map
=
goblinRedisUtils
.
getGoodsSkuInfoVo
(
now
,
skuId
);
if
(
null
==
map
)
{
return
null
;
}
GoblinGoodsSkuInfoVo
skuInfoVo
=
(
GoblinGoodsSkuInfoVo
)
map
.
get
(
"vo"
);
GoblinGoodsSkuInfoVo
skuInfoVo
=
(
GoblinGoodsSkuInfoVo
)
map
.
get
(
"vo"
);
Integer
tagType
=
(
Integer
)
map
.
get
(
"tagType"
);
Integer
tagType
=
(
Integer
)
map
.
get
(
"tagType"
);
String
listId
=
(
String
)
map
.
get
(
"listId"
);
String
listId
=
(
String
)
map
.
get
(
"listId"
);
...
@@ -181,9 +184,10 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
...
@@ -181,9 +184,10 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
nftGoodsSkuInfoVo
.
setListId
(
listId
);
nftGoodsSkuInfoVo
.
setListId
(
listId
);
nftGoodsSkuInfoVo
.
setBaseSaleStartTime
(
baseSaleStartTime
);
nftGoodsSkuInfoVo
.
setBaseSaleStartTime
(
baseSaleStartTime
);
nftGoodsSkuInfoVo
.
setNextSaleStartTime
(
nextSaleStartTime
);
nftGoodsSkuInfoVo
.
setNextSaleStartTime
(
nextSaleStartTime
);
// 是否开启兑换
// 是否开启兑换
nftGoodsSkuInfoVo
.
setIsExchange
(
goblinRedisUtils
.
getIsExchange
(
skuId
));
nftGoodsSkuInfoVo
.
setIsExchange
(
goblinRedisUtils
.
getIsExchange
(
skuId
));
// 待支付订单数量
nftGoodsSkuInfoVo
.
setNotPayNum
(
goblinRedisUtils
.
getNotPayNum
(
skuId
,
listId
));
return
nftGoodsSkuInfoVo
;
return
nftGoodsSkuInfoVo
;
}
else
{
}
else
{
return
null
;
return
null
;
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
ed08ecaf
...
@@ -809,6 +809,9 @@ public class GoblinRedisUtils {
...
@@ -809,6 +809,9 @@ public class GoblinRedisUtils {
*/
*/
public
HashMap
<
String
,
Object
>
getGoodsSkuInfoVo
(
LocalDateTime
now
,
String
skuId
)
{
public
HashMap
<
String
,
Object
>
getGoodsSkuInfoVo
(
LocalDateTime
now
,
String
skuId
)
{
GoblinGoodsSkuInfoVo
vo
=
getGoodsSkuInfoVo
(
skuId
);
GoblinGoodsSkuInfoVo
vo
=
getGoodsSkuInfoVo
(
skuId
);
if
(
null
==
vo
)
{
return
null
;
}
HashMap
<
String
,
Object
>
map
=
CollectionUtil
.
mapStringObject
();
HashMap
<
String
,
Object
>
map
=
CollectionUtil
.
mapStringObject
();
LocalDateTime
nextSaleStartTime
=
null
;
LocalDateTime
nextSaleStartTime
=
null
;
if
(
null
==
vo
.
getSaleStartTime
()
||
now
.
isAfter
(
vo
.
getSaleStartTime
()))
{
//普通商品已开售
if
(
null
==
vo
.
getSaleStartTime
()
||
now
.
isAfter
(
vo
.
getSaleStartTime
()))
{
//普通商品已开售
...
@@ -2083,6 +2086,19 @@ public class GoblinRedisUtils {
...
@@ -2083,6 +2086,19 @@ public class GoblinRedisUtils {
}
}
}
}
public
int
getNotPayNum
(
String
skuId
,
String
listId
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_NFT_NOT_PAY_NUM
.
concat
(
skuId
);
if
(
null
!=
listId
)
{
redisKey
=
redisKey
.
concat
(
":"
).
concat
(
listId
);
}
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
return
0
;
}
else
{
return
(
int
)
obj
;
}
}
/**
/**
* private int skuType 商品类型[0-常规|1-数字藏品]
* private int skuType 商品类型[0-常规|1-数字藏品]
* private String status 审核状态[0-初始编辑|1-审核中|2-审核不通过|3-审核通过];
* private String status 审核状态[0-初始编辑|1-审核中|2-审核不通过|3-审核通过];
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/goblin/task/PlatformGoblinNftOrderController.java
0 → 100644
View file @
ed08ecaf
package
com
.
liquidnet
.
service
.
platform
.
controller
.
goblin
.
task
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.PlatformGoblinNftOrderNotPayDto
;
import
com.liquidnet.service.goblin.mapper.GoblinNftOrderMapper
;
import
com.liquidnet.service.platform.utils.GoblinRedisUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* NFT订单相关定时任务
*
* @author jiangxiulng
*/
@Api
(
tags
=
"NFT订单相关定时任务"
)
@Slf4j
@RestController
@RequestMapping
(
"task/nft/order"
)
public
class
PlatformGoblinNftOrderController
{
@Autowired
private
GoblinNftOrderMapper
goblinNftOrderMapper
;
@Autowired
private
GoblinRedisUtils
goblinRedisUtils
;
@ApiOperation
(
value
=
"查询待支付订单数量"
)
@GetMapping
(
"notPayNum"
)
public
ResponseDto
<
String
>
getNotPayNum
()
{
List
<
PlatformGoblinNftOrderNotPayDto
>
goblinNftOrderList
=
goblinNftOrderMapper
.
selectOrderList
();
for
(
PlatformGoblinNftOrderNotPayDto
notPayDto
:
goblinNftOrderList
)
{
goblinRedisUtils
.
setNotPayNum
(
notPayDto
.
getSkuId
(),
notPayDto
.
getListId
(),
notPayDto
.
getNotPayNum
());
}
return
ResponseDto
.
success
(
"查询待支付订单完成"
);
}
}
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/utils/GoblinRedisUtils.java
View file @
ed08ecaf
...
@@ -292,6 +292,15 @@ public class GoblinRedisUtils {
...
@@ -292,6 +292,15 @@ public class GoblinRedisUtils {
// 获取sku配置库存
// 获取sku配置库存
// 设置skuId listId 代付款数量
public
void
setNotPayNum
(
String
skuId
,
String
listId
,
int
notPayNum
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_NFT_NOT_PAY_NUM
.
concat
(
skuId
);
if
(!
listId
.
isEmpty
())
{
redisKey
=
redisKey
.
concat
(
":"
).
concat
(
listId
);
}
getRedis
().
set
(
redisKey
,
notPayNum
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment