记得上下班打卡 | 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
21174eb0
Commit
21174eb0
authored
Jul 18, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
使用券 增加 id
parent
c032b792
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
CandyUseResultVo.java
...java/com/liquidnet/service/candy/vo/CandyUseResultVo.java
+4
-0
CandyCouponServiceImpl.java
...et/service/candy/service/impl/CandyCouponServiceImpl.java
+16
-14
No files found.
liquidnet-bus-api/liquidnet-service-candy-api/src/main/java/com/liquidnet/service/candy/vo/CandyUseResultVo.java
View file @
21174eb0
package
com
.
liquidnet
.
service
.
candy
.
vo
;
package
com
.
liquidnet
.
service
.
candy
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -10,6 +11,7 @@ import java.util.List;
...
@@ -10,6 +11,7 @@ import java.util.List;
@Data
@Data
@ApiModel
@ApiModel
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
CandyUseResultVo
implements
Serializable
,
Cloneable
{
public
class
CandyUseResultVo
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
4073256621782131607L
;
private
static
final
long
serialVersionUID
=
4073256621782131607L
;
...
@@ -21,6 +23,8 @@ public class CandyUseResultVo implements Serializable, Cloneable {
...
@@ -21,6 +23,8 @@ public class CandyUseResultVo implements Serializable, Cloneable {
private
List
<
String
>
targetIds
;
private
List
<
String
>
targetIds
;
@ApiModelProperty
(
value
=
"满减金额[满多少]"
)
@ApiModelProperty
(
value
=
"满减金额[满多少]"
)
private
BigDecimal
fullValue
;
private
BigDecimal
fullValue
;
@ApiModelProperty
(
value
=
"满减金额[满多少]"
)
private
String
couponId
;
private
static
final
CandyUseResultVo
obj
=
new
CandyUseResultVo
();
private
static
final
CandyUseResultVo
obj
=
new
CandyUseResultVo
();
...
...
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/service/impl/CandyCouponServiceImpl.java
View file @
21174eb0
...
@@ -54,7 +54,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -54,7 +54,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
try
{
try
{
userCreateTime
=
getCreatedAt
(
uid
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
}
}
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
CandyMyCouponListVo
vo
=
CandyMyCouponListVo
.
getNew
();
CandyMyCouponListVo
vo
=
CandyMyCouponListVo
.
getNew
();
...
@@ -96,7 +96,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -96,7 +96,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
try
{
try
{
userCreateTime
=
getCreatedAt
(
uid
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
}
}
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
if
(!
CollectionUtil
.
isEmpty
(
dtoList
))
{
if
(!
CollectionUtil
.
isEmpty
(
dtoList
))
{
...
@@ -116,7 +116,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -116,7 +116,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
try
{
try
{
userCreateTime
=
getCreatedAt
(
uid
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
}
}
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
List
<
CandyCouponVo
>
memberCoupon
=
ObjectUtil
.
getCandyCouponVoArrayList
();
List
<
CandyCouponVo
>
memberCoupon
=
ObjectUtil
.
getCandyCouponVoArrayList
();
...
@@ -145,7 +145,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -145,7 +145,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
try
{
try
{
userCreateTime
=
getCreatedAt
(
uid
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
}
}
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
CandyMyCouponListVo
vo
=
CandyMyCouponListVo
.
getNew
();
CandyMyCouponListVo
vo
=
CandyMyCouponListVo
.
getNew
();
...
@@ -188,7 +188,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -188,7 +188,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
try
{
try
{
userCreateTime
=
getCreatedAt
(
uid
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
}
}
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
int
canUse
=
0
;
int
canUse
=
0
;
...
@@ -213,7 +213,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -213,7 +213,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
try
{
try
{
userCreateTime
=
getCreatedAt
(
uid
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
}
}
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
CandyMyCouponListVo
vo
=
CandyMyCouponListVo
.
getNew
();
CandyMyCouponListVo
vo
=
CandyMyCouponListVo
.
getNew
();
...
@@ -255,7 +255,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -255,7 +255,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
try
{
try
{
userCreateTime
=
getCreatedAt
(
uid
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
}
}
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
int
canUse
=
0
;
int
canUse
=
0
;
...
@@ -281,7 +281,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -281,7 +281,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
try
{
try
{
userCreateTime
=
getCreatedAt
(
uid
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
}
}
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
List
<
CandyCouponVo
>
advanceCoupon
=
ObjectUtil
.
getCandyCouponVoArrayList
();
List
<
CandyCouponVo
>
advanceCoupon
=
ObjectUtil
.
getCandyCouponVoArrayList
();
...
@@ -307,7 +307,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -307,7 +307,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
try
{
try
{
userCreateTime
=
getCreatedAt
(
uid
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
}
}
CandyUserCouponBasicDto
dto
=
CouponBaseUtil
.
getSingleDtoByUCouponId
(
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
),
uCouponId
);
CandyUserCouponBasicDto
dto
=
CouponBaseUtil
.
getSingleDtoByUCouponId
(
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
),
uCouponId
);
if
(
dto
==
null
)
{
if
(
dto
==
null
)
{
...
@@ -322,7 +322,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -322,7 +322,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
try
{
try
{
userCreateTime
=
getCreatedAt
(
uid
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
}
}
CandyUseResultVo
vo
=
CandyUseResultVo
.
getNew
();
CandyUseResultVo
vo
=
CandyUseResultVo
.
getNew
();
List
<
String
>
targetIds
=
CollectionUtil
.
linkedListString
();
List
<
String
>
targetIds
=
CollectionUtil
.
linkedListString
();
...
@@ -339,6 +339,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -339,6 +339,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
dto
.
setCouType
(
dto
.
getCouType
());
dto
.
setCouType
(
dto
.
getCouType
());
}
}
vo
.
setCouType
(
dto
.
getCouType
());
vo
.
setCouType
(
dto
.
getCouType
());
vo
.
setCouponId
(
dto
.
getCouponId
());
switch
(
dto
.
getCouType
())
{
//券类型[1-代金券|2-满减券|3-兑换券|4-折扣券|101-优先券]
switch
(
dto
.
getCouType
())
{
//券类型[1-代金券|2-满减券|3-兑换券|4-折扣券|101-优先券]
case
1
:
case
1
:
vo
.
setValue
(
dto
.
getValFace
());
vo
.
setValue
(
dto
.
getValFace
());
...
@@ -477,7 +478,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -477,7 +478,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
try
{
try
{
userCreateTime
=
getCreatedAt
(
uid
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
}
}
String
mobile
=
(
String
)
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_MOBILE
);
String
mobile
=
(
String
)
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_MOBILE
);
...
@@ -548,7 +549,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -548,7 +549,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
try
{
try
{
userCreateTime
=
getCreatedAt
(
uid
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
);
}
}
ArrayList
<
String
>
uCouponIdList
=
new
ArrayList
(
Arrays
.
asList
(
uCouponIds
.
split
(
","
)));
ArrayList
<
String
>
uCouponIdList
=
new
ArrayList
(
Arrays
.
asList
(
uCouponIds
.
split
(
","
)));
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
...
@@ -569,12 +570,13 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -569,12 +570,13 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
}
}
private
LocalDateTime
getCreatedAt
(
String
uid
){
private
LocalDateTime
getCreatedAt
(
String
uid
)
{
MultiValueMap
<
String
,
String
>
params
=
CollectionUtil
.
linkedMultiValueMapStringString
();
MultiValueMap
<
String
,
String
>
params
=
CollectionUtil
.
linkedMultiValueMapStringString
();
params
.
add
(
"uid"
,
uid
);
params
.
add
(
"uid"
,
uid
);
MultiValueMap
<
String
,
String
>
headers
=
CollectionUtil
.
linkedMultiValueMapStringString
();
MultiValueMap
<
String
,
String
>
headers
=
CollectionUtil
.
linkedMultiValueMapStringString
();
headers
.
add
(
"Accept"
,
"application/json;charset=UTF-8"
);
headers
.
add
(
"Accept"
,
"application/json;charset=UTF-8"
);
String
returnData
=
HttpUtil
.
post
(
adamUrl
.
concat
(
"/adam/rsc/inquire/createdAt"
),
params
,
headers
);
String
returnData
=
HttpUtil
.
post
(
adamUrl
.
concat
(
"/adam/rsc/inquire/createdAt"
),
params
,
headers
);
return
JsonUtils
.
fromJson
(
returnData
,
new
TypeReference
<
ResponseDto
<
LocalDateTime
>>()
{}).
getData
();
return
JsonUtils
.
fromJson
(
returnData
,
new
TypeReference
<
ResponseDto
<
LocalDateTime
>>()
{
}).
getData
();
}
}
}
}
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