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
293c0fd6
Commit
293c0fd6
authored
Jul 27, 2022
by
周晓航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时新增发券补偿接口
parent
28327a74
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
283 additions
and
1 deletions
+283
-1
order-application-service/src/main/java/cn/freemud/controller/OrderController.java
+0
-0
order-application-service/src/main/java/cn/freemud/entities/vo/tempsendcoupon/CreateCouponReq.java
+148
-0
order-application-service/src/main/java/cn/freemud/entities/vo/tempsendcoupon/CreateCouponResp.java
+54
-0
order-application-service/src/main/java/cn/freemud/entities/vo/tempsendcoupon/SendCouponSourceOriginEnum.java
+53
-0
order-application-service/src/main/java/cn/freemud/entities/vo/tempsendcoupon/TempReSendCouponReq.java
+16
-0
order-application-service/src/main/java/cn/freemud/service/thirdparty/CouponOnlineClient.java
+10
-1
ordercenter-sdk/src/main/java/com/freemud/application/sdk/api/ordercenter/response/orderInfo/OrderSettlementResp.java
+2
-0
No files found.
order-application-service/src/main/java/cn/freemud/controller/OrderController.java
View file @
293c0fd6
This diff is collapsed.
Click to expand it.
order-application-service/src/main/java/cn/freemud/entities/vo/tempsendcoupon/CreateCouponReq.java
0 → 100644
View file @
293c0fd6
package
cn
.
freemud
.
entities
.
vo
.
tempsendcoupon
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
/**
* @author Clover.z
* @Date 2021/9/24
* @Desc
*/
@Data
public
class
CreateCouponReq
{
/**
* 活动编号
*/
@NotBlank
(
message
=
"券模板编号不能为空"
)
private
String
templateCode
;
/**
* 商户号
*/
@NotBlank
(
message
=
"商户编号不能为空"
)
private
Integer
partnerId
;
/**
* 渠道号(可以不传,不传就默认是开个店发码,核销后会回调会员移除卡包。如果不是开个店就要传)
*/
private
Integer
providerId
;
/**
* 会员Id
*/
private
String
memberId
;
/**
* 发券订单号
*/
@NotBlank
(
message
=
"请求流水号不能为空"
)
@Length
(
max
=
30
,
message
=
"流水号长度最大不能超过30个字符"
)
private
String
orderId
;
/**
* 券名称
*/
private
String
couponName
;
/**
* 券开始时间
*/
private
String
validStart
;
/**
* 券结束时间
*/
private
String
validEnd
;
/**
* 发券数量
*/
@NotNull
(
message
=
"发码数量必须大于0且不大于100"
)
@Min
(
value
=
1
)
@Max
(
value
=
100
)
private
Integer
num
;
/**
* 门店id
* 发券指定门店场景下使用
*/
@Length
(
max
=
50
)
private
String
storeId
;
/**
* 发券原因
*/
@Length
(
max
=
2000
)
private
String
sendReason
;
/**
* {@link com.freemud.task.order.consumer.enums.SendCouponSourceOriginEnum 发码来源类型}
*/
private
Integer
sourceOrigin
;
/**
* 发码来源类型id
*/
@Length
(
max
=
64
)
private
String
sourceOriginId
;
/**
* 促销活动编号
*/
@Length
(
max
=
32
)
private
String
promotionActivityCode
;
/**
* 三方交易流水号
*/
@Length
(
max
=
32
)
private
String
thirdTrackId
;
/**
* 是否需要显示密文code
* <p>
* 默认不显示
*/
private
Boolean
showEncode
=
false
;
/**
* 签名
* 签名sign传 "adapterV4Skip" + 渠道号providerId
* 现券码已支持不传了
*/
private
String
sign
;
/**
* 接口版本号
*/
private
Integer
ver
;
/*****************券包分账新增入参***********************/
//券包信息,不传默认不是券包
private
CouponPackageInfo
couponPackageInfo
;
@Data
public
static
class
CouponPackageInfo
{
//是否券包
private
Boolean
isCouponPackage
=
false
;
//券包配置,isCouponPackage为true时必填
private
Settings
settings
;
}
@Data
public
static
class
Settings
{
//是否分账
private
Boolean
accountDivide
;
//单价,单位:分
private
Integer
unitPrice
;
}
/*****************券包分账新增入参***********************/
}
order-application-service/src/main/java/cn/freemud/entities/vo/tempsendcoupon/CreateCouponResp.java
0 → 100644
View file @
293c0fd6
package
cn
.
freemud
.
entities
.
vo
.
tempsendcoupon
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author Clover.z
* @Date 2021/9/24
* @Desc
*/
@Data
public
class
CreateCouponResp
{
/**
* 100-成功
*/
private
Integer
statusCode
;
private
String
msg
;
private
String
ver
;
/**
* true是正常发的码,false是幂等返回的之前发的码,根据入参的orderId,相同的orderId 24小时内重复调用会返回相同的结果
*/
private
Boolean
fresh
;
/**
* 码的有效期-开始
*/
private
String
effectStart
;
/**
* 码的有效期-结束
*/
private
String
effectEnd
;
/**
* 发码返回的券信息
*/
private
List
<
Coupon
>
codes
;
@Data
public
static
class
Coupon
{
/**
* 券号
*/
private
String
code
;
/**
* 优惠券号密文
*/
private
String
encode
;
}
}
order-application-service/src/main/java/cn/freemud/entities/vo/tempsendcoupon/SendCouponSourceOriginEnum.java
0 → 100644
View file @
293c0fd6
package
cn
.
freemud
.
entities
.
vo
.
tempsendcoupon
;
/**
* 具体枚举值 找 张文凯确认 券码基础服务
*/
public
enum
SendCouponSourceOriginEnum
{
UNKNOWN
(
0
,
"未知"
),
PROMOTION
(
1
,
"促销活动发券"
),
MANUAL
(
2
,
"手动送券"
),
EXPORT
(
3
,
"批量导码"
),
PURCHASE
(
4
,
"买券"
),
SCORE_EXCHANGE
(
5
,
"积分兑换券"
),
MEMBER_BIRTHDAY_GIFT
(
6
,
"会员生日礼送券"
),
RECHARGE_VIP
(
7
,
"开通/续费 付费会员送券"
),
RECHARGE_STORED_VALUE_CARD
(
8
,
"储值卡充值送券"
),
MEMBER_LEVEL_UPGRADE
(
9
,
"会员等级升级"
),
MEMBER_POINT
(
1
,
"集点兑换券"
),
IMPORT_SCORE_EXPERIENC_CASE_UPGRADE
(
9
,
"积分经验值导入触发等级升级送券"
),
CREATE_ORDER_SEND_EXPERIENC_CASE_UPGRADE
(
9
,
"积分经验值导入触发等级升级送券"
),
SIGN_IN
(
10
,
"签到送券"
),
WEXIN_SHIPINHAO
(
11
,
"微信视频号卖券"
)
;
private
Integer
type
;
private
String
name
;
/**
* @param type 类型
* @param name 类型名称
*/
SendCouponSourceOriginEnum
(
Integer
type
,
String
name
)
{
this
.
type
=
type
;
this
.
name
=
name
;
}
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
\ No newline at end of file
order-application-service/src/main/java/cn/freemud/entities/vo/tempsendcoupon/TempReSendCouponReq.java
0 → 100644
View file @
293c0fd6
package
cn
.
freemud
.
entities
.
vo
.
tempsendcoupon
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author : xh.Z
* @email : fisherman0510@163.com
* @Date : 2022/7/27 11:20
* @description :
*/
@Data
public
class
TempReSendCouponReq
{
List
<
String
>
orderCodes
;
}
order-application-service/src/main/java/cn/freemud/service/thirdparty/CouponOnlineClient.java
View file @
293c0fd6
...
...
@@ -3,12 +3,14 @@ package cn.freemud.service.thirdparty;
//import cn.freemud.constant.IgnoreFeignLogAnnotation;
import
com.freemud.application.sdk.api.ordercenter.annotation.LogIgnoreFeign
;
import
cn.freemud.constant.ResponseCodeKeyConstant
;
import
cn.freemud.entities.dto.BatchQueryActivityInfoRequestDto
;
import
cn.freemud.entities.dto.GetCouponDetailResponseDto
;
import
cn.freemud.entities.dto.coupon.*
;
import
cn.freemud.entities.vo.tempsendcoupon.CreateCouponReq
;
import
cn.freemud.entities.vo.tempsendcoupon.CreateCouponResp
;
import
cn.freemud.interceptor.FormSupportConfig
;
import
com.freemud.application.sdk.api.ordercenter.annotation.LogIgnoreFeign
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -77,4 +79,11 @@ public interface CouponOnlineClient {
@PostMapping
(
value
=
"/coupon/standard/checkandcancel"
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
CouponResponseDTO
<
CheckAndCancelResponseDTO
>
checkandcancel
(
@RequestBody
CheckAndCancelRequest
request
);
/**
* 根据券档案发码 返回券号
* @param request
* @return
*/
@PostMapping
(
"/coupon/standard/create"
)
CreateCouponResp
createCoupon
(
CreateCouponReq
request
);
}
ordercenter-sdk/src/main/java/com/freemud/application/sdk/api/ordercenter/response/orderInfo/OrderSettlementResp.java
View file @
293c0fd6
...
...
@@ -19,6 +19,8 @@ import java.math.BigDecimal;
@Data
public
class
OrderSettlementResp
{
private
Long
id
;
/**
* 订单商品ID
*/
...
...
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