记得上下班打卡 | 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
0ca3cbc0
Commit
0ca3cbc0
authored
Jun 30, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交 app端 混合售列表 混合售列表定时任务 混合售详情
parent
7f08098c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
131 additions
and
17 deletions
+131
-17
GoblinMixAppDetailsVo.java
...iquidnet/service/goblin/dto/vo/GoblinMixAppDetailsVo.java
+19
-0
GoblinMixAppListVo.java
...m/liquidnet/service/goblin/dto/vo/GoblinMixAppListVo.java
+18
-1
IGoblinMixAppService.java
...t/service/goblin/service/manage/IGoblinMixAppService.java
+1
-1
FeignGoblinTaskClient.java
...dnet/service/feign/goblin/task/FeignGoblinTaskClient.java
+3
-0
GoblinTaskHandler.java
...dnet/service/executor/main/handler/GoblinTaskHandler.java
+10
-0
GoblinMixAppController.java
...net/service/goblin/controller/GoblinMixAppController.java
+18
-10
GoblinMixAppServiceImpl.java
.../service/goblin/service/impl/GoblinMixAppServiceImpl.java
+58
-5
ObjectUtil.java
...in/java/com/liquidnet/service/goblin/util/ObjectUtil.java
+4
-0
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinMixAppDetailsVo.java
View file @
0ca3cbc0
...
@@ -53,4 +53,23 @@ public class GoblinMixAppDetailsVo implements Serializable, Cloneable {
...
@@ -53,4 +53,23 @@ public class GoblinMixAppDetailsVo implements Serializable, Cloneable {
return
new
GoblinMixAppDetailsVo
();
return
new
GoblinMixAppDetailsVo
();
}
}
}
}
public
GoblinMixAppDetailsVo
copy
(
GoblinMixDetailsVo
source
)
{
if
(
null
==
source
)
return
this
;
this
.
setMixId
(
mixId
);
this
.
setName
(
source
.
getName
());
this
.
setTimeStart
(
source
.
getTimeStart
());
this
.
setTimeEnd
(
source
.
getTimeEnd
());
this
.
setSellName
(
source
.
getSellName
());
this
.
setIntro
(
source
.
getIntro
());
this
.
setCoverPic
(
source
.
getCoverPic
());
this
.
setVideo
(
source
.
getVideo
());
this
.
setDetails
(
source
.
getDetails
());
this
.
setWatchType
(
source
.
getWatchType
());
this
.
setDetailUrl
(
source
.
getDetailUrl
());
this
.
setLimit
(
source
.
getLimit
());
this
.
setWhiteType
(
source
.
getWhiteType
());
this
.
setItem
(
source
.
getItem
());
return
this
;
}
}
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinMixAppListVo.java
View file @
0ca3cbc0
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
vo
;
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
vo
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.goblin.param.GoblinMixDetailsParam
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.List
;
@Data
@Data
@EqualsAndHashCode
@EqualsAndHashCode
...
@@ -18,7 +21,7 @@ public class GoblinMixAppListVo implements Serializable, Cloneable {
...
@@ -18,7 +21,7 @@ public class GoblinMixAppListVo implements Serializable, Cloneable {
private
String
sellName
;
private
String
sellName
;
@ApiModelProperty
(
position
=
3
,
value
=
"封面图片地址"
)
@ApiModelProperty
(
position
=
3
,
value
=
"封面图片地址"
)
private
String
coverPic
;
private
String
coverPic
;
@ApiModelProperty
(
position
=
4
,
value
=
"状态[6-活动中|7-停用|9-等待开始|10-活动结束]"
)
@ApiModelProperty
(
position
=
4
,
value
=
"状态[6-活动中|7-停用|
8-售罄|
9-等待开始|10-活动结束]"
)
private
Integer
status
;
private
Integer
status
;
@ApiModelProperty
(
position
=
5
,
value
=
"开始时间"
)
@ApiModelProperty
(
position
=
5
,
value
=
"开始时间"
)
private
String
timeStart
;
private
String
timeStart
;
...
@@ -40,4 +43,18 @@ public class GoblinMixAppListVo implements Serializable, Cloneable {
...
@@ -40,4 +43,18 @@ public class GoblinMixAppListVo implements Serializable, Cloneable {
return
new
GoblinMixAppListVo
();
return
new
GoblinMixAppListVo
();
}
}
}
}
public
GoblinMixAppListVo
copy
(
GoblinMixDetailsVo
source
)
{
if
(
null
==
source
)
return
this
;
this
.
setMixId
(
mixId
);
this
.
setName
(
source
.
getName
());
this
.
setSellName
(
source
.
getSellName
());
this
.
setCoverPic
(
source
.
getCoverPic
());
this
.
setTimeStart
(
source
.
getTimeStart
());
this
.
setTimeEnd
(
source
.
getTimeEnd
());
this
.
setSellPrice
(
source
.
getSellPrice
());
this
.
setPrice
(
source
.
getPrice
());
this
.
setCreatedAt
(
source
.
getCreatedAt
());
return
this
;
}
}
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/manage/IGoblinMixAppService.java
View file @
0ca3cbc0
...
@@ -22,7 +22,7 @@ import java.util.List;
...
@@ -22,7 +22,7 @@ import java.util.List;
public
interface
IGoblinMixAppService
{
public
interface
IGoblinMixAppService
{
// 根据开始时间倒叙 并且 活动开始
// 根据开始时间倒叙 并且 活动开始
ResponseDto
<
List
<
GoblinMixAppListVo
>>
mixList
();
ResponseDto
<
List
<
GoblinMixAppListVo
>>
mixList
(
Integer
showPosition
);
// 根据开始时间倒叙 并且 活动开始
// 根据开始时间倒叙 并且 活动开始
ResponseDto
<
GoblinMixAppDetailsVo
>
mixDetails
(
String
mixId
);
ResponseDto
<
GoblinMixAppDetailsVo
>
mixDetails
(
String
mixId
);
...
...
liquidnet-bus-feign/liquidnet-api-feign-goblin/src/main/java/com/liquidnet/service/feign/goblin/task/FeignGoblinTaskClient.java
View file @
0ca3cbc0
...
@@ -19,4 +19,7 @@ public interface FeignGoblinTaskClient {
...
@@ -19,4 +19,7 @@ public interface FeignGoblinTaskClient {
@GetMapping
(
"rsc/nft/job/goblinNftListStock"
)
@GetMapping
(
"rsc/nft/job/goblinNftListStock"
)
ResponseDto
<
Boolean
>
goblinNftListStock
();
ResponseDto
<
Boolean
>
goblinNftListStock
();
@GetMapping
(
"rsc/nft/job/mixList"
)
ResponseDto
<
Boolean
>
mixList
();
}
}
liquidnet-bus-service/liquidnet-service-executor-all/liquidnet-service-executor-main/src/main/java/com/liquidnet/service/executor/main/handler/GoblinTaskHandler.java
View file @
0ca3cbc0
...
@@ -38,4 +38,14 @@ public class GoblinTaskHandler {
...
@@ -38,4 +38,14 @@ public class GoblinTaskHandler {
XxlJobHelper
.
handleFail
();
XxlJobHelper
.
handleFail
();
}
}
}
}
@XxlJob
(
value
=
"sev-goblin:mixList"
)
public
void
mixList
()
{
try
{
XxlJobHelper
.
handleSuccess
(
"结果:"
+
feignGoblinTaskClient
.
mixList
().
getData
());
}
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/controller/GoblinMixAppController.java
View file @
0ca3cbc0
...
@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
...
@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.vo.GoblinMixAppDetailsVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinMixAppListVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinMixAppListVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinMixDetailsVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinMixDetailsVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinMixManageListVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinMixManageListVo
;
...
@@ -37,16 +38,23 @@ public class GoblinMixAppController {
...
@@ -37,16 +38,23 @@ public class GoblinMixAppController {
@ApiOperationSupport
(
order
=
1
)
@ApiOperationSupport
(
order
=
1
)
@ApiOperation
(
value
=
"列表"
)
@ApiOperation
(
value
=
"列表"
)
// @ApiImplicitParams({
@ApiImplicitParams
({
// @ApiImplicitParam(type = "form", required = false, dataType = "String", name = "name", value = "活动名称"),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"Integer"
,
name
=
"showPosition"
,
value
=
"展示位置[1-商城|2-数字藏品]"
),
// @ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "page", value = "页数"),
//
})
// })
@GetMapping
(
"list"
)
@GetMapping
(
"list"
)
public
ResponseDto
<
List
<
GoblinMixAppListVo
>>
list
(
public
ResponseDto
<
List
<
GoblinMixAppListVo
>>
list
(
@RequestParam
(
value
=
"showPosition"
,
required
=
true
)
Integer
showPosition
)
{
// @RequestParam(value = "name", required = false) String name,
return
goblinMixAppService
.
mixList
(
showPosition
);
// @RequestParam Integer page
}
)
{
return
goblinMixAppService
.
mixList
();
@ApiOperationSupport
(
order
=
2
)
@ApiOperation
(
value
=
"详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"mixId"
,
value
=
"混合售id"
),
})
@GetMapping
(
"details"
)
public
ResponseDto
<
GoblinMixAppDetailsVo
>
details
(
@RequestParam
(
value
=
"mixId"
,
required
=
true
)
String
mixId
)
{
return
goblinMixAppService
.
mixDetails
(
mixId
);
}
}
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinMixAppServiceImpl.java
View file @
0ca3cbc0
...
@@ -42,17 +42,70 @@ public class GoblinMixAppServiceImpl implements IGoblinMixAppService {
...
@@ -42,17 +42,70 @@ public class GoblinMixAppServiceImpl implements IGoblinMixAppService {
@Autowired
@Autowired
GoblinRedisUtils
redisUtils
;
GoblinRedisUtils
redisUtils
;
@Autowired
GoblinMongoUtils
mongoUtils
;
@Override
@Override
public
ResponseDto
<
List
<
GoblinMixAppListVo
>>
mixList
()
{
public
ResponseDto
<
List
<
GoblinMixAppListVo
>>
mixList
(
Integer
showPosition
)
{
return
null
;
List
<
GoblinMixAppListVo
>
voList
=
ObjectUtil
.
goblinMixAppListVo
();
List
<
String
>
startList
=
CollectionUtil
.
linkedListString
();
List
<
String
>
stockList
=
CollectionUtil
.
linkedListString
();
if
(
showPosition
==
1
)
{
//商城
startList
=
redisUtils
.
getGoblinMixSkuStartList
();
stockList
=
redisUtils
.
getGoblinMixSkuStockList
();
}
else
if
(
showPosition
==
2
)
{
//nft
startList
=
redisUtils
.
getGoblinMixNftStartList
();
stockList
=
redisUtils
.
getGoblinMixNftStockList
();
}
else
{
return
ResponseDto
.
failure
();
}
for
(
String
mixId
:
startList
)
{
GoblinMixDetailsVo
vo
=
redisUtils
.
getMixDetails
(
mixId
);
GoblinMixAppListVo
itemVo
=
GoblinMixAppListVo
.
getNew
().
copy
(
vo
);
itemVo
.
setStatus
(
6
);
voList
.
add
(
itemVo
);
}
for
(
String
mixId
:
stockList
)
{
GoblinMixDetailsVo
vo
=
redisUtils
.
getMixDetails
(
mixId
);
GoblinMixAppListVo
itemVo
=
GoblinMixAppListVo
.
getNew
().
copy
(
vo
);
itemVo
.
setStatus
(
8
);
voList
.
add
(
itemVo
);
}
return
ResponseDto
.
success
(
voList
);
}
}
@Override
@Override
public
ResponseDto
<
GoblinMixAppDetailsVo
>
mixDetails
(
String
mixId
)
{
public
ResponseDto
<
GoblinMixAppDetailsVo
>
mixDetails
(
String
mixId
)
{
return
null
;
GoblinMixDetailsVo
baseVo
=
redisUtils
.
getMixDetails
(
mixId
);
GoblinMixAppDetailsVo
vo
=
GoblinMixAppDetailsVo
.
getNew
().
copy
(
baseVo
);
int
stock
=
0
;
for
(
GoblinMixDetailsItemVo
item
:
vo
.
getItem
())
{
item
.
setStock
(
0
);
GoblinGoodsSkuInfoVo
skuInfoVo
=
redisUtils
.
getGoodsSkuInfoVo
(
item
.
getSkuId
());
if
(
skuInfoVo
.
getUnbox
().
equals
(
"1"
))
{
List
<
String
>
relationIds
=
redisUtils
.
getGoblinMixRelationBox
(
item
.
getSkuId
(),
vo
.
getMixId
());
for
(
String
skuId
:
relationIds
)
{
stock
+=
redisUtils
.
getSkuStock
(
vo
.
getMixId
(),
skuId
);
}
}
else
{
stock
+=
redisUtils
.
getSkuStock
(
vo
.
getMixId
(),
item
.
getSkuId
());
}
}
if
(
stock
==
0
)
{
vo
.
setStatus
(
8
);
}
else
{
LocalDateTime
nt
=
LocalDateTime
.
now
();
LocalDateTime
st
=
LocalDateTime
.
parse
(
vo
.
getTimeStart
(),
DTF_YMD_HMS
);
LocalDateTime
et
=
LocalDateTime
.
parse
(
vo
.
getTimeEnd
(),
DTF_YMD_HMS
);
if
(
nt
.
isBefore
(
st
))
{
vo
.
setStatus
(
9
);
}
else
if
(
nt
.
isAfter
(
et
))
{
vo
.
setStatus
(
10
);
}
else
{
vo
.
setStatus
(
6
);
}
}
return
ResponseDto
.
success
(
vo
);
}
}
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/ObjectUtil.java
View file @
0ca3cbc0
...
@@ -97,8 +97,12 @@ public class ObjectUtil {
...
@@ -97,8 +97,12 @@ public class ObjectUtil {
private
static
final
ArrayList
<
WriteModel
<
Document
>>
writeModelDocumentArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
WriteModel
<
Document
>>
writeModelDocumentArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinMixDetailsItemVo
>
goblinMixDetailsItemVo
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinMixDetailsItemVo
>
goblinMixDetailsItemVo
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinMixManageListVo
>
goblinMixManageListVo
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinMixManageListVo
>
goblinMixManageListVo
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinMixAppListVo
>
goblinMixAppListVo
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinMixDetailsVo
>
goblinMixDetailsVo
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinMixDetailsVo
>
goblinMixDetailsVo
=
new
ArrayList
<>();
public
static
ArrayList
<
GoblinMixAppListVo
>
goblinMixAppListVo
()
{
return
(
ArrayList
<
GoblinMixAppListVo
>)
goblinMixAppListVo
.
clone
();
}
public
static
ArrayList
<
GoblinMixDetailsVo
>
goblinMixDetailsVo
()
{
public
static
ArrayList
<
GoblinMixDetailsVo
>
goblinMixDetailsVo
()
{
return
(
ArrayList
<
GoblinMixDetailsVo
>)
goblinMixDetailsVo
.
clone
();
return
(
ArrayList
<
GoblinMixDetailsVo
>)
goblinMixDetailsVo
.
clone
();
...
...
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