记得上下班打卡 | 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
ebbb3645
Commit
ebbb3645
authored
Mar 21, 2022
by
Administrator
🎨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pre' into 'master'
Pre See merge request
!195
parents
401111aa
c75689eb
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
16 deletions
+43
-16
AdamRscController.java
.../liquidnet/service/adam/controller/AdamRscController.java
+16
-3
CandyCouponServiceImpl.java
...et/service/candy/service/impl/CandyCouponServiceImpl.java
+14
-6
RedisDataUtils.java
...java/com/liquidnet/service/candy/util/RedisDataUtils.java
+1
-1
GoblinCouponImpl.java
...quidnet/service/goblin/service/impl/GoblinCouponImpl.java
+5
-3
GoblinOrderUtils.java
...a/com/liquidnet/service/order/utils/GoblinOrderUtils.java
+7
-3
No files found.
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/controller/AdamRscController.java
View file @
ebbb3645
...
...
@@ -2,6 +2,7 @@ package com.liquidnet.service.adam.controller;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.adam.dto.rsc.AdamChimeUinfoDto
;
import
com.liquidnet.service.adam.dto.rsc.AdamChimeUinfoReq
;
import
com.liquidnet.service.adam.dto.vo.*
;
...
...
@@ -26,6 +27,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Pattern
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
...
...
@@ -82,6 +84,17 @@ public class AdamRscController {
return
ResponseDto
.
success
(
adamRdmService
.
getUserMemberVoByUid
(
uid
));
}
@ApiOperationSupport
(
order
=
22
)
@ApiOperation
(
value
=
"@API:用户创建日期"
)
@GetMapping
(
"inquire/createdAt"
)
public
ResponseDto
<
LocalDateTime
>
queryCreatedAt
(
@NotBlank
(
message
=
"用户ID不能为空"
)
@RequestParam
String
uid
)
{
AdamUserInfoVo
vo
=
adamRdmService
.
getUserInfoVoByUid
(
uid
);
if
(
vo
==
null
)
{
return
ResponseDto
.
success
(
LocalDateTime
.
of
(
2222
,
1
,
1
,
1
,
1
,
1
,
1
));
}
return
ResponseDto
.
success
(
vo
.
getCreateAt
());
}
@ApiOperationSupport
(
order
=
30
)
@ApiOperation
(
value
=
"@API:票务下单所需信息查询"
,
notes
=
"包括是否会员、收货地址及入场人信息"
)
@PostMapping
(
"inquire/of_buy_ticket"
)
...
...
@@ -136,12 +149,12 @@ public class AdamRscController {
@ApiOperationSupport
(
order
=
40
)
@ApiOperation
(
value
=
"@API:社交用户点击喜欢或不喜欢"
,
notes
=
"发送点击事件计数"
)
@PostMapping
(
"inquire/sendMsgToRedis"
)
public
ResponseDto
<
Boolean
>
sendMsgToRedis
(
@RequestParam
(
required
=
true
)
String
redisKey
,
@RequestParam
(
required
=
true
)
String
jsonParamStr
)
{
public
ResponseDto
<
Boolean
>
sendMsgToRedis
(
@RequestParam
(
required
=
true
)
String
redisKey
,
@RequestParam
(
required
=
true
)
String
jsonParamStr
)
{
if
(
null
==
redisKey
||
null
==
jsonParamStr
||
redisKey
.
isEmpty
()
||
jsonParamStr
.
isEmpty
())
{
return
ResponseDto
.
failure
();
}
try
{
queueUtils
.
sendMsgByRedis
(
redisKey
,
jsonParamStr
);
queueUtils
.
sendMsgByRedis
(
redisKey
,
jsonParamStr
);
}
catch
(
Exception
e
)
{
log
.
error
(
"@API:社交用户点击喜欢或不喜欢计数入队"
,
e
);
}
...
...
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/service/impl/CandyCouponServiceImpl.java
View file @
ebbb3645
package
com
.
liquidnet
.
service
.
candy
.
service
.
impl
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.liquidnet.commons.lang.util.*
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.SqlMapping
;
import
com.liquidnet.service.base.constant.MQConst
;
...
...
@@ -22,7 +20,9 @@ import com.liquidnet.service.candy.vo.CandyCouponVo;
import
com.liquidnet.service.candy.vo.CandyMyCouponListVo
;
import
com.liquidnet.service.candy.vo.CandyUseResultVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.MultiValueMap
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
...
...
@@ -44,6 +44,8 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
private
RedisDataUtils
redisDataUtils
;
@Autowired
private
QueueUtils
queueUtils
;
@Value
(
"${liquidnet.service.adam.url}"
)
private
String
adamUrl
;
@Override
public
CandyMyCouponListVo
myCoupon
(
Integer
type
)
{
...
...
@@ -433,7 +435,13 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
String
uid
=
item
.
getUid
();
LocalDateTime
userCreateTime
;
try
{
userCreateTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmssTrim
.
parse
(
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_UCREATED
).
toString
());
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
);
userCreateTime
=
JsonUtils
.
fromJson
(
returnData
,
new
TypeReference
<
ResponseDto
<
LocalDateTime
>>()
{
}).
getData
();
}
catch
(
Exception
e
)
{
userCreateTime
=
null
;
}
...
...
@@ -535,7 +543,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
}
@Override
public
ResponseDto
<
List
<
CandyCouponVo
>>
couponListById
(
String
uCouponIds
,
String
uid
)
{
public
ResponseDto
<
List
<
CandyCouponVo
>>
couponListById
(
String
uCouponIds
,
String
uid
)
{
LocalDateTime
userCreateTime
;
try
{
userCreateTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmssTrim
.
parse
(
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_UCREATED
).
toString
());
...
...
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/util/RedisDataUtils.java
View file @
ebbb3645
...
...
@@ -65,7 +65,7 @@ public class RedisDataUtils {
boolean
needSet
=
false
;
if
(
userCreateTime
==
null
)
{
userCreateTime
=
LocalDateTime
.
MIN
;
userCreateTime
=
LocalDateTime
.
of
(
2222
,
1
,
1
,
0
,
0
,
0
)
;
}
List
<
String
>
userIds
=
userDto
.
stream
().
map
(
CandyUserCouponBasicDto:
:
getCcouponId
).
collect
(
Collectors
.
toList
());
if
(
userIds
!=
null
&&
userIds
.
size
()
>
0
)
{
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinCouponImpl.java
View file @
ebbb3645
...
...
@@ -289,7 +289,7 @@ public class GoblinCouponImpl implements GoblinCouponService {
}
else
{
List
<
String
>
spuIds
=
goblinRedisUtils
.
getStoreCouponSpuIds
(
vo
.
getStoreCouponId
());
if
(
spuIds
==
null
||
spuIds
.
size
()
==
0
)
{
break
;
continue
;
}
//判断是否在可用商品内
BigDecimal
contentPrice
=
BigDecimal
.
ZERO
;
...
...
@@ -440,7 +440,7 @@ public class GoblinCouponImpl implements GoblinCouponService {
}
else
{
//部分
List
<
String
>
spuIds
=
goblinRedisUtils
.
getStoreCouponSpuIds
(
itemVo
.
getStoreCouponId
());
if
(
spuIds
==
null
||
spuIds
.
size
()
==
0
)
{
break
;
continue
;
}
//判断是否在可用商品内
for
(
String
spuItem
:
spuIds
)
{
...
...
@@ -545,8 +545,10 @@ public class GoblinCouponImpl implements GoblinCouponService {
BigDecimal
tempPrice
=
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
.
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 @
ebbb3645
...
...
@@ -262,8 +262,10 @@ public class GoblinOrderUtils {
BigDecimal
tempPrice
=
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
.
setCouType
(
vo
.
getType
());
}
else
if
(
vo
.
getType
().
equals
(
"3"
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
<=
0
)
{
//满减
returnVo
.
setValue
(
vo
.
getValMinus
());
...
...
@@ -278,7 +280,7 @@ public class GoblinOrderUtils {
}
else
{
spuIds
=
redisUtils
.
getStoreCouponSpuIds
(
vo
.
getStoreCouponId
());
if
(
spuIds
==
null
||
spuIds
.
size
()
==
0
)
{
break
;
continue
;
}
//判断是否在可用商品内
BigDecimal
contentPrice
=
BigDecimal
.
ZERO
;
...
...
@@ -306,8 +308,10 @@ public class GoblinOrderUtils {
BigDecimal
tempPrice
=
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
(
contentPrice
.
subtract
(
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