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
8ed39cbe
Commit
8ed39cbe
authored
Apr 26, 2022
by
查志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v1.0.14 change
parent
39c32f72
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
31 deletions
+40
-31
order-application-service/src/main/java/cn/freemud/controller/ExposureOrderController.java
+7
-26
order-application-service/src/main/java/cn/freemud/entities/vo/GetPayConfigVo.java
+5
-0
order-application-service/src/main/java/cn/freemud/entities/vo/order/PayConfigVo.java
+27
-0
order-application-service/src/main/java/cn/freemud/service/impl/PayServiceImpl.java
+1
-5
No files found.
order-application-service/src/main/java/cn/freemud/controller/ExposureOrderController.java
View file @
8ed39cbe
...
...
@@ -2,10 +2,10 @@ package cn.freemud.controller;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.entities.vo.*
;
import
cn.freemud.entities.vo.order.PayConfigVo
;
import
cn.freemud.enums.OrderTackCodeFactory
;
import
cn.freemud.enums.TakeCodeOrderType
;
import
cn.freemud.manager.OrderTackCodeManager
;
import
cn.freemud.service.business.OrderBusinessService
;
import
cn.freemud.service.business.impl.OrderBusinessServiceImpl
;
import
cn.freemud.service.impl.OrderQueueService
;
import
cn.freemud.service.impl.OrderServiceImpl
;
...
...
@@ -14,7 +14,6 @@ import cn.freemud.utils.ResponseUtil;
import
com.freemud.application.sdk.api.log.ApiAnnotation
;
import
com.freemud.application.sdk.api.log.LogParams
;
import
com.freemud.application.sdk.api.ordercenter.adapter.OrderCenterSdkAdapter
;
import
com.freemud.sdk.api.assortment.message.enums.OrderType
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -48,30 +47,12 @@ public class ExposureOrderController {
*/
@ApiAnnotation
(
logMessage
=
"创建支付单,查询支付配置"
)
@PostMapping
(
"/getPayConfig"
)
public
BaseResponse
<
String
>
getPayConfig
(
@Validated
@LogParams
@RequestBody
GetPayConfigVo
getPayConfigVo
)
{
String
payConfig
=
payService
.
getPayConfig
(
getPayConfigVo
.
getPartnerId
(),
getPayConfigVo
.
getAppId
());
return
ResponseUtil
.
success
(
payConfig
);
}
/**
* 创建支付单,查询超时时间
*/
@ApiAnnotation
(
logMessage
=
"创建支付单,查询超时时间"
)
@PostMapping
(
"/getPayTimeout"
)
public
BaseResponse
<
String
>
getPayTimeout
(
@Validated
@LogParams
@RequestBody
GetPayTimeoutVo
getPayTimeoutVo
)
{
String
partnerPayOvertime
=
payService
.
getPartnerPayOvertime
(
getPayTimeoutVo
.
getPartnerId
());
return
ResponseUtil
.
success
(
partnerPayOvertime
);
}
/**
* 创建支付单,查询payCode
*/
@ApiAnnotation
(
logMessage
=
"创建支付单,查询payCode"
)
@PostMapping
(
"/getPayCodeByChanel"
)
public
BaseResponse
<
String
>
getPayCodeByChanel
(
@Validated
@LogParams
@RequestBody
GetPayCodeByChanelVo
getPayCodeByChanelVo
)
{
String
payCodeByCondition
=
payService
.
getPayCodeByCondition
(
getPayCodeByChanelVo
.
getAppId
(),
getPayCodeByChanelVo
.
getStoreId
(),
getPayCodeByChanelVo
.
getChannel
());
return
ResponseUtil
.
success
(
payCodeByCondition
);
public
BaseResponse
<
PayConfigVo
>
getPayConfig
(
@Validated
@LogParams
@RequestBody
GetPayConfigVo
req
)
{
PayConfigVo
vo
=
new
PayConfigVo
();
vo
.
setPrincipalName
(
payService
.
getPaymentPrincipalName
(
req
.
getPartnerId
(),
req
.
getAppId
()));
vo
.
setPayTimeOut
(
payService
.
getPartnerPayOvertime
(
req
.
getPartnerId
()));
vo
.
setPayCode
(
payService
.
getPayCodeByCondition
(
req
.
getAppId
(),
req
.
getStoreId
(),
req
.
getChannel
()));
return
ResponseUtil
.
success
(
vo
);
}
/**
...
...
order-application-service/src/main/java/cn/freemud/entities/vo/GetPayConfigVo.java
View file @
8ed39cbe
...
...
@@ -10,6 +10,11 @@ public class GetPayConfigVo {
@NotBlank
(
message
=
"商户号不能为空"
)
private
String
partnerId
;
@NotBlank
(
message
=
"门店id不能为空"
)
private
String
storeId
;
@NotBlank
(
message
=
"小程序id不能为空"
)
private
String
appId
;
private
String
channel
;
}
order-application-service/src/main/java/cn/freemud/entities/vo/order/PayConfigVo.java
0 → 100644
View file @
8ed39cbe
package
cn
.
freemud
.
entities
.
vo
.
order
;
import
lombok.Data
;
/**
* @author Clover.z
* @version 1.0.0
* @since 1.0.0
*/
@Data
public
class
PayConfigVo
{
/**
* 商户支付主体名称
*/
private
String
principalName
;
/**
* 支付超时时间
*/
private
String
payTimeOut
;
/**
* 门店支付编号
*/
private
String
payCode
;
}
order-application-service/src/main/java/cn/freemud/service/impl/PayServiceImpl.java
View file @
8ed39cbe
...
...
@@ -449,7 +449,7 @@ public class PayServiceImpl {
/**
* 查询支付配置
*/
p
rivate
String
getPaymentPrincipalName
(
String
partnerId
,
String
appId
)
{
p
ublic
String
getPaymentPrincipalName
(
String
partnerId
,
String
appId
)
{
String
redisKey
=
MessageFormat
.
format
(
OrderRedisKeyConstant
.
PARTNER_PAYMENT_PRINCIPAL_NAME
,
partnerId
);
// 先从redis中查询支付商户名称
String
principalName
=
redisCache
.
hashGet
(
redisKey
,
appId
);
...
...
@@ -473,10 +473,6 @@ public class PayServiceImpl {
return
principalName
;
}
public
String
getPayConfig
(
String
partnerId
,
String
appId
)
{
return
this
.
getPaymentPrincipalName
(
partnerId
,
appId
);
}
/**
* 电子风味卡支付
...
...
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