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
c86c7c67
Commit
c86c7c67
authored
Sep 15, 2020
by
zhiheng.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加商户号 ,灰度使用
parent
bf63ad93
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
252 additions
and
2 deletions
+252
-2
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/adapter/OrderSdkAdapter.java
+1
-0
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/order/BaseCreateOrderRequest.java
+2
-0
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/payment/PayPlatformVO.java
+10
-0
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/payment/ProductVO.java
+16
-0
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/payment/UnifiedOrderApplicationRequest.java
+33
-0
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+0
-0
order-application-service/src/main/java/cn/freemud/entities/dto/UnifiedOrderApiResponse.java
+82
-0
order-application-service/src/main/java/cn/freemud/entities/dto/order/CreatePrepayRequestDto.java
+5
-0
order-application-service/src/main/java/cn/freemud/entities/vo/CreateOrderVo.java
+5
-0
order-application-service/src/main/java/cn/freemud/enums/PayChannel.java
+2
-1
order-application-service/src/main/java/cn/freemud/enums/PayChannelType.java
+28
-0
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
+0
-0
order-application-service/src/main/java/cn/freemud/service/thirdparty/PaymentApplicationClient.java
+33
-0
ordercenter-sdk/src/main/java/com/freemud/application/sdk/api/ordercenter/request/create/CreateOrderRequest.java
+1
-0
ordercenter-sdk/src/main/java/com/freemud/application/sdk/api/ordercenter/request/create/OrderPayItemCreateReq.java
+32
-0
ordercenter-sdk/src/main/java/com/freemud/application/sdk/api/ordercenter/response/orderInfo/OrderInfoReqs.java
+2
-1
No files found.
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/adapter/OrderSdkAdapter.java
View file @
c86c7c67
...
...
@@ -262,6 +262,7 @@ public class OrderSdkAdapter {
//订单重量
Double
orderWeight
=
sumOrderWeight
(
requestVO
.
getProducts
());
request
.
setWeight
(
orderWeight
);
request
.
setOrderPayItemCreateReqList
(
requestVO
.
getOrderPayItemCreateReqList
());
return
request
;
}
...
...
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/order/BaseCreateOrderRequest.java
View file @
c86c7c67
...
...
@@ -2,6 +2,7 @@ package com.freemud.sdk.api.assortment.order.request.order;
import
com.freemud.application.sdk.api.ordercenter.enums.OrderClientType
;
import
com.freemud.application.sdk.api.ordercenter.request.OrderExtendedReq
;
import
com.freemud.application.sdk.api.ordercenter.request.create.OrderPayItemCreateReq
;
import
com.freemud.application.sdk.api.ordercenter.request.create.OrderTaskReq
;
import
com.freemud.application.sdk.api.promotioncenter.request.promotion.ActivityUpdateStockRequest
;
import
com.freemud.sdk.api.assortment.order.config.BaseConfig
;
...
...
@@ -207,5 +208,6 @@ public class BaseCreateOrderRequest extends BaseConfig {
*/
private
String
ruleId
;
}
private
List
<
OrderPayItemCreateReq
>
orderPayItemCreateReqList
;
}
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/payment/PayPlatformVO.java
0 → 100644
View file @
c86c7c67
package
com
.
freemud
.
sdk
.
api
.
assortment
.
order
.
request
.
payment
;
import
lombok.Data
;
@Data
public
class
PayPlatformVO
{
private
String
ebcode
;
private
Long
amount
;
}
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/payment/ProductVO.java
0 → 100644
View file @
c86c7c67
package
com
.
freemud
.
sdk
.
api
.
assortment
.
order
.
request
.
payment
;
import
lombok.Data
;
import
java.math.BigDecimal
;
@Data
public
class
ProductVO
{
private
String
id
;
private
BigDecimal
quantity
;
private
Integer
seq
;
private
Long
price
;
private
String
name
;
private
String
salesType
=
"NORMAL"
;
}
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/payment/UnifiedOrderApplicationRequest.java
0 → 100644
View file @
c86c7c67
package
com
.
freemud
.
sdk
.
api
.
assortment
.
order
.
request
.
payment
;
import
com.freemud.application.sdk.api.log.ApiAnnotation
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
UnifiedOrderApplicationRequest
{
private
List
<
PayPlatformVO
>
platforms
;
private
String
openId
;
private
String
notifyUrl
;
private
Integer
invoiceFlag
;
private
Long
amount
;
private
Long
vipAmount
;
private
Long
undisAmount
;
private
String
body
;
private
String
outOrderNo
;
private
List
<
ProductVO
>
products
;
private
String
goodsTag
;
private
String
partnerId
;
private
String
storeId
;
private
String
businessDate
;
private
String
stationId
=
"1"
;
private
String
operatorId
=
"1"
;
private
String
transId
;
private
String
foodOrderType
;
private
String
appId
;
private
String
payCode
;
private
String
payTimeOutTime
;
private
String
ebCode
;
}
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
c86c7c67
This diff is collapsed.
Click to expand it.
order-application-service/src/main/java/cn/freemud/entities/dto/UnifiedOrderApiResponse.java
0 → 100644
View file @
c86c7c67
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @Title: OrderPayResponseDto
* @Package cn.freemud.entities.dto
* @Description:
* @author: liming.guo
* @date: 2018/5/25 17:10
* @version V1.0
* @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
package
cn
.
freemud
.
entities
.
dto
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.ToString
;
@NoArgsConstructor
@Data
@ToString
public
class
UnifiedOrderApiResponse
{
private
int
code
;
@ApiModelProperty
(
value
=
"提示信息"
)
private
String
message
;
@ApiModelProperty
(
value
=
"验签可配置"
)
private
String
sign
;
@ApiModelProperty
(
value
=
"支付帐号"
)
private
String
payAccount
;
@ApiModelProperty
(
value
=
"支付渠道编号"
)
private
String
ebCode
;
@ApiModelProperty
(
value
=
"支付渠道描述"
)
private
String
platformDesc
;
@ApiModelProperty
(
value
=
"第三方支付交易序号"
)
private
String
platformTradeNo
;
@ApiModelProperty
(
value
=
"非码交易流水号"
)
private
String
fmTradeNo
;
@ApiModelProperty
(
value
=
"外部交易流水号,由上游系统生成,需保证唯一"
)
private
String
outOrderNo
;
@ApiModelProperty
(
value
=
"app_id编号(微信使用)"
)
private
String
appId
;
@ApiModelProperty
(
value
=
"商户号(微信使用)"
)
private
String
mchId
;
@ApiModelProperty
(
value
=
"包名(微信使用)"
)
private
String
_package
;
@ApiModelProperty
(
value
=
"随机字符串(微信使用)"
)
private
String
nonceStr
;
@ApiModelProperty
(
value
=
"签名(微信使用)"
)
private
String
paySign
;
@ApiModelProperty
(
value
=
"签名类型(微信使用)"
)
private
String
paySignType
;
@ApiModelProperty
(
value
=
"时间戳(微信使用)"
)
private
String
timestamp
;
@ApiModelProperty
(
value
=
"预订单编号"
)
private
String
prepayId
;
@ApiModelProperty
(
value
=
"biz_content(支付宝使用)"
)
private
String
bizContent
;
@ApiModelProperty
(
value
=
"当前预下单请求生成的二维码码串"
)
private
String
codeUrl
;
@ApiModelProperty
(
value
=
"间联单号"
)
private
String
endTransTradeNo
;
}
order-application-service/src/main/java/cn/freemud/entities/dto/order/CreatePrepayRequestDto.java
View file @
c86c7c67
...
...
@@ -2,9 +2,12 @@ package cn.freemud.entities.dto.order;
import
com.freemud.application.sdk.api.ordercenter.enums.OrderClientType
;
import
com.freemud.application.sdk.api.ordercenter.request.OrderExtInfoDto
;
import
com.freemud.application.sdk.api.ordercenter.request.create.OrderPayItemCreateReq
;
import
com.freemud.sdk.api.assortment.order.response.order.QueryOrdersResponse
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
CreatePrepayRequestDto
{
/**
...
...
@@ -61,4 +64,6 @@ public class CreatePrepayRequestDto {
private
String
transId
;
private
OrderClientType
orderClient
;
private
List
<
OrderPayItemCreateReq
>
orderPayItemCreateReqList
;
}
order-application-service/src/main/java/cn/freemud/entities/vo/CreateOrderVo.java
View file @
c86c7c67
...
...
@@ -13,6 +13,7 @@
package
cn
.
freemud
.
entities
.
vo
;
import
cn.freemud.entities.dto.UserDeliveryInfoDto
;
import
com.freemud.application.sdk.api.ordercenter.request.create.OrderPayItemCreateReq
;
import
io.swagger.annotations.ApiModelProperty
;
import
cn.freemud.entities.dto.delivery.WeixinDeliveryAddressDto
;
import
lombok.Builder
;
...
...
@@ -22,12 +23,15 @@ import org.hibernate.validator.constraints.NotEmpty;
import
javax.validation.Valid
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Pattern
;
import
java.util.ArrayList
;
import
java.util.List
;
@Data
public
class
CreateOrderVo
{
private
List
<
OrderPayItemCreateReq
>
orderPayItemCreateReqList
;
@NotEmpty
(
message
=
"sessionId 不能为空"
)
private
String
sessionId
;
...
...
@@ -303,5 +307,6 @@ public class CreateOrderVo {
* 规则ID
*/
private
String
ruleId
;
}
}
order-application-service/src/main/java/cn/freemud/enums/PayChannel.java
View file @
c86c7c67
...
...
@@ -16,7 +16,8 @@ public enum PayChannel {
SVC
(
"10102"
,
"svc卡支付"
),
ALIPAY
(
"10300"
,
"支付宝"
),
WXPAY
(
"10211"
,
"微信"
);
WXPAY
(
"10211"
,
"微信"
),
COMPAY
(
"10212"
,
"组合支付"
);
private
String
code
;
private
String
desc
;
...
...
order-application-service/src/main/java/cn/freemud/enums/PayChannelType.java
0 → 100644
View file @
c86c7c67
package
cn
.
freemud
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@Getter
@AllArgsConstructor
public
enum
PayChannelType
{
WECHAT
((
byte
)
1
,
"微信"
),
SVC
((
byte
)
2
,
"储值卡"
),
ALIPAY
((
byte
)
3
,
"支付宝"
),
COMB
((
byte
)
4
,
"混合支付"
);
private
Byte
index
;
private
String
name
;
public
static
final
String
API_DESC
=
"订单支付渠道类型 1:微信 2:储值卡 3:支付宝 4:混合支付"
;
public
static
PayChannelType
getByIndex
(
byte
index
)
{
for
(
PayChannelType
payType
:
values
())
{
if
(
payType
.
getIndex
().
equals
(
index
))
{
return
payType
;
}
}
return
null
;
}
}
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
View file @
c86c7c67
This diff is collapsed.
Click to expand it.
order-application-service/src/main/java/cn/freemud/service/thirdparty/PaymentApplicationClient.java
0 → 100644
View file @
c86c7c67
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @Title: PaymentClient
* @Package cn.freemud.service.thirdparty
* @Description: 支付服务
* @author: liming.guo
* @date: 2018/5/12519:24
* @version V1.0
* @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
package
cn
.
freemud
.
service
.
thirdparty
;
import
cn.freemud.entities.dto.*
;
import
com.freemud.sdk.api.assortment.order.request.payment.UnifiedOrderApplicationRequest
;
import
org.springframework.cloud.netflix.feign.FeignClient
;
import
org.springframework.messaging.handler.annotation.Header
;
import
org.springframework.web.bind.annotation.*
;
@FeignClient
(
name
=
"payment-center-application-api"
,
url
=
"${saas.paymentcenter.application.api.feign.url}"
)
@RequestMapping
(
produces
=
{
"application/json;charset=UTF-8"
})
public
interface
PaymentApplicationClient
{
/**
* 统一下单
*/
@PostMapping
(
"/payment/application/unifiedOrder"
)
UnifiedOrderApiResponse
unifiedOrder
(
@RequestBody
UnifiedOrderApplicationRequest
unifiedOrderApplicationRequest
,
@RequestHeader
(
"partnerId"
)
String
partnerId
);
}
ordercenter-sdk/src/main/java/com/freemud/application/sdk/api/ordercenter/request/create/CreateOrderRequest.java
View file @
c86c7c67
...
...
@@ -215,4 +215,5 @@ public class CreateOrderRequest extends BaseRequest {
private
Byte
payChannelType
;
private
List
<
OrderPayItemCreateReq
>
orderPayItemCreateReqList
;
}
ordercenter-sdk/src/main/java/com/freemud/application/sdk/api/ordercenter/request/create/OrderPayItemCreateReq.java
0 → 100644
View file @
c86c7c67
package
com
.
freemud
.
application
.
sdk
.
api
.
ordercenter
.
request
.
create
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.ToString
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
public
class
OrderPayItemCreateReq
{
private
Long
id
;
private
Long
orderId
;
private
String
orderCode
;
private
String
partnerId
;
private
String
storeId
;
private
String
payChannelType
;
private
String
payChannelName
;
private
String
operator
;
private
BigDecimal
payAmount
;
}
\ No newline at end of file
ordercenter-sdk/src/main/java/com/freemud/application/sdk/api/ordercenter/response/orderInfo/OrderInfoReqs.java
View file @
c86c7c67
...
...
@@ -271,4 +271,4 @@ public class OrderInfoReqs {
//支付渠道类型
private
String
payChannelType
;
}
}
\ No newline at end of file
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