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
803f985b
Commit
803f985b
authored
Sep 19, 2022
by
周晓航
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/zxh/【【华莱士】储值对账功能优化】-20220913' into qa
parents
27b77a88
ac3bc32a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
59 deletions
+66
-59
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/payment/CombPayRequest.java
+18
-3
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/payment/MultiPayRequest.java
+20
-3
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+6
-53
order-application-service/src/main/java/cn/freemud/entities/dto/order/FacePayRequestDto.java
+16
-0
order-application-service/src/main/java/cn/freemud/service/impl/PayServiceImpl.java
+6
-0
No files found.
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/payment/CombPayRequest.java
View file @
803f985b
...
...
@@ -61,15 +61,15 @@ public class CombPayRequest {
/**
* 商家POS机编号(可以使用固定值,扫码付必传)
*/
private
String
station_id
=
"1"
;
;
private
String
station_id
=
"1"
;
private
String
appId
;
private
String
payCode
;
private
String
payTimeOutTime
;
private
String
ebCode
;
private
String
cardCode
;
private
Boolean
disable_service_goods_tag
=
false
;
private
String
request_source
=
"V1"
;
private
String
ver
=
"10"
;
private
String
request_source
=
"V1"
;
private
String
ver
=
"10"
;
private
String
storeName
;
private
Long
merchantDiscount
;
...
...
@@ -87,4 +87,19 @@ public class CombPayRequest {
* 支付类型编码 TWX:微信 TZFB:支付宝
*/
private
String
payTypeCode
;
/**
* 订单号
*/
private
String
orderId
;
/**
* 手机号
*/
private
String
mobile
;
/**
* 会员编号
*/
private
String
memberId
;
}
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/payment/MultiPayRequest.java
View file @
803f985b
...
...
@@ -61,14 +61,15 @@ public class MultiPayRequest {
/**
* 商家POS机编号(可以使用固定值,扫码付必传)
*/
private
String
station_id
=
"1"
;;
private
String
station_id
=
"1"
;
;
private
String
appId
;
private
String
payCode
;
private
String
payTimeOutTime
;
private
String
ebCode
;
private
Boolean
disable_service_goods_tag
=
false
;
private
String
request_source
=
"V1"
;
private
String
ver
=
"10"
;
private
String
request_source
=
"V1"
;
private
String
ver
=
"10"
;
private
String
storeName
;
private
Long
merchantDiscount
;
...
...
@@ -89,4 +90,20 @@ public class MultiPayRequest {
* 支付类型编码 TWX:微信 TZFB:支付宝
*/
private
String
payTypeCode
;
/**
* 订单号
*/
private
String
orderId
;
/**
* 手机号
*/
private
String
mobile
;
/**
* 会员编号
*/
private
String
memberId
;
}
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
803f985b
...
...
@@ -36,10 +36,7 @@ import cn.freemud.interceptor.ServiceException;
import
cn.freemud.management.entities.dto.request.BatchOrderRefundV2Request
;
import
cn.freemud.management.entities.dto.request.pay.PayRefundRequestDto
;
import
cn.freemud.redis.RedisCache
;
import
cn.freemud.utils.AppLogUtil
;
import
cn.freemud.utils.BarcodeUtil
;
import
cn.freemud.utils.QrCodeUtil
;
import
cn.freemud.utils.WebUtil
;
import
cn.freemud.utils.*
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -3442,6 +3439,9 @@ public class OrderAdapter {
,
String
channel
,
Integer
totalAmount
)
{
CombPayRequest
orderPayDto
=
new
CombPayRequest
();
orderPayDto
.
setOrderId
(
orderBean
.
getOid
());
orderPayDto
.
setMobile
(
orderBean
.
getPhone
());
orderPayDto
.
setMemberId
(
orderBean
.
getUserId
());
orderPayDto
.
setEbCode
(
paymentRequest
.
getPayCode
());
orderPayDto
.
setPartner_id
(
orderBean
.
getCompanyId
());
orderPayDto
.
setBody
(
paymentRequest
.
getPrincipalName
());
...
...
@@ -4083,57 +4083,10 @@ public class OrderAdapter {
,
String
clientCode
,
String
channel
,
Integer
totalAmount
)
{
CombPayRequest
combPayRequest
=
this
.
convent2CombPayOrderRequest
(
null
,
orderBean
,
paymentRequest
,
partnerPayOvertime
,
clientCode
,
channel
,
totalAmount
);
MultiPayRequest
orderPayDto
=
new
MultiPayRequest
();
orderPayDto
.
setEbCode
(
paymentRequest
.
getPayCode
());
orderPayDto
.
setPartner_id
(
orderBean
.
getCompanyId
());
orderPayDto
.
setBody
(
paymentRequest
.
getPrincipalName
());
orderPayDto
.
setNotify_url
(
paymentRequest
.
getReverseNotifyiDcUrl
());
orderPayDto
.
setStore_id
(
orderBean
.
getShopId
());
orderPayDto
.
setOpen_id
(
paymentRequest
.
getOpenId
());
String
businessDate
=
com
.
freemud
.
application
.
sdk
.
api
.
util
.
DateUtil
.
convert2String
(
new
Date
(),
"yyyyMMdd"
);
orderPayDto
.
setBusiness_date
(
businessDate
);
orderPayDto
.
setAmount
(
totalAmount
.
longValue
());
orderPayDto
.
setVip_amount
(
0L
);
orderPayDto
.
setAppId
(
paymentRequest
.
getWxAppId
());
orderPayDto
.
setPayCode
(
paymentRequest
.
getPayCode
());
orderPayDto
.
setVer
(
"V1"
);
orderPayDto
.
setStoreName
(
orderBean
.
getShopName
());
orderPayDto
.
setPayTimeOutTime
(
StringUtils
.
defaultIfBlank
(
partnerPayOvertime
,
"30"
));
List
<
ProductVO
>
productVOS
=
new
ArrayList
<
ProductVO
>();
if
(
CollectionUtils
.
isNotEmpty
(
orderBean
.
getProductList
()))
{
for
(
ProductBeanV1
product
:
orderBean
.
getProductList
())
{
ProductVO
productBean
=
new
ProductVO
();
productBean
.
setId
(
product
.
getProductId
());
productBean
.
setQuantity
(
product
.
getNumber
());
productBean
.
setSeq
(
product
.
getSequence
());
productBean
.
setSalesType
(
"NORMAL"
);
productBean
.
setPrice
(
product
.
getPrice
());
productBean
.
setName
(
product
.
getProductName
());
productVOS
.
add
(
productBean
);
}
}
orderPayDto
.
setMerchantDiscount
(
orderBean
.
getOriginalAmount
().
longValue
()
-
orderBean
.
getAmount
());
orderPayDto
.
setProducts
(
productVOS
);
List
<
PayPlatformVO
>
platforms
=
new
ArrayList
<>();
PayPlatformVO
payPlatformVO
=
new
PayPlatformVO
();
payPlatformVO
.
setClientCode
(
PayChannelType
.
SVC
.
getEbcode
());
payPlatformVO
.
setEbcode
(
PayChannelType
.
SVC
.
getEbcode
());
payPlatformVO
.
setAmount
(
0L
);
platforms
.
add
(
payPlatformVO
);
String
ebcode
=
PayChannelType
.
getByIndex
(
Byte
.
parseByte
(
channel
)).
getEbcode
();
payPlatformVO
=
new
PayPlatformVO
();
payPlatformVO
.
setAmount
(
0L
);
payPlatformVO
.
setClientCode
(
clientCode
);
payPlatformVO
.
setEbcode
(
ebcode
);
platforms
.
add
(
payPlatformVO
);
orderPayDto
.
setPlatforms
(
platforms
);
orderPayDto
.
setOut_order_no
(
orderBean
.
getOid
());
BeanUtil
.
convertBean
(
combPayRequest
,
orderPayDto
);
orderPayDto
.
setCardItems
(
cardCodes
);
//多卡支付
orderPayDto
.
setApplicationType
(
getPayApplicationType
(
orderBean
.
getOrderClient
()));
orderPayDto
.
setSubAppid
(
orderBean
.
getAppId
());
orderPayDto
.
setPayTypeCode
(
convertPayTypeCode
(
orderBean
.
getOrderClient
()));
return
orderPayDto
;
}
...
...
order-application-service/src/main/java/cn/freemud/entities/dto/order/FacePayRequestDto.java
View file @
803f985b
...
...
@@ -44,4 +44,20 @@ public class FacePayRequestDto {
private
List
<
PayProductDto
>
products
;
/**
* 订单号
*/
private
String
orderId
;
/**
* 手机号
*/
private
String
mobile
;
/**
* 会员编号
*/
private
String
memberId
;
}
order-application-service/src/main/java/cn/freemud/service/impl/PayServiceImpl.java
View file @
803f985b
...
...
@@ -515,6 +515,9 @@ public class PayServiceImpl {
request
.
setOperatorId
(
"2"
);
request
.
setVer
(
"2"
);
request
.
setMerchantDiscount
(
orderBean
.
getOriginalAmount
().
longValue
()
-
orderBean
.
getAmount
());
request
.
setOrderId
(
orderBean
.
getOid
());
request
.
setMobile
(
orderBean
.
getPhone
());
request
.
setMemberId
(
orderBean
.
getUserId
());
com
.
freemud
.
application
.
sdk
.
api
.
base
.
BaseResponse
<
UnifiedPayResponseDto
>
responseBase
=
paymentNewClient
.
codePay
(
request
);
if
(
responseBase
==
null
||
!
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
.
equals
(
responseBase
.
getCode
())
||
responseBase
.
getData
()
==
null
)
{
// 需要把2种特殊情况抛给用户
...
...
@@ -797,6 +800,9 @@ public class PayServiceImpl {
request
.
setVer
(
"2"
);
request
.
setMerchantDiscount
(
orderBean
.
getOriginalAmount
().
longValue
()
-
orderBean
.
getAmount
());
request
.
setApplicationType
(
orderAdapter
.
getPayApplicationType
(
orderBean
.
getOrderClient
()));
request
.
setOrderId
(
orderBean
.
getOid
());
request
.
setMobile
(
orderBean
.
getPhone
());
request
.
setMemberId
(
orderBean
.
getUserId
());
SVCCardAmountRequestDto
svcRequest
=
new
SVCCardAmountRequestDto
();
svcRequest
.
setPartnerId
(
partnerId
);
svcRequest
.
setCardCodes
(
Arrays
.
asList
(
cardCode
));
...
...
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