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
7d7b580c
Commit
7d7b580c
authored
Feb 11, 2022
by
程飞祥
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
96a6a718
bcd16871
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
95 additions
and
0 deletions
+95
-0
order-application-service/src/main/java/cn/freemud/controller/ExposureOrderController.java
+65
-0
order-application-service/src/main/java/cn/freemud/entities/vo/PutDeadLetterVo.java
+17
-0
order-application-service/src/main/java/cn/freemud/service/impl/PayServiceImpl.java
+12
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
+1
-0
No files found.
order-application-service/src/main/java/cn/freemud/controller/ExposureOrderController.java
0 → 100644
View file @
7d7b580c
package
cn
.
freemud
.
controller
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.entities.vo.PutDeadLetterVo
;
import
cn.freemud.service.impl.PayServiceImpl
;
import
cn.freemud.utils.ResponseUtil
;
import
com.freemud.application.sdk.api.log.ApiAnnotation
;
import
com.freemud.application.sdk.api.log.LogParams
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
/**
* 暴露订单相关的业务接口,提供给applet项目
*/
@RestController
@RequestMapping
(
"/exposure"
)
public
class
ExposureOrderController
{
@Autowired
private
PayServiceImpl
payService
;
/**
* 创建支付单,查询支付配置
*/
@ApiAnnotation
(
logMessage
=
"创建支付单,查询支付配置"
)
@GetMapping
(
"/getPayConfig"
)
public
BaseResponse
<
String
>
getPayConfig
(
@LogParams
@RequestParam
(
"partnerId"
)
String
partnerId
,
@RequestParam
(
"appId"
)
String
appId
)
{
String
payConfig
=
payService
.
getPayConfig
(
partnerId
,
appId
);
return
ResponseUtil
.
success
(
payConfig
);
}
/**
* 创建支付单,查询超时时间
*/
@ApiAnnotation
(
logMessage
=
"创建支付单,查询超时时间"
)
@GetMapping
(
"/getPayTimeout"
)
public
BaseResponse
<
String
>
getPayTimeout
(
@LogParams
@RequestParam
(
"partnerId"
)
String
partnerId
)
{
String
partnerPayOvertime
=
payService
.
getPartnerPayOvertime
(
partnerId
);
return
ResponseUtil
.
success
(
partnerPayOvertime
);
}
/**
* 创建支付单,查询payCode
*/
@ApiAnnotation
(
logMessage
=
"创建支付单,查询payCode"
)
@GetMapping
(
"/getPayCodeByChanel"
)
public
BaseResponse
<
String
>
getPayCodeByChanel
(
@LogParams
@RequestParam
(
"appId"
)
String
appId
,
@RequestParam
(
"storeId"
)
String
storeId
,
@RequestParam
(
value
=
"channel"
,
required
=
false
)
String
channel
)
{
String
payCodeByCondition
=
payService
.
getPayCodeByCondition
(
appId
,
storeId
,
channel
);
return
ResponseUtil
.
success
(
payCodeByCondition
);
}
/**
* 创建订单,死信队列
*/
@ApiAnnotation
(
logMessage
=
"创建订单,死信队列"
)
@PostMapping
(
"/deadLetterQueue"
)
public
BaseResponse
deadLetterQueue
(
@LogParams
@RequestBody
PutDeadLetterVo
putDeadLetterVo
)
{
payService
.
putDelMq
(
putDeadLetterVo
.
getPartnerId
(),
putDeadLetterVo
.
getStoreId
(),
putDeadLetterVo
.
getFmId
(),
putDeadLetterVo
.
getOrderId
(),
putDeadLetterVo
.
getPayChanelType
());
return
ResponseUtil
.
success
();
}
}
order-application-service/src/main/java/cn/freemud/entities/vo/PutDeadLetterVo.java
0 → 100644
View file @
7d7b580c
package
cn
.
freemud
.
entities
.
vo
;
import
lombok.Data
;
@Data
public
class
PutDeadLetterVo
{
private
String
partnerId
;
private
String
storeId
;
private
String
fmId
;
private
String
orderId
;
private
Integer
payChanelType
;
}
order-application-service/src/main/java/cn/freemud/service/impl/PayServiceImpl.java
View file @
7d7b580c
...
...
@@ -472,6 +472,10 @@ public class PayServiceImpl {
return
principalName
;
}
public
String
getPayConfig
(
String
partnerId
,
String
appId
)
{
return
this
.
getPaymentPrincipalName
(
partnerId
,
appId
);
}
/**
* 电子风味卡支付
...
...
@@ -1140,6 +1144,14 @@ public class PayServiceImpl {
return
""
;
}
public
String
getPayCodeByCondition
(
String
wxAppid
,
String
storeId
,
String
channel
)
{
if
(
channel
!=
null
)
{
return
this
.
getPayCodeByChanel
(
wxAppid
,
channel
,
storeId
);
}
return
this
.
getPayCodeByChanel
(
wxAppid
,
storeId
);
}
/**
* 获取混合支付是否开启
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
View file @
7d7b580c
...
...
@@ -2376,6 +2376,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
if
(
Objects
.
isNull
(
availableStocks
))
{
return
;
}
// 商品服务 返回null 或者 qty=null 表示不限制库存
List
<
GetProductStockResponseDto
.
DataBean
>
result
=
availableStocks
.
getResult
();
if
(
CollectionUtils
.
isEmpty
(
result
)
||
Objects
.
isNull
(
result
.
get
(
0
).
getQty
()))
{
return
;
...
...
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