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
f56ce51a
Commit
f56ce51a
authored
Jul 27, 2022
by
周晓航
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ka-bugfix-新增接口用于补偿发券工作' into qa
parents
06a98391
293c0fd6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
289 additions
and
7 deletions
+289
-7
call-back-service/pom.xml
+1
-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/impl/OrderAdapterServiceImpl.java
+5
-5
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.
call-back-service/pom.xml
View file @
f56ce51a
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
<dependency>
<dependency>
<groupId>
com.freemud.sdk.api.assortment
</groupId>
<groupId>
com.freemud.sdk.api.assortment
</groupId>
<artifactId>
assortment-orderdistributor-sdk
</artifactId>
<artifactId>
assortment-orderdistributor-sdk
</artifactId>
<version>
3.6.
0
.RELEASE
</version>
<version>
3.6.
1
.RELEASE
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.freemud.sdk.api.assortment
</groupId>
<groupId>
com.freemud.sdk.api.assortment
</groupId>
...
...
order-application-service/src/main/java/cn/freemud/controller/OrderController.java
View file @
f56ce51a
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 @
f56ce51a
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 @
f56ce51a
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 @
f56ce51a
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 @
f56ce51a
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/impl/OrderAdapterServiceImpl.java
View file @
f56ce51a
...
@@ -554,15 +554,15 @@ public class OrderAdapterServiceImpl {
...
@@ -554,15 +554,15 @@ public class OrderAdapterServiceImpl {
request
.
setMiniAppId
(
orderBean
.
getAppId
());
request
.
setMiniAppId
(
orderBean
.
getAppId
());
response
=
ecologyProgramApplicationClient
.
reportActivityBehaviors
(
request
);
response
=
ecologyProgramApplicationClient
.
reportActivityBehaviors
(
request
);
if
(!
Objects
.
equals
(
response
.
getCode
(),
"100"
))
{
if
(!
Objects
.
equals
(
response
.
getCode
(),
"100"
))
{
if
(!
Objects
.
equals
(
response
.
getMessage
(),
"用户未参加或已退出该活动"
))
{
//用户未报名活动的过滤掉
if
(!
Objects
.
equals
(
response
.
getMessage
(),
"用户未参加或已退出该活动"
))
{
//用户未报名活动的过滤掉
emailAlertService
.
sendEmailAlert
(
"低碳活动上报失败"
,
String
.
format
(
"request:%s \r\nresponse:%s \r\norderNo:%s"
,
JSONObject
.
toJSONString
(
request
),
JSONObject
.
toJSONString
(
response
),
orderBean
.
getOid
()));
//
emailAlertService.sendEmailAlert("低碳活动上报失败", String.format("request:%s \r\nresponse:%s \r\norderNo:%s", JSONObject.toJSONString(request), JSONObject.toJSONString(response), orderBean.getOid()));
}
}
ApiLog
.
printLog
(
"sendLowCarbonToWeixin error "
+
orderBean
.
getOid
(),
message
,
request
,
response
);
ApiLog
.
printLog
(
"sendLowCarbonToWeixin error "
+
orderBean
.
getOid
(),
message
,
request
,
response
);
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
emailAlertService
.
sendEmailAlert
(
"低碳活动上报异常"
,
String
.
format
(
"request:%s \r\nresponse:%s \r\norderNo:%s"
,
JSONObject
.
toJSONString
(
message
),
JSONObject
.
toJSONString
(
response
),
orderBean
.
getOid
()));
// emailAlertService.sendEmailAlert("低碳活动上报异常", String.format("request:%s \r\nresponse:%s \r\norderNo:%s", JSONObject.toJSONString(message), JSONObject.toJSONString(response),
orderBean.getOid()));
ErrorLog
.
printErrorLog
(
"sendLowCarbonToWeixin exception"
,
"/ecology/micro-program/low-carbon-action/activities/behaviors-report"
,
orderBean
,
e
);
ErrorLog
.
printErrorLog
(
"sendLowCarbonToWeixin exception"
,
"/ecology/micro-program/low-carbon-action/activities/behaviors-report"
,
orderBean
,
e
);
}
}
}
}
...
...
order-application-service/src/main/java/cn/freemud/service/thirdparty/CouponOnlineClient.java
View file @
f56ce51a
...
@@ -3,12 +3,14 @@ package cn.freemud.service.thirdparty;
...
@@ -3,12 +3,14 @@ package cn.freemud.service.thirdparty;
//import cn.freemud.constant.IgnoreFeignLogAnnotation;
//import cn.freemud.constant.IgnoreFeignLogAnnotation;
import
com.freemud.application.sdk.api.ordercenter.annotation.LogIgnoreFeign
;
import
cn.freemud.constant.ResponseCodeKeyConstant
;
import
cn.freemud.constant.ResponseCodeKeyConstant
;
import
cn.freemud.entities.dto.BatchQueryActivityInfoRequestDto
;
import
cn.freemud.entities.dto.BatchQueryActivityInfoRequestDto
;
import
cn.freemud.entities.dto.GetCouponDetailResponseDto
;
import
cn.freemud.entities.dto.GetCouponDetailResponseDto
;
import
cn.freemud.entities.dto.coupon.*
;
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
cn.freemud.interceptor.FormSupportConfig
;
import
com.freemud.application.sdk.api.ordercenter.annotation.LogIgnoreFeign
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
@@ -77,4 +79,11 @@ public interface CouponOnlineClient {
...
@@ -77,4 +79,11 @@ public interface CouponOnlineClient {
@PostMapping
(
value
=
"/coupon/standard/checkandcancel"
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@PostMapping
(
value
=
"/coupon/standard/checkandcancel"
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
CouponResponseDTO
<
CheckAndCancelResponseDTO
>
checkandcancel
(
@RequestBody
CheckAndCancelRequest
request
);
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 @
f56ce51a
...
@@ -19,6 +19,8 @@ import java.math.BigDecimal;
...
@@ -19,6 +19,8 @@ import java.math.BigDecimal;
@Data
@Data
public
class
OrderSettlementResp
{
public
class
OrderSettlementResp
{
private
Long
id
;
/**
/**
* 订单商品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