记得上下班打卡 | 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
4b3bd2ca
Commit
4b3bd2ca
authored
Feb 24, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 ar相关本地数据下载
parent
f5d27304
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
8 deletions
+44
-8
TempCouponDto.java
.../java/com/liquidnet/service/goblin/dto/TempCouponDto.java
+33
-0
TempCouponVo.java
...ava/com/liquidnet/service/goblin/dto/vo/TempCouponVo.java
+0
-2
GoblinInnerServiceImpl.java
...ice/goblin/service/impl/inner/GoblinInnerServiceImpl.java
+11
-6
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/TempCouponDto.java
0 → 100644
View file @
4b3bd2ca
package
com
.
liquidnet
.
service
.
goblin
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.math.BigDecimal
;
import
java.util.List
;
@Data
@EqualsAndHashCode
public
class
TempCouponDto
implements
Cloneable
{
@ApiModelProperty
(
position
=
1
,
value
=
"券名称"
)
private
String
name
;
@ApiModelProperty
(
position
=
2
,
value
=
"spuId【无用】"
)
private
String
spuId
;
@ApiModelProperty
(
position
=
4
,
value
=
"类型【0-无限|1-一次】"
)
private
String
type
;
@ApiModelProperty
(
position
=
5
,
value
=
"优惠价格"
)
private
BigDecimal
value
;
@ApiModelProperty
(
position
=
6
,
value
=
"券id"
)
private
String
ucouponId
;
private
static
final
TempCouponDto
obj
=
new
TempCouponDto
();
public
static
TempCouponDto
getNew
()
{
try
{
return
(
TempCouponDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
TempCouponDto
();
}
}
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/TempCouponVo.java
View file @
4b3bd2ca
...
...
@@ -12,8 +12,6 @@ import java.util.List;
public
class
TempCouponVo
implements
Cloneable
{
@ApiModelProperty
(
position
=
1
,
value
=
"券名称"
)
private
String
name
;
@ApiModelProperty
(
position
=
2
,
value
=
"spuId【无用】"
)
private
String
spuId
;
@ApiModelProperty
(
position
=
3
,
value
=
"spuId数组"
)
private
List
<
String
>
spuIdList
;
@ApiModelProperty
(
position
=
4
,
value
=
"类型【0-无限|1-一次】"
)
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/inner/GoblinInnerServiceImpl.java
View file @
4b3bd2ca
...
...
@@ -4,6 +4,7 @@ import com.alibaba.excel.EasyExcel;
import
com.alibaba.excel.read.listener.PageReadListener
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.TempCouponDto
;
import
com.liquidnet.service.goblin.dto.vo.ArDataVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo
;
import
com.liquidnet.service.goblin.dto.vo.TempCouponVo
;
...
...
@@ -32,17 +33,21 @@ public class GoblinInnerServiceImpl implements IGoblinInnerService {
@Override
public
ResponseDto
<
String
>
insertCoupon
(
MultipartFile
file
,
String
performanceId
)
{
try
{
EasyExcel
.
read
(
file
.
getInputStream
(),
TempCoupon
Vo
.
class
,
new
PageReadListener
<
TempCouponV
o
>(
dataList
->
{
EasyExcel
.
read
(
file
.
getInputStream
(),
TempCoupon
Dto
.
class
,
new
PageReadListener
<
TempCouponDt
o
>(
dataList
->
{
redisUtils
.
delMarketTempCoupon
(
performanceId
);
for
(
TempCoupon
V
o
data
:
dataList
)
{
for
(
TempCoupon
Dt
o
data
:
dataList
)
{
if
(
data
.
getSpuId
()
==
null
)
{
continue
;
}
List
<
String
>
spuList
=
Arrays
.
asList
(
data
.
getSpuId
().
split
(
","
));
data
.
setSpuIdList
(
spuList
);
data
.
setUcouponId
(
IDGenerator
.
nextTimeId2
());
redisUtils
.
addMarketTempCoupon
(
performanceId
,
data
.
getUcouponId
());
redisUtils
.
setTempCoupon
(
data
.
getUcouponId
(),
data
);
TempCouponVo
vo
=
TempCouponVo
.
getNew
();
vo
.
setName
(
data
.
getName
());
vo
.
setType
(
data
.
getType
());
vo
.
setValue
(
data
.
getValue
());
vo
.
setSpuIdList
(
spuList
);
vo
.
setUcouponId
(
IDGenerator
.
nextTimeId2
());
redisUtils
.
addMarketTempCoupon
(
performanceId
,
vo
.
getUcouponId
());
redisUtils
.
setTempCoupon
(
vo
.
getUcouponId
(),
vo
);
}
})).
sheet
().
doRead
();
}
catch
(
Exception
e
)
{
...
...
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