记得上下班打卡 | 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
265abaf2
Commit
265abaf2
authored
Mar 02, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~API:活动:优惠券:领取、使用数量更正;
parent
02c05e7a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
19 deletions
+13
-19
GoblinStoreMgtCouponListVo.java
...vice/goblin/dto/manage/vo/GoblinStoreMgtCouponListVo.java
+2
-8
GoblinStoreMgtCouponListVoExcel.java
...t/service/goblin/dto/GoblinStoreMgtCouponListVoExcel.java
+6
-6
GoblinStoreMgtCouponServiceImpl.java
.../service/impl/manage/GoblinStoreMgtCouponServiceImpl.java
+5
-5
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/vo/GoblinStoreMgtCouponListVo.java
View file @
265abaf2
...
...
@@ -25,9 +25,9 @@ public class GoblinStoreMgtCouponListVo implements Serializable, Cloneable {
@ApiModelProperty
(
position
=
14
,
value
=
"库存"
)
private
Integer
stock
;
@ApiModelProperty
(
position
=
15
,
value
=
"领取数量"
)
private
Integer
receiveNum
;
private
int
receiveNum
;
@ApiModelProperty
(
position
=
16
,
value
=
"使用数量"
)
private
Integer
usedNum
;
private
int
usedNum
;
@ApiModelProperty
(
position
=
17
,
value
=
"开始时间"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
private
LocalDateTime
startTime
;
...
...
@@ -37,10 +37,4 @@ public class GoblinStoreMgtCouponListVo implements Serializable, Cloneable {
@ApiModelProperty
(
position
=
19
,
value
=
"创建时间"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
private
LocalDateTime
createdAt
;
@ApiModelProperty
(
position
=
20
,
value
=
"已领取库存"
)
private
int
receiveStock
;
@ApiModelProperty
(
position
=
21
,
value
=
"已使用库存"
)
private
int
usedStock
;
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/dto/GoblinStoreMgtCouponListVoExcel.java
View file @
265abaf2
...
...
@@ -28,10 +28,10 @@ public class GoblinStoreMgtCouponListVoExcel implements Serializable, Cloneable
private
String
endTime
;
@ExcelProperty
(
"创建时间"
)
private
String
createdAt
;
@ExcelProperty
(
"
已领取库存
"
)
private
Integer
receiveStock
;
@ExcelProperty
(
"
已使用库存
"
)
private
Integer
usedStock
;
@ExcelProperty
(
"
领取数量
"
)
private
int
receiveNum
;
@ExcelProperty
(
"
使用数量
"
)
private
int
usedNum
;
@ExcelProperty
(
"总库存"
)
private
Integer
stock
;
...
...
@@ -67,8 +67,8 @@ public class GoblinStoreMgtCouponListVoExcel implements Serializable, Cloneable
this
.
setStartTime
(
yyyyMMddHHmmss
.
format
(
source
.
getStartTime
()));
this
.
setEndTime
(
yyyyMMddHHmmss
.
format
(
source
.
getEndTime
()));
this
.
setCreatedAt
(
yyyyMMddHHmmss
.
format
(
source
.
getCreatedAt
()));
this
.
setReceive
Stock
(
source
.
getReceiveStock
());
this
.
setUsed
Stock
(
source
.
getUsedStock
());
this
.
setReceive
Num
(
source
.
getReceiveNum
());
this
.
setUsed
Num
(
source
.
getUsedNum
());
this
.
setStock
(
source
.
getStock
());
return
this
;
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStoreMgtCouponServiceImpl.java
View file @
265abaf2
...
...
@@ -57,18 +57,18 @@ public class GoblinStoreMgtCouponServiceImpl implements IGoblinstoreMgtCouponSer
List
<
Document
>
aggregateUserCouponResult
=
aggregateUserCouponResults
.
stream
()
.
filter
(
r
->
r
.
getString
(
"storeCouponId"
).
equals
(
vo
.
getStoreCouponId
())).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
aggregateUserCouponResult
))
{
int
receive
Stock
=
0
,
usedStock
=
0
;
int
receive
Num
=
0
,
usedNum
=
0
;
for
(
Document
aggregateDoc
:
aggregateUserCouponResult
)
{
Integer
totalCount
=
aggregateDoc
.
getInteger
(
"totalCount"
);
switch
(
aggregateDoc
.
getInteger
(
"state"
))
{
// 用户券状态[1-可用|2-无效|3-已过期|5-已使用]
case
5
:
used
Stock
+=
totalCount
;
used
Num
+=
totalCount
;
default
:
receive
Stock
+=
totalCount
;
receive
Num
+=
totalCount
;
}
}
vo
.
setReceive
Stock
(
receiveStock
);
vo
.
setUsed
Stock
(
usedStock
);
vo
.
setReceive
Num
(
receiveNum
);
vo
.
setUsed
Num
(
usedNum
);
}
});
}
else
{
...
...
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