记得上下班打卡 | 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
12e0d45b
Commit
12e0d45b
authored
Aug 22, 2022
by
张禹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pre' into 'master'
Pre See merge request
!298
parents
63c66cdd
479c3ffd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
25 deletions
+42
-25
GoblinRedisConst.java
...m/liquidnet/service/goblin/constant/GoblinRedisConst.java
+1
-0
GoblinOrderServiceImpl.java
...et/service/order/service/impl/GoblinOrderServiceImpl.java
+14
-10
KylinOrderTicketsServiceImpl.java
...vice/order/service/impl/KylinOrderTicketsServiceImpl.java
+15
-15
GoblinRedisUtils.java
...a/com/liquidnet/service/order/utils/GoblinRedisUtils.java
+12
-0
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/constant/GoblinRedisConst.java
View file @
12e0d45b
...
...
@@ -345,6 +345,7 @@ public class GoblinRedisConst {
/* ----------------------------------------------------------------- */
public
static
final
String
GOBLIN_ORDER_LOG
=
PREFIX
.
concat
(
"order:log:"
);
//无用
public
static
final
String
GOBLIN_EXPRESS_PRICE
=
PREFIX
.
concat
(
"express:price"
);
//快递费
/* ----------------------------------------------------------------- */
public
static
final
String
GOBLIN_NUM_LIST
=
PREFIX
.
concat
(
"nft:num:"
);
//$key+":"+$skuId 根据skuId获取序号list
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/GoblinOrderServiceImpl.java
View file @
12e0d45b
...
...
@@ -112,6 +112,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
skuAndPreListAndNumber
.
add
(
skuId
+
","
+
pre
+
","
+
number
);
// 判断库存
GoblinGoodsSkuInfoVo
skuVo
=
redisUtils
.
getGoodsSkuInfoVo
(
skuParam
.
getSkuId
());
if
(!
skuParam
.
getSpuId
().
equals
(
skuVo
.
getSpuId
())){
throw
new
Exception
(
"参数异常"
);
}
int
limitCount
=
skuVo
.
getBuyLimit
()
==
0
?
Integer
.
MAX_VALUE
:
skuVo
.
getBuyLimit
();
//判断限购
if
(
orderUtils
.
noZhengzaiOrder
(
uid
))
{
...
...
@@ -151,7 +154,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
return
orderUtils
.
orderException
(
skuAndPreListAndNumber
,
platformCodeList
,
storeCodeList
,
uid
,
"参数异常"
);
// throw new Exception("参数异常");
}
return
payOrder
(
preParam
,
orderSqlParams
,
uid
);
ResponseDto
<
GoblinPayInnerResultVo
>
data
=
payOrder
(
preParam
,
orderSqlParams
,
uid
);
log
.
info
(
UserPathDto
.
setData
(
"下单(唤起支付)"
,
param
,
data
));
return
data
;
}
catch
(
Exception
e
)
{
log
.
error
(
"Kylin Order Pay Error = {}"
,
e
);
Long
time3
=
System
.
currentTimeMillis
();
...
...
@@ -356,7 +361,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
if
(
addressesVo
==
null
)
{
storeOrder
.
setPriceExpress
(
BigDecimal
.
ZERO
);
}
else
{
storeOrder
.
setPriceExpress
(
BigDecimal
.
TEN
);
storeOrder
.
setPriceExpress
(
redisUtils
.
getExpressPrice
()
);
}
storeOrder
.
setPriceTotal
(
storeTotalPrice
.
add
(
storeOrder
.
getPriceExpress
()));
BigDecimal
priceActual
=
storeOrder
.
getPriceTotal
().
subtract
(
voucherPrice
).
subtract
(
storeVoucherPrice
);
...
...
@@ -421,13 +426,13 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
String
payCode
;
if
(
preParam
.
getPriceActual
().
compareTo
(
BigDecimal
.
valueOf
(
0
))
>
0
&&
!
preParam
.
getPayType
().
equals
(
"huifu"
))
{
// 调用支付
if
(
preParam
.
getPayType
().
equalsIgnoreCase
(
DragonConstant
.
PayChannelEnum
.
WEPAY
.
getCode
()))
{
if
(
preParam
.
getDeviceFrom
().
equalsIgnoreCase
(
DragonConstant
.
DeviceFromEnum
.
JS
.
getCode
())
||
preParam
.
getDeviceFrom
().
equalsIgnoreCase
(
DragonConstant
.
DeviceFromEnum
.
APPLET
.
getCode
()))
{
if
(
StringUtil
.
isEmpty
(
preParam
.
getOpenId
()))
{
return
ResponseDto
.
failure
(
"微信支付openId不能为空!"
);
}
}
}
//
if (preParam.getPayType().equalsIgnoreCase(DragonConstant.PayChannelEnum.WEPAY.getCode())) {
//
if (preParam.getDeviceFrom().equalsIgnoreCase(DragonConstant.DeviceFromEnum.JS.getCode()) || preParam.getDeviceFrom().equalsIgnoreCase(DragonConstant.DeviceFromEnum.APPLET.getCode())) {
//
if (StringUtil.isEmpty(preParam.getOpenId())) {
//
return ResponseDto.failure("微信支付openId不能为空!");
//
}
//
}
//
}
DragonPayBaseReqDto
dragonPayBaseReqDto
=
DragonPayBaseReqDto
.
getNew
();
dragonPayBaseReqDto
.
setPayType
(
preParam
.
getPayType
());
dragonPayBaseReqDto
.
setDeviceFrom
(
preParam
.
getDeviceFrom
());
...
...
@@ -616,7 +621,6 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
String
sqlData
=
SqlMapping
.
gets
(
sqls
,
sqlDataSku
,
sqlDataOrder
,
sqlDataAttr
);
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_ORDER_CREATE_PAY
.
getKey
(),
sqlData
);
log
.
info
(
UserPathDto
.
setData
(
"下单(唤起支付)"
,
preParam
,
payInnerResultVo
));
if
(
isFree
&&
preParam
.
getPayType
().
equals
(
"huifu"
))
{
SyncOrderParam
syncOrderParam
=
SyncOrderParam
.
getNew
();
syncOrderParam
.
setOrderCode
(
preParam
.
getOrderMasterCode
());
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/KylinOrderTicketsServiceImpl.java
View file @
12e0d45b
...
...
@@ -665,14 +665,14 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
if
(
name
.
equals
(
""
))
{
name
=
"正在现场"
;
}
// 调用支付
if
(
payOrderParam
.
getPayType
().
equalsIgnoreCase
(
DragonConstant
.
PayChannelEnum
.
WEPAY
.
getCode
()))
{
if
(
payOrderParam
.
getDeviceFrom
().
equalsIgnoreCase
(
DragonConstant
.
DeviceFromEnum
.
JS
.
getCode
())
||
payOrderParam
.
getDeviceFrom
().
equalsIgnoreCase
(
DragonConstant
.
DeviceFromEnum
.
APPLET
.
getCode
()))
{
if
(
StringUtil
.
isEmpty
(
payOrderParam
.
getOpenId
()))
{
return
ResponseDto
.
failure
(
"微信支付openId不能为空!"
);
}
}
}
//
// 调用支付
//
if (payOrderParam.getPayType().equalsIgnoreCase(DragonConstant.PayChannelEnum.WEPAY.getCode())) {
//
if (payOrderParam.getDeviceFrom().equalsIgnoreCase(DragonConstant.DeviceFromEnum.JS.getCode()) || payOrderParam.getDeviceFrom().equalsIgnoreCase(DragonConstant.DeviceFromEnum.APPLET.getCode())) {
//
if (StringUtil.isEmpty(payOrderParam.getOpenId())) {
//
return ResponseDto.failure("微信支付openId不能为空!");
//
}
//
}
//
}
DragonPayBaseReqDto
dragonPayBaseReqDto
=
DragonPayBaseReqDto
.
getNew
();
dragonPayBaseReqDto
.
setPayType
(
payOrderParam
.
getPayType
());
dragonPayBaseReqDto
.
setDeviceFrom
(
payOrderParam
.
getDeviceFrom
());
...
...
@@ -795,13 +795,13 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
if
(
name
.
equals
(
""
))
{
name
=
"正在现场"
;
}
if
(
payAgainParam
.
getPayType
().
equalsIgnoreCase
(
DragonConstant
.
PayChannelEnum
.
WEPAY
.
getCode
()))
{
if
(
payAgainParam
.
getDeviceFrom
().
equalsIgnoreCase
(
DragonConstant
.
DeviceFromEnum
.
JS
.
getCode
())
||
payAgainParam
.
getDeviceFrom
().
equalsIgnoreCase
(
DragonConstant
.
DeviceFromEnum
.
APPLET
.
getCode
()))
{
if
(
StringUtil
.
isEmpty
(
payAgainParam
.
getOpenId
()))
{
return
ResponseDto
.
failure
(
"微信支付openId不能为空!"
);
}
}
}
//
if (payAgainParam.getPayType().equalsIgnoreCase(DragonConstant.PayChannelEnum.WEPAY.getCode())) {
//
if (payAgainParam.getDeviceFrom().equalsIgnoreCase(DragonConstant.DeviceFromEnum.JS.getCode()) || payAgainParam.getDeviceFrom().equalsIgnoreCase(DragonConstant.DeviceFromEnum.APPLET.getCode())) {
//
if (StringUtil.isEmpty(payAgainParam.getOpenId())) {
//
return ResponseDto.failure("微信支付openId不能为空!");
//
}
//
}
//
}
DragonPayBaseReqDto
dragonPayBaseReqDto
=
DragonPayBaseReqDto
.
getNew
();
dragonPayBaseReqDto
.
setPayType
(
payAgainParam
.
getPayType
());
dragonPayBaseReqDto
.
setDeviceFrom
(
payAgainParam
.
getDeviceFrom
());
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/GoblinRedisUtils.java
View file @
12e0d45b
...
...
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Component;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
...
...
@@ -722,4 +723,15 @@ public class GoblinRedisUtils {
return
(
int
)
obj
;
}
}
//获取快递费
public
BigDecimal
getExpressPrice
()
{
String
rdk
=
GoblinRedisConst
.
GOBLIN_EXPRESS_PRICE
;
Object
obj
=
redisUtil
.
get
(
rdk
);
if
(
obj
==
null
)
{
return
BigDecimal
.
TEN
;
}
else
{
return
BigDecimal
.
valueOf
((
int
)
obj
);
}
}
}
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