记得上下班打卡 | 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
f5d23817
Commit
f5d23817
authored
Apr 29, 2022
by
GaoHu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exit
parent
80983317
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
10 deletions
+21
-10
GoblinGoodsAnticipateAddParam.java
...vice/goblin/dto/manage/GoblinGoodsAnticipateAddParam.java
+2
-2
GoblinGoodsAnticipateValueAddParam.java
...goblin/dto/manage/GoblinGoodsAnticipateValueAddParam.java
+5
-5
GoblinGoodsAnticipateMgController.java
.../controller/manage/GoblinGoodsAnticipateMgController.java
+3
-2
GoblinMongoUtils.java
...a/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
+11
-1
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinGoodsAnticipateAddParam.java
View file @
f5d23817
...
...
@@ -31,7 +31,7 @@ public class GoblinGoodsAnticipateAddParam {
/**
* 预约规则
*/
@ApiModelProperty
(
value
=
"预约规则"
)
@ApiModelProperty
(
required
=
true
,
value
=
"预约规则"
)
@NotBlank
(
message
=
"预约规则"
)
private
String
rule
;
...
...
@@ -43,7 +43,7 @@ public class GoblinGoodsAnticipateAddParam {
@NotBlank
(
message
=
"预约人数"
)
private
Integer
people
;
@ApiModelProperty
(
"sku信息"
)
@ApiModelProperty
(
required
=
true
,
value
=
"sku信息"
)
@NotBlank
private
List
<
GoblinGoodsAnticipateValueAddParam
>
list
;
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinGoodsAnticipateValueAddParam.java
View file @
f5d23817
...
...
@@ -34,28 +34,28 @@ public class GoblinGoodsAnticipateValueAddParam {
/**
* sku名称
*/
@ApiModelProperty
(
value
=
"sku名称"
)
@ApiModelProperty
(
required
=
true
,
value
=
"sku名称"
)
@NotBlank
(
message
=
"skuName不能为空"
)
private
String
skuName
;
/**
* sku_id 对应 goblin_goods_sku.sku_id
*/
@ApiModelProperty
(
value
=
"sku_id 对应 goblin_goods_sku.sku_id"
)
@ApiModelProperty
(
required
=
true
,
value
=
"sku_id 对应 goblin_goods_sku.sku_id"
)
@NotBlank
(
message
=
"skuId不能为空"
)
private
String
skuId
;
/**
* spu_id对应 goblin_goods_spu_id
*/
@ApiModelProperty
(
value
=
"spu_id对应 goblin_goods_spu_id"
)
@ApiModelProperty
(
required
=
true
,
value
=
"spu_id对应 goblin_goods_spu_id"
)
@NotBlank
(
message
=
"spuId不能为空"
)
private
String
spuId
;
/**
* 预约开始时间
*/
@ApiModelProperty
(
value
=
"预约开始时间"
)
@ApiModelProperty
(
required
=
true
,
value
=
"预约开始时间"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@NotBlank
(
message
=
"预约开始时间不能为空"
)
private
LocalDateTime
aboutStartDate
;
...
...
@@ -63,7 +63,7 @@ public class GoblinGoodsAnticipateValueAddParam {
/**
* 预约结束时间
*/
@ApiModelProperty
(
value
=
"预约结束时间"
)
@ApiModelProperty
(
required
=
true
,
value
=
"预约结束时间"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@NotBlank
(
message
=
"预约结束时间不能为空"
)
private
LocalDateTime
aboutEndDate
;
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinGoodsAnticipateMgController.java
View file @
f5d23817
...
...
@@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
java.math.BigInteger
;
/**
...
...
@@ -37,13 +38,13 @@ public class GoblinGoodsAnticipateMgController {
@ApiOperation
(
"创建预约信息"
)
@PostMapping
(
"/add"
)
public
ResponseDto
<
String
>
add
(
@RequestBody
GoblinGoodsAnticipateAddParam
goodsAnticipateAddParam
)
{
public
ResponseDto
<
String
>
add
(
@
Valid
@
RequestBody
GoblinGoodsAnticipateAddParam
goodsAnticipateAddParam
)
{
return
goblinGoodsAnticipateMgService
.
add
(
goodsAnticipateAddParam
);
}
@PostMapping
(
"/list"
)
@ApiOperation
(
"获取全部开启预约的sku"
)
public
ResponseDto
<
PageInfo
<
GoblinGoodsAnticipateValueVo
>>
list
(
GoblinGoodsAnticipateValueParam
goodsAnticipateValueParam
)
{
public
ResponseDto
<
PageInfo
<
GoblinGoodsAnticipateValueVo
>>
list
(
@Valid
GoblinGoodsAnticipateValueParam
goodsAnticipateValueParam
)
{
return
goblinGoodsAnticipateMgService
.
list
(
goodsAnticipateValueParam
);
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
View file @
f5d23817
...
...
@@ -60,7 +60,17 @@ public class GoblinMongoUtils {
public
HashMap
<
String
,
Object
>
getGoblinGoodsAnticipateValueVos
(
GoblinGoodsAnticipateValueParam
goblinGoodsAnticipateValueParam
,
String
uid
)
{
HashMap
<
String
,
Object
>
info
=
CollectionUtil
.
mapStringObject
();
Pageable
pageable
=
PageRequest
.
of
(
goblinGoodsAnticipateValueParam
.
getPageNum
()
-
1
,
20
,
Sort
.
by
(
Sort
.
Direction
.
DESC
,
"createdDate"
));
Criteria
criteria
=
Criteria
.
where
(
"delTag"
).
is
(
0
).
and
(
"uid"
).
is
(
uid
).
and
(
"type"
).
is
(
goblinGoodsAnticipateValueParam
.
getType
());
Criteria
criteria
=
Criteria
.
where
(
"delTag"
).
is
(
0
).
and
(
"uid"
).
is
(
uid
);
if
(
goblinGoodsAnticipateValueParam
.
getType
()==
1
){
//预约提醒
criteria
=
criteria
.
and
(
"type"
).
is
(
goblinGoodsAnticipateValueParam
.
getType
());
}
else
if
(
goblinGoodsAnticipateValueParam
.
getType
()==
2
){
//预约购买
criteria
=
criteria
.
and
(
"type"
).
is
(
2
).
and
(
"peopleType"
).
is
(
0
);
}
else
if
(
goblinGoodsAnticipateValueParam
.
getType
()==
3
){
//预约助力
criteria
=
criteria
.
and
(
"type"
).
is
(
2
).
and
(
"peopleType"
).
gt
(
0
);
}
if
(
StringUtils
.
isNotBlank
(
goblinGoodsAnticipateValueParam
.
getName
()))
{
criteria
=
criteria
.
and
(
"skuName"
).
regex
(
".*?"
+
goblinGoodsAnticipateValueParam
.
getName
()
+
".*"
);
}
...
...
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