记得上下班打卡 | 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
20968b25
Commit
20968b25
authored
Jan 19, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 下单接口
parent
df44b39f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
11 deletions
+62
-11
GoblinPayInnerResultVo.java
...quidnet/service/goblin/dto/vo/GoblinPayInnerResultVo.java
+1
-0
liquidnet-service-goblin.yml
...-bus-config/liquidnet-config/liquidnet-service-goblin.yml
+1
-0
liquidnet-service-platform.yml
...us-config/liquidnet-config/liquidnet-service-platform.yml
+24
-0
GoblinAppZhengzaiController.java
...ervice/goblin/controller/GoblinAppZhengzaiController.java
+1
-1
GoblinStoreZhengzaiController.java
...vice/goblin/controller/GoblinStoreZhengzaiController.java
+15
-4
GoblinOrderServiceImpl.java
...t/service/goblin/service/impl/GoblinOrderServiceImpl.java
+20
-6
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinPayInnerResultVo.java
View file @
20968b25
...
@@ -10,6 +10,7 @@ public class GoblinPayInnerResultVo implements Serializable, Cloneable {
...
@@ -10,6 +10,7 @@ public class GoblinPayInnerResultVo implements Serializable, Cloneable {
private
String
code
;
private
String
code
;
private
String
orderCode
;
private
String
orderCode
;
private
String
orderMasterCode
;
private
Integer
status
;
private
Integer
status
;
private
String
orderId
;
private
String
orderId
;
private
String
payType
;
private
String
payType
;
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-goblin.yml
View file @
20968b25
...
@@ -101,6 +101,7 @@ global-auth:
...
@@ -101,6 +101,7 @@ global-auth:
-
${liquidnet.info.context}/v2/api-docs*
-
${liquidnet.info.context}/v2/api-docs*
-
${liquidnet.info.context}/inner/**
-
${liquidnet.info.context}/inner/**
-
${liquidnet.info.context}/front/*
-
${liquidnet.info.context}/front/*
-
${liquidnet.info.context}/zhengzai/store/**
oncheck-url-pattern
:
oncheck-url-pattern
:
-
-
# -----------------------------------------------------------
# -----------------------------------------------------------
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-platform.yml
View file @
20968b25
...
@@ -137,6 +137,30 @@ spring:
...
@@ -137,6 +137,30 @@ spring:
max-wait
:
-1
max-wait
:
-1
max-idle
:
8
max-idle
:
8
min-idle
:
0
min-idle
:
0
stone
:
database
:
15
dbs
:
${liquidnet.redis.stone.dbs}
port
:
${liquidnet.redis.stone.port}
host
:
${liquidnet.redis.stone.host}
password
:
${liquidnet.redis.stone.password}
lettuce
:
pool
:
max-active
:
8
max-wait
:
-1
max-idle
:
8
min-idle
:
0
goblin
:
database
:
15
dbs
:
${liquidnet.redis.goblin.dbs}
port
:
${liquidnet.redis.goblin.port}
host
:
${liquidnet.redis.goblin.host}
password
:
${liquidnet.redis.goblin.password}
lettuce
:
pool
:
max-active
:
8
max-wait
:
-1
max-idle
:
8
min-idle
:
0
data
:
data
:
mongodb
:
mongodb
:
uri
:
mongodb://${liquidnet.mongodb.user}:${liquidnet.mongodb.pwd}@${liquidnet.mongodb.host}/?authSource=admin&maxPoolSize=200&waitQueueMultiple=100
uri
:
mongodb://${liquidnet.mongodb.user}:${liquidnet.mongodb.pwd}@${liquidnet.mongodb.host}/?authSource=admin&maxPoolSize=200&waitQueueMultiple=100
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinAppZhengzaiController.java
View file @
20968b25
...
@@ -16,7 +16,7 @@ import java.util.List;
...
@@ -16,7 +16,7 @@ import java.util.List;
@Slf4j
@Slf4j
@Api
(
tags
=
"正在下单相关"
)
@Api
(
tags
=
"正在下单相关"
)
@RestController
@RestController
@RequestMapping
(
"/zhengzai"
)
@RequestMapping
(
"/zhengzai
/app
"
)
public
class
GoblinAppZhengzaiController
{
public
class
GoblinAppZhengzaiController
{
@Autowired
@Autowired
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinStoreZhengzaiController.java
View file @
20968b25
package
com
.
liquidnet
.
service
.
goblin
.
controller
;
package
com
.
liquidnet
.
service
.
goblin
.
controller
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.manage.GoblinOrderParam
;
import
com.liquidnet.service.goblin.dto.vo.GoblinPayInnerResultVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinSelfMarketingVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinSelfMarketingVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinZhengzaiGoodVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinZhengzaiGoodVo
;
import
com.liquidnet.service.goblin.service.IGoblinOrderService
;
import
com.liquidnet.service.goblin.service.IGoblinStoreZhengzaiService
;
import
com.liquidnet.service.goblin.service.IGoblinStoreZhengzaiService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
...
@@ -10,10 +13,7 @@ import io.swagger.annotations.ApiImplicitParams;
...
@@ -10,10 +13,7 @@ import io.swagger.annotations.ApiImplicitParams;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
java.util.List
;
import
java.util.List
;
...
@@ -26,6 +26,8 @@ public class GoblinStoreZhengzaiController {
...
@@ -26,6 +26,8 @@ public class GoblinStoreZhengzaiController {
@Autowired
@Autowired
IGoblinStoreZhengzaiService
goblinStoreZhengzaiService
;
IGoblinStoreZhengzaiService
goblinStoreZhengzaiService
;
@Autowired
IGoblinOrderService
goblinOrderService
;
@GetMapping
(
"market/list"
)
@GetMapping
(
"market/list"
)
@ApiOperation
(
"正在下单-活动列表"
)
@ApiOperation
(
"正在下单-活动列表"
)
...
@@ -41,4 +43,13 @@ public class GoblinStoreZhengzaiController {
...
@@ -41,4 +43,13 @@ public class GoblinStoreZhengzaiController {
public
ResponseDto
<
List
<
GoblinZhengzaiGoodVo
>>
getStoreList
(
@RequestParam
(
"marketId"
)
@Valid
String
marketId
)
{
public
ResponseDto
<
List
<
GoblinZhengzaiGoodVo
>>
getStoreList
(
@RequestParam
(
"marketId"
)
@Valid
String
marketId
)
{
return
goblinStoreZhengzaiService
.
getSpuList
(
marketId
);
return
goblinStoreZhengzaiService
.
getSpuList
(
marketId
);
}
}
@PostMapping
(
"fc7bce6d6c2213b866f76493f92224b7"
)
@ApiOperation
(
"正在下单-下单"
)
public
ResponseDto
<
GoblinPayInnerResultVo
>
checkOrder
(
@RequestBody
GoblinOrderParam
param
)
{
if
(
param
.
getUid
()
==
null
)
{
param
.
setUid
(
"zhengzai"
);
}
return
goblinOrderService
.
checkOrder
(
param
,
param
.
getUid
());
}
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinOrderServiceImpl.java
View file @
20968b25
...
@@ -205,7 +205,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -205,7 +205,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
marketId
=
spuVo
.
getMarketId
();
marketId
=
spuVo
.
getMarketId
();
marketType
=
pre
;
marketType
=
pre
;
skuName
=
skuName
.
concat
(
skuVo
.
getName
()).
concat
(
","
);
skuName
=
skuName
.
concat
(
skuVo
.
getName
()).
concat
(
","
);
if
(
pre
!=
null
&&
pre
.
contains
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
()))
{
if
(
pre
!=
null
&&
pre
.
equals
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
()))
{
writeOffCode
=
"EMPTY"
;
writeOffCode
=
"EMPTY"
;
}
}
//获得 商品原价和活动价格
//获得 商品原价和活动价格
...
@@ -226,7 +226,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -226,7 +226,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
}
}
}
}
//获得活动优惠价格
//获得活动优惠价格
priceBase
=
priceBase
.
subtract
(
BigDecimal
.
valueOf
(
skuParam
.
getNumber
()));
priceBase
=
priceBase
.
multiply
(
BigDecimal
.
valueOf
(
skuParam
.
getNumber
()));
price
=
price
.
subtract
(
BigDecimal
.
valueOf
(
skuParam
.
getNumber
()));
price
=
price
.
subtract
(
BigDecimal
.
valueOf
(
skuParam
.
getNumber
()));
voucherMarket
=
voucherMarket
.
add
(
priceBase
.
subtract
(
price
));
voucherMarket
=
voucherMarket
.
add
(
priceBase
.
subtract
(
price
));
storeTotalPrice
=
storeTotalPrice
.
add
(
price
);
storeTotalPrice
=
storeTotalPrice
.
add
(
price
);
...
@@ -273,9 +273,13 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -273,9 +273,13 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
storeOrder
.
setUserName
(
StringUtils
.
defaultString
(((
String
)
token
.
get
(
"nickname"
)),
""
));
storeOrder
.
setUserName
(
StringUtils
.
defaultString
(((
String
)
token
.
get
(
"nickname"
)),
""
));
storeOrder
.
setUserMobile
(
StringUtils
.
defaultString
(((
String
)
token
.
get
(
"mobile"
)),
""
));
storeOrder
.
setUserMobile
(
StringUtils
.
defaultString
(((
String
)
token
.
get
(
"mobile"
)),
""
));
storeOrder
.
setPriceTotal
(
storeTotalPrice
);
storeOrder
.
setPriceTotal
(
storeTotalPrice
);
storeOrder
.
setPriceActual
(
storeOrder
.
getPriceTotal
().
add
(
storeOrder
.
getPriceExpress
()).
subtract
(
voucherMarket
).
subtract
(
voucherPrice
));
if
(
addressesVo
==
null
){
storeOrder
.
setPriceRefund
(
BigDecimal
.
ZERO
);
storeOrder
.
setPriceExpress
(
BigDecimal
.
ZERO
);
}
else
{
storeOrder
.
setPriceExpress
(
BigDecimal
.
TEN
);
storeOrder
.
setPriceExpress
(
BigDecimal
.
TEN
);
}
storeOrder
.
setPriceActual
(
storeOrder
.
getPriceTotal
().
add
(
storeOrder
.
getPriceExpress
()).
add
(
voucherMarket
).
subtract
(
voucherPrice
));
storeOrder
.
setPriceRefund
(
BigDecimal
.
ZERO
);
storeOrder
.
setPriceCoupon
(
voucherPrice
);
storeOrder
.
setPriceCoupon
(
voucherPrice
);
storeOrder
.
setPriceVoucher
(
voucherMarket
.
add
(
voucherPrice
));
storeOrder
.
setPriceVoucher
(
voucherMarket
.
add
(
voucherPrice
));
storeOrder
.
setStatus
(
0
);
storeOrder
.
setStatus
(
0
);
...
@@ -322,7 +326,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -322,7 +326,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
boolean
isFree
=
false
;
boolean
isFree
=
false
;
GoblinPayInnerResultVo
payInnerResultVo
;
GoblinPayInnerResultVo
payInnerResultVo
;
String
payCode
;
String
payCode
;
if
(
preParam
.
getPriceActual
().
compareTo
(
BigDecimal
.
valueOf
(
0
))
>
0
)
{
if
(
preParam
.
getPriceActual
().
compareTo
(
BigDecimal
.
valueOf
(
0
))
>
0
&&
!
preParam
.
getPayType
().
equals
(
"huifu"
)
)
{
// 调用支付
// 调用支付
LinkedMultiValueMap
<
String
,
String
>
httpData
=
CollectionUtil
.
linkedMultiValueMapStringString
();
LinkedMultiValueMap
<
String
,
String
>
httpData
=
CollectionUtil
.
linkedMultiValueMapStringString
();
httpData
.
add
(
"type"
,
"PRODUCT"
);
httpData
.
add
(
"type"
,
"PRODUCT"
);
...
@@ -364,6 +368,13 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -364,6 +368,13 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
payCode
=
payInnerResultVo
.
getCode
();
payCode
=
payInnerResultVo
.
getCode
();
payInnerResultVo
.
setShowUrl
(
preParam
.
getShowUrl
());
payInnerResultVo
.
setShowUrl
(
preParam
.
getShowUrl
());
payInnerResultVo
.
setReturnUrl
(
preParam
.
getReturnUrl
());
payInnerResultVo
.
setReturnUrl
(
preParam
.
getReturnUrl
());
}
else
if
(
preParam
.
getPayType
().
equals
(
"huifu"
)){
isFree
=
true
;
preParam
.
setPayType
(
"huifu"
);
payCode
=
"HUIFU_PAY_CODE"
;
payInnerResultVo
=
GoblinPayInnerResultVo
.
getNew
();
payInnerResultVo
.
setPrice
(
preParam
.
getPriceActual
());
payInnerResultVo
.
setPayType
(
preParam
.
getPayType
());
}
else
{
}
else
{
isFree
=
true
;
isFree
=
true
;
preParam
.
setPayType
(
"FREE"
);
preParam
.
setPayType
(
"FREE"
);
...
@@ -372,6 +383,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -372,6 +383,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
payInnerResultVo
.
setPrice
(
BigDecimal
.
valueOf
(
0
));
payInnerResultVo
.
setPrice
(
BigDecimal
.
valueOf
(
0
));
payInnerResultVo
.
setPayType
(
preParam
.
getPayType
());
payInnerResultVo
.
setPayType
(
preParam
.
getPayType
());
}
}
payInnerResultVo
.
setOrderMasterCode
(
preParam
.
getOrderMasterCode
());
LinkedList
<
String
>
sqls
=
CollectionUtil
.
linkedListString
();
LinkedList
<
String
>
sqls
=
CollectionUtil
.
linkedListString
();
sqls
.
add
(
SqlMapping
.
get
(
"goblin.order.create.sku_insert"
));
sqls
.
add
(
SqlMapping
.
get
(
"goblin.order.create.sku_insert"
));
...
@@ -428,7 +440,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -428,7 +440,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_ORDER_CREATE_PAY
.
getKey
(),
sqlData
);
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_ORDER_CREATE_PAY
.
getKey
(),
sqlData
);
}
}
log
.
info
(
UserPathDto
.
setData
(
"下单(唤起支付)"
,
preParam
,
payInnerResultVo
));
log
.
info
(
UserPathDto
.
setData
(
"下单(唤起支付)"
,
preParam
,
payInnerResultVo
));
if
(
isFree
)
{
if
(
isFree
&&
preParam
.
getPayType
().
equals
(
"huifu"
))
{
return
ResponseDto
.
success
(
payInnerResultVo
);
}
else
if
(
isFree
)
{
SyncOrderParam
syncOrderParam
=
SyncOrderParam
.
getNew
();
SyncOrderParam
syncOrderParam
=
SyncOrderParam
.
getNew
();
syncOrderParam
.
setOrderCode
(
preParam
.
getOrderMasterCode
());
syncOrderParam
.
setOrderCode
(
preParam
.
getOrderMasterCode
());
syncOrderParam
.
setPaymentAt
(
DateUtil
.
format
(
LocalDateTime
.
now
(),
DateUtil
.
Formatter
.
yyyyMMddHHmmss
));
syncOrderParam
.
setPaymentAt
(
DateUtil
.
format
(
LocalDateTime
.
now
(),
DateUtil
.
Formatter
.
yyyyMMddHHmmss
));
...
...
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