记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
e00a7329
Commit
e00a7329
authored
Nov 09, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PM临时+券发放类型:积分兑换;
parent
db74e1d0
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
50 additions
and
22 deletions
+50
-22
20210927_member_voucher_refund.sql
docu/20210927_member_voucher_refund.sql
+2
-2
CandyMemberCouponBuildParam.java
.../service/candy/dto/admin/CandyMemberCouponBuildParam.java
+1
-1
CandyMgtCouponBuildParam.java
...net/service/candy/dto/admin/CandyMgtCouponBuildParam.java
+1
-1
CandyMgtCouponAdminController.java
...troller/zhengzai/candy/CandyMgtCouponAdminController.java
+38
-11
CandyMgtCouponAdminServiceImpl.java
...ai/candy/service/impl/CandyMgtCouponAdminServiceImpl.java
+3
-2
CandyMgtCouponListParam.java
...dnet/service/candy/dto/admin/CandyMgtCouponListParam.java
+1
-1
CandyCoupon.java
.../java/com/liquidnet/service/candy/entity/CandyCoupon.java
+1
-1
db_ln_candy_initialdata.sql
...idnet-service-candy-impl/docu/db_ln_candy_initialdata.sql
+2
-2
PlatformCandyCouponService.java
...atform/service/impl/candy/PlatformCandyCouponService.java
+1
-1
No files found.
docu/20210927_member_voucher_refund.sql
View file @
e00a7329
...
...
@@ -174,7 +174,7 @@ create table candy_mgt_coupon
coupon_id
varchar
(
64
)
not
null
comment
'~candy_coupon.coupon_id'
,
state
tinyint
comment
'发放状态[0-未发放|1-已发放|2-无效|3-已取消|9-发放中|10-会员礼包初始模版]'
,
#
bind_type
smallint
comment
'领取方式[0-用户输入兑换|1-发放至用户]'
,
#
bind_type
smallint
comment
'领取方式[0-用户输入兑换|1-发放至用户
|2-积分兑换
]'
,
event_amt
int
comment
'发放量'
,
event_type
tinyint
comment
'发放类型[0-保留|1-会员|2-手机号|10-全体用户]'
,
event_limit
text
comment
'`发放类型`为2-手机号时发放手机号以,分隔'
,
...
...
@@ -203,7 +203,7 @@ create table candy_coupon
exclusive
smallint
comment
'专享标识[0-常规|1-会员礼包]'
,
busi_type
smallint
comment
'业务类别[0-全场|1-演出|2-商品|3-优先购]'
,
cou_type
smallint
comment
'券类型[1-代金券|2-满减券|3-兑换券|4-折扣券|101-优先券]'
,
bind_type
smallint
comment
'领取方式[0-用户输入兑换|1-发放至用户]'
,
bind_type
smallint
comment
'领取方式[0-用户输入兑换|1-发放至用户
|2-积分兑换
]'
,
discount
decimal
(
8
,
2
)
comment
'折扣[8折即0.8]'
,
val_face
decimal
(
8
,
2
)
comment
'面值'
,
...
...
liquidnet-bus-api/liquidnet-service-candy-api/src/main/java/com/liquidnet/service/candy/dto/admin/CandyMemberCouponBuildParam.java
View file @
e00a7329
...
...
@@ -41,7 +41,7 @@ public class CandyMemberCouponBuildParam {
@ApiModelProperty
(
required
=
true
,
value
=
"券类型[1-代金券|2-满减券|101-优先券]"
,
allowableValues
=
"1,2,101"
)
private
Integer
couType
;
// @NotNull(message = "券领取方式不能为空")
// @ApiModelProperty(required = true, value = "领取方式[0-用户输入兑换|1-发放至用户]", allowableValues = "0,1")
// @ApiModelProperty(required = true, value = "领取方式[0-用户输入兑换|1-发放至用户
|2-积分兑换
]", allowableValues = "0,1")
// private Integer bindType;
// @ApiModelProperty(required = false, value = "折扣[8折即0.8]", example = "0.8")
// private BigDecimal discount;
...
...
liquidnet-bus-api/liquidnet-service-candy-api/src/main/java/com/liquidnet/service/candy/dto/admin/CandyMgtCouponBuildParam.java
View file @
e00a7329
...
...
@@ -28,7 +28,7 @@ public class CandyMgtCouponBuildParam {
@ApiModelProperty
(
required
=
true
,
value
=
"券类型[1-代金券|2-满减券|3-兑换券|4-折扣券|101-优先券]"
,
allowableValues
=
"1,2,3,4,101"
)
private
Integer
couType
;
@NotNull
(
message
=
"券领取方式不能为空"
)
@ApiModelProperty
(
required
=
true
,
value
=
"领取方式[0-用户输入兑换|1-发放至用户
]"
,
allowableValues
=
"0,1
"
)
@ApiModelProperty
(
required
=
true
,
value
=
"领取方式[0-用户输入兑换|1-发放至用户
|2-积分兑换]"
,
allowableValues
=
"0,1,2
"
)
private
Integer
bindType
;
@ApiModelProperty
(
required
=
false
,
value
=
"折扣[8折即0.8]"
,
example
=
"0.8"
)
private
BigDecimal
discount
;
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/candy/CandyMgtCouponAdminController.java
View file @
e00a7329
...
...
@@ -161,6 +161,9 @@ public class CandyMgtCouponAdminController extends BaseController {
@ResponseBody
public
AjaxResult
addSave
(
@RequestBody
@Validated
CandyMgtCouponBuildParam
buildParam
)
{
logger
.
info
(
"operator:{},buildParam:{}"
,
ShiroUtils
.
getLoginName
(),
JsonUtils
.
toJson
(
buildParam
));
if
(
buildParam
.
getBindType
()
==
1
&&
buildParam
.
getEventType
()
==
2
&&
StringUtils
.
isBlank
(
buildParam
.
getEventLimit
()))
{
buildParam
.
setBindType
(
2
);
// TODO: 2021/11/9 PM上线前两天临时加的发放类型,页面交互只做逻辑实现,这里根据条件纠正`bindType`
}
AjaxResult
ajaxResult
=
this
.
buildValidProcessing
(
buildParam
);
if
(((
int
)
ajaxResult
.
get
(
AjaxResult
.
CODE_TAG
))
!=
0
)
{
return
ajaxResult
;
...
...
@@ -243,18 +246,42 @@ public class CandyMgtCouponAdminController extends BaseController {
buildParam
.
setCouponRuleList
(
null
);
}
if
(
0
==
buildParam
.
getBindType
())
{
buildParam
.
setEventType
(
0
);
buildParam
.
setEventLimit
(
null
);
if
(
null
==
buildParam
.
getRedeemValidity
())
{
return
AjaxResult
.
warn
(
"兑换有效期无效"
);
}
}
else
{
if
(
buildParam
.
getEventType
()
==
2
)
{
// 指定用户手机号
if
(
StringUtils
.
isBlank
(
buildParam
.
getEventLimit
()))
{
return
AjaxResult
.
warn
(
"请指定手机号"
);
// if (0 == buildParam.getBindType()) {
// buildParam.setEventType(0);
// buildParam.setEventLimit(null);
// if (null == buildParam.getRedeemValidity()) {
// return AjaxResult.warn("兑换有效期无效");
// }
// } else {
// if (buildParam.getEventType() == 2) {// 指定用户手机号
// if (StringUtils.isBlank(buildParam.getEventLimit())) {
// return AjaxResult.warn("请指定手机号");
// }
// }
// }
switch
(
buildParam
.
getBindType
())
{
// 领取方式[0-用户输入兑换|1-发放至用户|2-积分兑换]
case
0
:
buildParam
.
setEventType
(
0
);
buildParam
.
setEventLimit
(
null
);
if
(
null
==
buildParam
.
getRedeemValidity
())
{
return
AjaxResult
.
warn
(
"兑换有效期无效"
);
}
}
break
;
case
1
:
if
(
buildParam
.
getEventType
()
==
2
)
{
// 指定用户手机号
if
(
StringUtils
.
isBlank
(
buildParam
.
getEventLimit
()))
{
return
AjaxResult
.
warn
(
"请指定手机号"
);
}
}
break
;
case
2
:
buildParam
.
setEventType
(
0
);
buildParam
.
setEventLimit
(
null
);
break
;
default
:
logger
.
warn
(
"Invalid operation[buildParam.bindType={}]"
,
buildParam
.
getBindType
());
return
this
.
error
(
AjaxResult
.
Type
.
WARN
,
"券领取方式无效"
);
}
return
AjaxResult
.
success
();
}
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/candy/service/impl/CandyMgtCouponAdminServiceImpl.java
View file @
e00a7329
...
...
@@ -73,7 +73,7 @@ public class CandyMgtCouponAdminServiceImpl extends ServiceImpl<CandyMgtCouponMa
initCoupon
.
setExclusive
(
1
);
initCoupon
.
setBusiType
(
parameter
.
getBusiType
());
initCoupon
.
setCouType
(
parameter
.
getCouType
());
initCoupon
.
setBindType
(
1
);
// 领取方式[0-用户输入兑换|1-发放至用户]
initCoupon
.
setBindType
(
1
);
// 领取方式[0-用户输入兑换|1-发放至用户
|2-积分兑换
]
//initCoupon.setDiscount();
initCoupon
.
setValFace
(
parameter
.
getValFace
());
initCoupon
.
setValOver
(
parameter
.
getValOver
());
...
...
@@ -253,7 +253,8 @@ public class CandyMgtCouponAdminServiceImpl extends ServiceImpl<CandyMgtCouponMa
CandyMgtCoupon
initMgtCoupon
=
new
CandyMgtCoupon
();
initMgtCoupon
.
setMcouponId
(
IDGenerator
.
nextMilliId
());
initMgtCoupon
.
setCouponId
(
initCoupon
.
getCouponId
());
initMgtCoupon
.
setState
(
0
);
// initMgtCoupon.setState(0);
initMgtCoupon
.
setState
(
initCoupon
.
getBindType
()
==
2
?
1
:
0
);
// TODO: 2021/11/9 PM上线前两天临时加的发放类型,页面交互只做逻辑实现,这里根据条件设置该记录不执行发放逻辑
initMgtCoupon
.
setEventAmt
(
parameter
.
getEventAmt
());
initMgtCoupon
.
setEventType
(
parameter
.
getEventType
());
initMgtCoupon
.
setEventLimit
(
parameter
.
getEventLimit
());
...
...
liquidnet-bus-do/liquidnet-service-candy-do/src/main/java/com/liquidnet/service/candy/dto/admin/CandyMgtCouponListParam.java
View file @
e00a7329
...
...
@@ -12,7 +12,7 @@ public class CandyMgtCouponListParam {
*/
private
String
keyword
;
/**
* 领取方式[0-用户输入兑换|1-发放至用户]
* 领取方式[0-用户输入兑换|1-发放至用户
|2-积分兑换
]
*/
private
Integer
bindType
;
/**
...
...
liquidnet-bus-do/liquidnet-service-candy-do/src/main/java/com/liquidnet/service/candy/entity/CandyCoupon.java
View file @
e00a7329
...
...
@@ -65,7 +65,7 @@ public class CandyCoupon implements Serializable {
private
Integer
couType
;
/**
* 领取方式[0-用户输入兑换|1-发放至用户]
* 领取方式[0-用户输入兑换|1-发放至用户
|2-积分兑换
]
*/
private
Integer
bindType
;
...
...
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/docu/db_ln_candy_initialdata.sql
View file @
e00a7329
...
...
@@ -10,7 +10,7 @@ create table candy_mgt_coupon
coupon_id
varchar
(
64
)
not
null
comment
'~candy_coupon.coupon_id'
,
state
tinyint
comment
'发放状态[0-未发放|1-已发放|2-无效|3-已取消|9-发放中|10-会员礼包初始模版]'
,
#
bind_type
smallint
comment
'领取方式[0-用户输入兑换|1-发放至用户]'
,
#
bind_type
smallint
comment
'领取方式[0-用户输入兑换|1-发放至用户
|2-积分兑换
]'
,
event_amt
int
comment
'发放量'
,
event_type
tinyint
comment
'发放类型[0-保留|1-会员|2-手机号|10-全体用户]'
,
event_limit
text
comment
'`发放类型`为2-手机号时发放手机号以,分隔'
,
...
...
@@ -39,7 +39,7 @@ create table candy_coupon
exclusive
smallint
comment
'专享标识[0-常规|1-会员礼包]'
,
busi_type
smallint
comment
'业务类别[0-全场|1-演出|2-商品|3-优先购]'
,
cou_type
smallint
comment
'券类型[1-代金券|2-满减券|3-兑换券|4-折扣券|101-优先券]'
,
bind_type
smallint
comment
'领取方式[0-用户输入兑换|1-发放至用户]'
,
bind_type
smallint
comment
'领取方式[0-用户输入兑换|1-发放至用户
|2-积分兑换
]'
,
discount
decimal
(
8
,
2
)
comment
'折扣[8折即0.8]'
,
val_face
decimal
(
8
,
2
)
comment
'面值'
,
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/impl/candy/PlatformCandyCouponService.java
View file @
e00a7329
...
...
@@ -55,7 +55,7 @@ public class PlatformCandyCouponService extends ServiceImpl<CandyCouponMapper, C
String
couponInfoDtoKey
=
CandyRedisConst
.
BASIC_COUPON_INFO
.
concat
(
couponInfoDto
.
getCouponId
());
redisDataSourceUtil
.
getRedisCandyUtil
().
set
(
couponInfoDtoKey
,
couponInfoDto
);
switch
(
coupon
.
getBindType
())
{
// 领取方式[0-用户输入兑换|1-发放至用户]
switch
(
coupon
.
getBindType
())
{
// 领取方式[0-用户输入兑换|1-发放至用户
|2-积分兑换
]
case
0
:
this
.
processingCouponCode
(
mgtCoupon
,
coupon
);
break
;
...
...
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