记得上下班打卡 | 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
d182a165
Commit
d182a165
authored
Mar 21, 2022
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pre' into 'master'
Pre See merge request
!196
parents
ebbb3645
b9fe421f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
40 deletions
+44
-40
add1.html
...n/resources/templates/zhengzai/candy/coupon/mgt/add1.html
+1
-1
add101.html
...resources/templates/zhengzai/candy/coupon/mgt/add101.html
+1
-1
add2.html
...n/resources/templates/zhengzai/candy/coupon/mgt/add2.html
+1
-1
add4.html
...n/resources/templates/zhengzai/candy/coupon/mgt/add4.html
+1
-1
CandyCouponServiceImpl.java
...et/service/candy/service/impl/CandyCouponServiceImpl.java
+34
-24
GoblinCouponImpl.java
...quidnet/service/goblin/service/impl/GoblinCouponImpl.java
+2
-4
GoblinOrderUtils.java
...a/com/liquidnet/service/order/utils/GoblinOrderUtils.java
+4
-8
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/mgt/add1.html
View file @
d182a165
...
...
@@ -204,7 +204,7 @@
<div
style=
"display: flex;align-items: center;"
>
<span
class=
"labelName"
>
发送类型:
</span>
<div
class=
"layui-input-block"
style=
"display: flex"
>
<input
type=
"radio"
value=
"10"
class=
"sendType"
name=
"sendType"
checked
><span>
全体用户
</span
>
<!-- <input type="radio" value="10" class="sendType" name="sendType" checked><span>全体用户</span>--
>
<input
type=
"radio"
value=
"1"
class=
"sendType"
name=
"sendType"
><span>
会员
</span>
<input
type=
"radio"
value=
"2"
class=
"sendType"
name=
"sendType"
><span>
手机号
</span>
</div>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/mgt/add101.html
View file @
d182a165
...
...
@@ -200,7 +200,7 @@
<div
style=
"display: flex;align-items: center;"
>
<span
class=
"labelName"
>
发送类型:
</span>
<div
class=
"layui-input-block"
style=
"display: flex"
>
<input
type=
"radio"
value=
"10"
class=
"sendType"
name=
"sendType"
checked
><span>
全体用户
</span
>
<!-- <input type="radio" value="10" class="sendType" name="sendType" checked><span>全体用户</span>--
>
<input
type=
"radio"
value=
"1"
class=
"sendType"
name=
"sendType"
><span>
会员
</span>
<input
type=
"radio"
value=
"2"
class=
"sendType"
name=
"sendType"
><span>
手机号
</span>
</div>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/mgt/add2.html
View file @
d182a165
...
...
@@ -207,7 +207,7 @@
<div
style=
"display: flex;align-items: center;"
>
<span
class=
"labelName"
>
发送类型:
</span>
<div
class=
"layui-input-block"
style=
"display: flex"
>
<input
type=
"radio"
value=
"10"
class=
"sendType"
name=
"sendType"
checked
><span>
全体用户
</span
>
<!-- <input type="radio" value="10" class="sendType" name="sendType" checked><span>全体用户</span>--
>
<input
type=
"radio"
value=
"1"
class=
"sendType"
name=
"sendType"
><span>
会员
</span>
<input
type=
"radio"
value=
"2"
class=
"sendType"
name=
"sendType"
><span>
手机号
</span>
</div>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/mgt/add4.html
View file @
d182a165
...
...
@@ -197,7 +197,7 @@
<div
style=
"display: flex;align-items: center;"
>
<span
class=
"labelName"
>
发送类型:
</span>
<div
class=
"layui-input-block"
style=
"display: flex"
>
<input
type=
"radio"
value=
"10"
class=
"sendType"
name=
"sendType"
checked
><span>
全体用户
</span
>
<!-- <input type="radio" value="10" class="sendType" name="sendType" checked><span>全体用户</span>--
>
<input
type=
"radio"
value=
"1"
class=
"sendType"
name=
"sendType"
><span>
会员
</span>
<input
type=
"radio"
value=
"2"
class=
"sendType"
name=
"sendType"
><span>
手机号
</span>
</div>
...
...
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/service/impl/CandyCouponServiceImpl.java
View file @
d182a165
...
...
@@ -52,9 +52,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
String
uid
=
CurrentUtil
.
getCurrentUid
();
LocalDateTime
userCreateTime
;
try
{
userCreateTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmssTrim
.
parse
(
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_UCREATED
).
toString
()
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
userCreateTime
=
null
;
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
)
;
}
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
CandyMyCouponListVo
vo
=
CandyMyCouponListVo
.
getNew
();
...
...
@@ -94,9 +94,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
ArrayList
<
CandyCouponPreVo
>
voArrayList
=
ObjectUtil
.
getCandyCouponPreVoArrayList
();
LocalDateTime
userCreateTime
;
try
{
userCreateTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmssTrim
.
parse
(
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_UCREATED
).
toString
()
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
userCreateTime
=
null
;
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
)
;
}
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
if
(!
CollectionUtil
.
isEmpty
(
dtoList
))
{
...
...
@@ -114,9 +114,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
String
uid
=
CurrentUtil
.
getCurrentUid
();
LocalDateTime
userCreateTime
;
try
{
userCreateTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmssTrim
.
parse
(
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_UCREATED
).
toString
()
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
userCreateTime
=
null
;
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
)
;
}
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
List
<
CandyCouponVo
>
memberCoupon
=
ObjectUtil
.
getCandyCouponVoArrayList
();
...
...
@@ -143,9 +143,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
String
uid
=
CurrentUtil
.
getCurrentUid
();
LocalDateTime
userCreateTime
;
try
{
userCreateTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmssTrim
.
parse
(
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_UCREATED
).
toString
()
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
userCreateTime
=
null
;
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
)
;
}
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
CandyMyCouponListVo
vo
=
CandyMyCouponListVo
.
getNew
();
...
...
@@ -186,9 +186,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
String
uid
=
CurrentUtil
.
getCurrentUid
();
LocalDateTime
userCreateTime
;
try
{
userCreateTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmssTrim
.
parse
(
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_UCREATED
).
toString
()
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
userCreateTime
=
null
;
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
)
;
}
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
int
canUse
=
0
;
...
...
@@ -211,9 +211,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
public
CandyMyCouponListVo
preUseGoodCoupon
(
BigDecimal
priceTotal
,
String
goodId
,
Integer
type
,
String
uid
)
{
LocalDateTime
userCreateTime
;
try
{
userCreateTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmssTrim
.
parse
(
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_UCREATED
).
toString
()
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
userCreateTime
=
null
;
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
)
;
}
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
CandyMyCouponListVo
vo
=
CandyMyCouponListVo
.
getNew
();
...
...
@@ -253,9 +253,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
public
Integer
preCanUseGoodCoupon
(
BigDecimal
priceTotal
,
String
goodId
,
String
uid
)
{
LocalDateTime
userCreateTime
;
try
{
userCreateTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmssTrim
.
parse
(
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_UCREATED
).
toString
()
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
userCreateTime
=
null
;
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
)
;
}
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
int
canUse
=
0
;
...
...
@@ -279,9 +279,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
String
uid
=
CurrentUtil
.
getCurrentUid
();
LocalDateTime
userCreateTime
;
try
{
userCreateTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmssTrim
.
parse
(
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_UCREATED
).
toString
()
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
userCreateTime
=
null
;
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
)
;
}
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
List
<
CandyCouponVo
>
advanceCoupon
=
ObjectUtil
.
getCandyCouponVoArrayList
();
...
...
@@ -305,9 +305,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
String
uid
=
CurrentUtil
.
getCurrentUid
();
LocalDateTime
userCreateTime
;
try
{
userCreateTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmssTrim
.
parse
(
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_UCREATED
).
toString
()
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
userCreateTime
=
null
;
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
)
;
}
CandyUserCouponBasicDto
dto
=
CouponBaseUtil
.
getSingleDtoByUCouponId
(
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
),
uCouponId
);
if
(
dto
==
null
)
{
...
...
@@ -320,9 +320,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
public
CandyUseResultVo
useCoupon
(
String
uCouponId
,
String
content
,
String
totalPrice
,
String
performanceId
,
String
timesId
,
String
ticketId
,
String
goodId
,
String
uid
)
{
LocalDateTime
userCreateTime
;
try
{
userCreateTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmssTrim
.
parse
(
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_UCREATED
).
toString
()
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
userCreateTime
=
null
;
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
)
;
}
CandyUseResultVo
vo
=
CandyUseResultVo
.
getNew
();
List
<
String
>
targetIds
=
CollectionUtil
.
linkedListString
();
...
...
@@ -475,9 +475,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
String
uid
=
CurrentUtil
.
getCurrentUid
();
LocalDateTime
userCreateTime
;
try
{
userCreateTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmssTrim
.
parse
(
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_UCREATED
).
toString
()
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
userCreateTime
=
null
;
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
)
;
}
String
mobile
=
(
String
)
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_MOBILE
);
...
...
@@ -546,9 +546,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
public
ResponseDto
<
List
<
CandyCouponVo
>>
couponListById
(
String
uCouponIds
,
String
uid
)
{
LocalDateTime
userCreateTime
;
try
{
userCreateTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmssTrim
.
parse
(
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_UCREATED
).
toString
()
);
userCreateTime
=
getCreatedAt
(
uid
);
}
catch
(
Exception
e
)
{
userCreateTime
=
null
;
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
)
;
}
ArrayList
<
String
>
uCouponIdList
=
new
ArrayList
(
Arrays
.
asList
(
uCouponIds
.
split
(
","
)));
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
,
userCreateTime
);
...
...
@@ -567,4 +567,14 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
}
return
ResponseDto
.
success
(
vo
);
}
private
LocalDateTime
getCreatedAt
(
String
uid
){
MultiValueMap
<
String
,
String
>
params
=
CollectionUtil
.
linkedMultiValueMapStringString
();
params
.
add
(
"uid"
,
uid
);
MultiValueMap
<
String
,
String
>
headers
=
CollectionUtil
.
linkedMultiValueMapStringString
();
headers
.
add
(
"Accept"
,
"application/json;charset=UTF-8"
);
String
returnData
=
HttpUtil
.
post
(
adamUrl
.
concat
(
"/adam/rsc/inquire/createdAt"
),
params
,
headers
);
return
JsonUtils
.
fromJson
(
returnData
,
new
TypeReference
<
ResponseDto
<
LocalDateTime
>>()
{}).
getData
();
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinCouponImpl.java
View file @
d182a165
...
...
@@ -542,13 +542,11 @@ public class GoblinCouponImpl implements GoblinCouponService {
}
returnVo
.
setCouType
(
vo
.
getType
());
}
else
if
(
vo
.
getType
().
equals
(
"2"
))
{
//折扣
BigDecimal
tempPrice
=
contentPrice
.
multiply
(
vo
.
getDiscount
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
tempPrice
=
contentPrice
.
subtract
(
contentPrice
.
multiply
(
vo
.
getDiscount
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
);
if
(
tempPrice
.
compareTo
(
vo
.
getDeduction
())
>
0
)
{
tempPrice
=
vo
.
getDeduction
();
returnVo
.
setValue
(
tempPrice
);
}
else
{
returnVo
.
setValue
(
contentPrice
.
subtract
(
tempPrice
));
}
returnVo
.
setValue
(
tempPrice
);
returnVo
.
setCouType
(
vo
.
getType
());
}
else
if
(
vo
.
getType
().
equals
(
"3"
))
{
//满减
if
(
vo
.
getValMinus
().
compareTo
(
contentPrice
)
>
0
)
{
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/GoblinOrderUtils.java
View file @
d182a165
...
...
@@ -259,13 +259,11 @@ public class GoblinOrderUtils {
returnVo
.
setValue
(
vo
.
getValFace
());
returnVo
.
setCouType
(
vo
.
getType
());
}
else
if
(
vo
.
getType
().
equals
(
"2"
))
{
//折扣
BigDecimal
tempPrice
=
totalPrice
.
multiply
(
vo
.
getDiscount
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
tempPrice
=
totalPrice
.
subtract
(
totalPrice
.
multiply
(
vo
.
getDiscount
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
);
if
(
tempPrice
.
compareTo
(
vo
.
getDeduction
())
>
0
)
{
tempPrice
=
vo
.
getDeduction
();
returnVo
.
setValue
(
tempPrice
);
}
else
{
returnVo
.
setValue
(
totalPrice
.
subtract
(
tempPrice
));
}
returnVo
.
setValue
(
tempPrice
);
returnVo
.
setCouType
(
vo
.
getType
());
}
else
if
(
vo
.
getType
().
equals
(
"3"
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
<=
0
)
{
//满减
returnVo
.
setValue
(
vo
.
getValMinus
());
...
...
@@ -305,13 +303,11 @@ public class GoblinOrderUtils {
}
returnVo
.
setCouType
(
vo
.
getType
());
}
else
if
(
vo
.
getType
().
equals
(
"2"
))
{
//折扣
BigDecimal
tempPrice
=
contentPrice
.
multiply
(
vo
.
getDiscount
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
tempPrice
=
contentPrice
.
subtract
(
contentPrice
.
multiply
(
vo
.
getDiscount
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
);
if
(
tempPrice
.
compareTo
(
vo
.
getDeduction
())
>
0
)
{
tempPrice
=
vo
.
getDeduction
();
returnVo
.
setValue
(
tempPrice
);
}
else
{
returnVo
.
setValue
(
totalPrice
.
subtract
(
tempPrice
));
}
returnVo
.
setValue
(
tempPrice
);
returnVo
.
setCouType
(
vo
.
getType
());
}
else
if
(
vo
.
getType
().
equals
(
"3"
))
{
//满减
if
(
vo
.
getValMinus
().
compareTo
(
contentPrice
)
>
0
)
{
...
...
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