Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
8c2e2376
Commit
8c2e2376
authored
Jul 27, 2022
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配合预支付接口迁移非码付,查不到配置返回 9
parent
28327a74
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
30 deletions
+32
-30
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+4
-4
order-application-service/src/main/java/cn/freemud/service/ExposureOrderService.java
+2
-1
order-application-service/src/main/java/cn/freemud/service/impl/PayServiceImpl.java
+9
-8
order-application-service/src/main/java/cn/freemud/service/impl/PointsMallOrderServiceImpl.java
+1
-1
order-application-service/src/main/java/cn/freemud/service/impl/SellCouponOrderServiceImpl.java
+3
-3
order-application-service/src/main/java/cn/freemud/service/universal/UniversalOrderService.java
+13
-13
No files found.
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
8c2e2376
...
...
@@ -3420,7 +3420,7 @@ public class OrderAdapter {
,
OrderBeanV1
orderBean
,
PaymentRequest
paymentRequest
,
String
partnerPayOvertime
,
String
orderClient
,
String
clientCode
,
String
channel
,
Integer
totalAmount
)
{
CombPayRequest
orderPayDto
=
new
CombPayRequest
();
...
...
@@ -3464,7 +3464,7 @@ public class OrderAdapter {
String
ebcode
=
PayChannelType
.
getByIndex
(
Byte
.
parseByte
(
channel
)).
getEbcode
();
payPlatformVO
=
new
PayPlatformVO
();
payPlatformVO
.
setAmount
(
0L
);
payPlatformVO
.
setClientCode
(
orderClient
);
payPlatformVO
.
setClientCode
(
clientCode
);
payPlatformVO
.
setEbcode
(
ebcode
);
platforms
.
add
(
payPlatformVO
);
...
...
@@ -4060,7 +4060,7 @@ public class OrderAdapter {
,
OrderBeanV1
orderBean
,
PaymentRequest
paymentRequest
,
String
partnerPayOvertime
,
String
orderClient
,
String
clientCode
,
String
channel
,
Integer
totalAmount
)
{
MultiPayRequest
orderPayDto
=
new
MultiPayRequest
();
...
...
@@ -4104,7 +4104,7 @@ public class OrderAdapter {
String
ebcode
=
PayChannelType
.
getByIndex
(
Byte
.
parseByte
(
channel
)).
getEbcode
();
payPlatformVO
=
new
PayPlatformVO
();
payPlatformVO
.
setAmount
(
0L
);
payPlatformVO
.
setClientCode
(
orderClient
);
payPlatformVO
.
setClientCode
(
clientCode
);
payPlatformVO
.
setEbcode
(
ebcode
);
platforms
.
add
(
payPlatformVO
);
...
...
order-application-service/src/main/java/cn/freemud/service/ExposureOrderService.java
View file @
8c2e2376
...
...
@@ -15,6 +15,7 @@ import com.freemud.api.assortment.datamanager.entity.db.AssortmentOpenPlatformIa
import
com.freemud.application.sdk.api.ordercenter.adapter.OrderCenterSdkAdapter
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
/**
* @author Clover.z
...
...
@@ -68,7 +69,7 @@ public class ExposureOrderService {
if
(
wxAppStore
==
null
)
{
wxAppStore
=
new
AssortmentOpenPlatformIappWxappStore
();
}
vo
.
setPayCode
(
wxAppStore
.
getClientCode
());
vo
.
setPayCode
(
StringUtils
.
isEmpty
(
wxAppStore
.
getClientCode
())
?
"9"
:
wxAppStore
.
getClientCode
());
vo
.
setStoreId
(
wxAppStore
.
getStoreId
());
return
vo
;
}
...
...
order-application-service/src/main/java/cn/freemud/service/impl/PayServiceImpl.java
View file @
8c2e2376
...
...
@@ -688,15 +688,15 @@ public class PayServiceImpl {
,
String
channel
,
String
storeId
)
{
String
eb
Code
=
this
.
getPayCodeByChanel
(
paymentRequest
.
getWxAppId
(),
channel
,
storeId
);
String
client
Code
=
this
.
getPayCodeByChanel
(
paymentRequest
.
getWxAppId
(),
channel
,
storeId
);
OrderPayResponse
orderPayResponse
=
new
OrderPayResponse
();
if
(
StringUtils
.
isBlank
(
eb
Code
))
{
if
(
StringUtils
.
isBlank
(
client
Code
))
{
orderPayResponse
.
setMsg
(
"请先联系相关人员配置商户对应的支付渠道"
);
return
orderPayResponse
;
}
CombPayRequest
combPayRequest
=
orderAdapter
.
convent2CombPayOrderRequest
(
cardNo
,
orderBean
,
paymentRequest
,
partnerPayOvertime
,
eb
Code
,
channel
,
totalAmount
);
CombPayRequest
combPayRequest
=
orderAdapter
.
convent2CombPayOrderRequest
(
cardNo
,
orderBean
,
paymentRequest
,
partnerPayOvertime
,
client
Code
,
channel
,
totalAmount
);
CombPayResponse
combPayResponse
=
comPayClient
.
combPay
(
combPayRequest
,
combPayRequest
.
getPartner_id
());
if
(
combPayResponse
==
null
||
!
ResponseCodeConstant
.
PAYMENT_RESPONSE_SUCCESS
.
equals
(
combPayResponse
.
getCode
()))
{
orderPayResponse
.
setMsg
(
combPayResponse
!=
null
?
"支付:"
+
combPayResponse
.
getMsg
()
:
"混合支付忙不过来啦,请稍后再试"
);
...
...
@@ -1141,7 +1141,7 @@ public class PayServiceImpl {
if
(
wxAppStore
!=
null
&&
StringUtils
.
isNotBlank
(
wxAppStore
.
getClientCode
()))
{
return
wxAppStore
.
getClientCode
();
}
return
""
;
return
"
9
"
;
}
/**
...
...
@@ -1155,7 +1155,8 @@ public class PayServiceImpl {
if
(
wxAppStore
!=
null
&&
StringUtils
.
isNotBlank
(
wxAppStore
.
getClientCode
()))
{
return
wxAppStore
.
getClientCode
();
}
return
""
;
//配合预支付接口迁移非码付,查不到配置返回 9
return
"9"
;
}
public
String
getPayCodeByCondition
(
String
wxAppid
,
String
storeId
,
String
channel
)
{
...
...
@@ -1544,15 +1545,15 @@ public class PayServiceImpl {
// 统一走多卡支付Ka2.0.76-0427-0504
String
partnerPayOvertime
=
this
.
getPartnerPayOvertime
(
orderBean
.
getCompanyId
());
String
storeId
=
orderBean
.
getShopId
();
String
eb
Code
=
this
.
getPayCodeByChanel
(
paymentRequest
.
getWxAppId
(),
channel
,
storeId
);
String
client
Code
=
this
.
getPayCodeByChanel
(
paymentRequest
.
getWxAppId
(),
channel
,
storeId
);
OrderPayResponse
orderPayResponse
=
new
OrderPayResponse
();
if
(
StringUtils
.
isBlank
(
eb
Code
))
{
if
(
StringUtils
.
isBlank
(
client
Code
))
{
orderPayResponse
.
setMsg
(
"请先联系相关人员配置商户对应的支付渠道"
);
return
orderPayResponse
;
}
MultiPayRequest
combPayRequest
=
orderAdapter
.
convent2MultiPayOrderRequest
(
cardNos
,
orderBean
,
paymentRequest
,
partnerPayOvertime
,
eb
Code
,
channel
,
totalAmount
);
MultiPayRequest
combPayRequest
=
orderAdapter
.
convent2MultiPayOrderRequest
(
cardNos
,
orderBean
,
paymentRequest
,
partnerPayOvertime
,
client
Code
,
channel
,
totalAmount
);
MultiPayResponse
multiPayResponse
=
comPayClient
.
multiPay
(
combPayRequest
,
combPayRequest
.
getPartner_id
());
if
(
multiPayResponse
==
null
||
!
ResponseCodeConstant
.
PAYMENT_RESPONSE_SUCCESS
.
equals
(
multiPayResponse
.
getCode
()))
{
orderPayResponse
.
setMsg
(
multiPayResponse
!=
null
?
"支付:"
+
multiPayResponse
.
getMsg
()
:
"混合支付忙不过来啦,请稍后再试"
);
...
...
order-application-service/src/main/java/cn/freemud/service/impl/PointsMallOrderServiceImpl.java
View file @
8c2e2376
...
...
@@ -195,7 +195,7 @@ public class PointsMallOrderServiceImpl implements PointsMallOrderService {
//线上现金支付,创建预支付订单,唤起支付
com
.
freemud
.
application
.
sdk
.
api
.
base
.
BaseResponse
<
UnifiedPayResponseDto
>
response
=
null
;
if
(!
Objects
.
equals
(
ExchangeTypeEnum
.
TYPE_1
.
getCode
(),
exchangeType
)
&&
cashPrice
!=
null
&&
cashPrice
>
0
)
{
Long
payClientCode
=
Long
.
parseLong
(
wxAppStore
.
getClientCode
());
Long
payClientCode
=
StringUtils
.
isEmpty
(
wxAppStore
.
getClientCode
())?
9L
:
Long
.
parseLong
(
wxAppStore
.
getClientCode
());
UnifiedOrderRequestDto
requestDto
=
pointsMallOrderAdapter
.
convert2UnifiedOrderRequestDto
(
result
,
openId
,
cashPrice
,
payClientCode
,
reverseNotifyiDcUrl
,
getPartnerPayOvertime
(
partnerId
));
response
=
payService
.
unifiedOrder
(
requestDto
);
...
...
order-application-service/src/main/java/cn/freemud/service/impl/SellCouponOrderServiceImpl.java
View file @
8c2e2376
...
...
@@ -209,7 +209,7 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
String
skuId
=
createOrderVo
.
getProducts
().
get
(
0
).
getSkuId
();
//10-抖音卖券门店
AssortmentOpenPlatformIappWxappStore
wxAppStore
=
payService
.
getIappWxappStoreInfo
(
wxAppId
,
AggregationTypeEnum
.
TYPE_10
.
getCode
());
if
((
wxAppStore
==
null
||
wxAppStore
.
getClientCode
()
==
null
))
{
if
((
wxAppStore
==
null
))
{
return
ResponseUtil
.
error
(
ResponseCodeConstant
.
RESPONSE_ERROR_STR
,
"支付门店未配置"
);
}
String
storeId
=
wxAppStore
.
getStoreId
();
...
...
@@ -498,7 +498,7 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
}
else
if
(
wxAppStore
==
null
){
wxAppStore
=
assortmentOpenPlatformIappWxappStoreManager
.
selectWxappStoreByWxAppIdAndStoreId
(
userLoginInfoDto
.
getWxAppId
(),
storeId
);
}
if
((
wxAppStore
==
null
||
wxAppStore
.
getClientCode
()
==
null
))
{
if
((
wxAppStore
==
null
))
{
return
ResponseUtil
.
error
(
ResponseCodeConstant
.
RESPONSE_ERROR_STR
,
"支付门店未配置"
);
}
createOrderRequest
.
setStoreId
(
storeId
);
...
...
@@ -509,7 +509,7 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
createOrderResponseVo
.
setOid
(
orderCode
);
//线上现金支付,创建预支付订单,唤起支付
com
.
freemud
.
application
.
sdk
.
api
.
base
.
BaseResponse
<
UnifiedPayResponseDto
>
response
=
null
;
Long
payClientCode
=
Long
.
parseLong
(
wxAppStore
.
getClientCode
());
Long
payClientCode
=
StringUtils
.
isEmpty
(
wxAppStore
.
getClientCode
())?
9L
:
Long
.
parseLong
(
wxAppStore
.
getClientCode
());
//实际支付金额
Long
cashPrice
=
createOrderRequest
.
getSettlementAmount
();
UnifiedOrderRequestDto
requestDto
=
checkOrder
.
convert2UnifiedOrderRequestDto
(
result
,
openId
,
cashPrice
,
payClientCode
,
reverseNotifyiDcUrl
,
getPartnerPayOvertime
(
partnerId
));
...
...
order-application-service/src/main/java/cn/freemud/service/universal/UniversalOrderService.java
View file @
8c2e2376
...
...
@@ -994,19 +994,19 @@ public abstract class UniversalOrderService {
* @param storeId
* @return
*/
private
String
getPayCodeByChanel
(
String
wxAppid
,
String
channel
,
String
storeId
)
{
if
(
StringUtils
.
isBlank
(
channel
))
return
""
;
PayChannelType
byIndex
=
PayChannelType
.
getByIndex
(
Byte
.
parseByte
(
channel
));
if
(
byIndex
.
getEbcode
()
==
null
)
return
""
;
AssortmentOpenPlatformIappWxappStore
wxAppStore
=
assortmentOpenPlatformIappWxappStoreManager
.
selectWxappStoreByWxAppIdAndStoreId
(
wxAppid
,
storeId
,
byIndex
.
getEbcode
());
if
(
wxAppStore
!=
null
&&
StringUtils
.
isNotBlank
(
wxAppStore
.
getClientCode
()))
{
return
wxAppStore
.
getClientCode
();
}
return
"
"
;
}
//
private String getPayCodeByChanel(String wxAppid, String channel, String storeId) {
//
if (StringUtils.isBlank(channel)) return "";
//
//
PayChannelType byIndex = PayChannelType.getByIndex(Byte.parseByte(channel));
//
if (byIndex.getEbcode() == null) return "";
//
AssortmentOpenPlatformIappWxappStore wxAppStore = assortmentOpenPlatformIappWxappStoreManager.selectWxappStoreByWxAppIdAndStoreId(wxAppid
//
, storeId
//
, byIndex.getEbcode());
//
if (wxAppStore != null && StringUtils.isNotBlank(wxAppStore.getClientCode())) {
//
return wxAppStore.getClientCode();
//
}
// return "9
";
//
}
/**
* 获取混合支付是否开启
...
...
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