记得上下班打卡 | 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
81a1765f
Commit
81a1765f
authored
Dec 07, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~创建券同步券基础信息至RDS(替换原发放券同步券基础信息至RDS);
parent
9a7a2291
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
56 additions
and
28 deletions
+56
-28
20210927_member_voucher_refund.sql
docu/20210927_member_voucher_refund.sql
+2
-2
CandyMemberCouponBuildParam.java
.../service/candy/dto/admin/CandyMemberCouponBuildParam.java
+1
-1
CandyCouponBasicVo.java
...va/com/liquidnet/service/candy/vo/CandyCouponBasicVo.java
+1
-1
CandyCouponVo.java
...in/java/com/liquidnet/service/candy/vo/CandyCouponVo.java
+1
-1
IntegralActivityCouponVo.java
...uidnet/service/sweet/dto/vo/IntegralActivityCouponVo.java
+1
-1
CandyCouponAdminController.java
...controller/zhengzai/candy/CandyCouponAdminController.java
+1
-1
CandyMgtCouponAdminController.java
...troller/zhengzai/candy/CandyMgtCouponAdminController.java
+3
-3
CandyMgtCouponAdminServiceImpl.java
...ai/candy/service/impl/CandyMgtCouponAdminServiceImpl.java
+18
-2
CandyCouponRuleDto.java
...a/com/liquidnet/service/candy/dto/CandyCouponRuleDto.java
+11
-0
CandyCouponListParam.java
...quidnet/service/candy/dto/admin/CandyCouponListParam.java
+1
-1
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
+12
-11
No files found.
docu/20210927_member_voucher_refund.sql
View file @
81a1765f
...
...
@@ -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-发放至用户|2-积分
兑换
]'
,
#
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-发放至用户|2-积分
兑换
]'
,
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 @
81a1765f
...
...
@@ -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-发放至用户|2-积分
兑换
|3-发放需领取|4-会员专属]", allowableValues = "0,1,2,3,4")
// @ApiModelProperty(required = true, value = "领取方式[0-用户输入兑换|1-发放至用户|2-积分
商品
|3-发放需领取|4-会员专属]", allowableValues = "0,1,2,3,4")
// 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/vo/CandyCouponBasicVo.java
View file @
81a1765f
...
...
@@ -23,7 +23,7 @@ public class CandyCouponBasicVo implements Serializable, Cloneable {
private
Integer
busiType
;
@ApiModelProperty
(
value
=
"券类型[1-代金券|2-满减券|3-兑换券|4-折扣券 | 101-优先券]"
)
private
Integer
couType
;
@ApiModelProperty
(
value
=
"[0-用户输入兑换|1-发放至用户|2-积分
兑换
|3-发放需领取|4-会员专属]"
)
@ApiModelProperty
(
value
=
"[0-用户输入兑换|1-发放至用户|2-积分
商品
|3-发放需领取|4-会员专属]"
)
private
Integer
bindType
;
@ApiModelProperty
(
value
=
"折扣"
)
private
BigDecimal
discount
;
...
...
liquidnet-bus-api/liquidnet-service-candy-api/src/main/java/com/liquidnet/service/candy/vo/CandyCouponVo.java
View file @
81a1765f
...
...
@@ -29,7 +29,7 @@ public class CandyCouponVo implements Serializable, Cloneable {
private
Integer
busiType
;
@ApiModelProperty
(
value
=
"券类型[1-代金券|2-满减券|3-兑换券|4-折扣券 | 101-优先券]"
,
example
=
"1"
)
private
Integer
couType
;
@ApiModelProperty
(
value
=
"[0-用户输入兑换|1-发放至用户|2-积分
兑换
|3-发放需领取|4-会员专属]"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"[0-用户输入兑换|1-发放至用户|2-积分
商品
|3-发放需领取|4-会员专属]"
,
example
=
"1"
)
private
Integer
bindType
;
@ApiModelProperty
(
value
=
"折扣 可null"
,
example
=
"0.5"
)
private
BigDecimal
discount
;
...
...
liquidnet-bus-api/liquidnet-service-sweet-api/src/main/java/com/liquidnet/service/sweet/dto/vo/IntegralActivityCouponVo.java
View file @
81a1765f
...
...
@@ -26,7 +26,7 @@ public class IntegralActivityCouponVo implements Serializable, Cloneable {
private
Integer
busiType
;
@ApiModelProperty
(
value
=
"券类型[1-代金券|2-满减券|3-兑换券|4-折扣券 | 101-优先券]"
)
private
Integer
couType
;
@ApiModelProperty
(
value
=
"[0-用户输入兑换|1-发放至用户|2-积分
兑换
|3-发放需领取|4-会员专属]"
)
@ApiModelProperty
(
value
=
"[0-用户输入兑换|1-发放至用户|2-积分
商品
|3-发放需领取|4-会员专属]"
)
private
Integer
bindType
;
@ApiModelProperty
(
value
=
"折扣"
)
private
BigDecimal
discount
;
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/candy/CandyCouponAdminController.java
View file @
81a1765f
...
...
@@ -44,7 +44,7 @@ public class CandyCouponAdminController extends BaseController {
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"Integer"
,
name
=
"busiType"
,
value
=
"业务类别[0-全场|1-演出|2-商品|3-优先购]"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"Integer"
,
name
=
"couType"
,
value
=
"券类型[1-代金券|2-满减券|3-兑换券|4-折扣券|101-优先券]"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"String"
,
name
=
"bindType"
,
value
=
"领取方式[0-用户输入兑换|1-发放至用户|2-积分
兑换
|3-发放需领取|4-会员专属],多种方式则以,分隔入参"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"String"
,
name
=
"bindType"
,
value
=
"领取方式[0-用户输入兑换|1-发放至用户|2-积分
商品
|3-发放需领取|4-会员专属],多种方式则以,分隔入参"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"String"
,
name
=
"keyword"
,
value
=
"搜索关键字"
),
})
@PostMapping
(
"list"
)
...
...
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 @
81a1765f
...
...
@@ -287,7 +287,7 @@ public class CandyMgtCouponAdminController extends BaseController {
// }
// }
switch
(
buildParam
.
getBindType
())
{
// 领取方式[0-用户输入兑换|1-发放至用户|2-积分
兑换
|3-发放需领取|4-会员专属]
switch
(
buildParam
.
getBindType
())
{
// 领取方式[0-用户输入兑换|1-发放至用户|2-积分
商品
|3-发放需领取|4-会员专属]
case
0
:
buildParam
.
setEventType
(
0
);
buildParam
.
setEventLimit
(
null
);
...
...
@@ -303,8 +303,8 @@ public class CandyMgtCouponAdminController extends BaseController {
}
}
break
;
case
4
:
// 新增券领取类型(4-会员专属)处理逻辑同(2-积分
兑换
)
case
2
:
// TODO: 2021/11/9 PM上线前临时加的券领取类型(2-积分
兑换
)
case
4
:
// 新增券领取类型(4-会员专属)处理逻辑同(2-积分
商品
)
case
2
:
// TODO: 2021/11/9 PM上线前临时加的券领取类型(2-积分
商品
)
buildParam
.
setEventType
(
0
);
buildParam
.
setEventLimit
(
null
);
break
;
...
...
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 @
81a1765f
...
...
@@ -17,6 +17,9 @@ import com.liquidnet.commons.lang.util.IDGenerator;
import
com.liquidnet.service.adam.constant.AdamRedisConst
;
import
com.liquidnet.service.adam.dto.vo.AdamMemberRightsCouponRuleVo
;
import
com.liquidnet.service.adam.dto.vo.AdamMemberRightsCouponVo
;
import
com.liquidnet.service.candy.constant.CandyRedisConst
;
import
com.liquidnet.service.candy.dto.CandyCouponInfoDto
;
import
com.liquidnet.service.candy.dto.CandyCouponRuleDto
;
import
com.liquidnet.service.candy.dto.admin.*
;
import
com.liquidnet.service.candy.entity.CandyCoupon
;
import
com.liquidnet.service.candy.entity.CandyCouponRule
;
...
...
@@ -25,6 +28,7 @@ import com.liquidnet.service.candy.mapper.CandyCouponMapper;
import
com.liquidnet.service.candy.mapper.CandyMgtCouponMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -74,7 +78,7 @@ public class CandyMgtCouponAdminServiceImpl extends ServiceImpl<CandyMgtCouponMa
// initCoupon.setExclusive(1);
// initCoupon.setBusiType(parameter.getBusiType());
// initCoupon.setCouType(parameter.getCouType());
// initCoupon.setBindType(1);// 领取方式[0-用户输入兑换|1-发放至用户|2-积分
兑换
|3-发放需领取|4-会员专属]
// initCoupon.setBindType(1);// 领取方式[0-用户输入兑换|1-发放至用户|2-积分
商品
|3-发放需领取|4-会员专属]
// //initCoupon.setDiscount();
// initCoupon.setValFace(parameter.getValFace());
// initCoupon.setValOver(parameter.getValOver());
...
...
@@ -409,7 +413,7 @@ public class CandyMgtCouponAdminServiceImpl extends ServiceImpl<CandyMgtCouponMa
initMgtCoupon
.
setMcouponId
(
IDGenerator
.
nextMilliId
());
initMgtCoupon
.
setCouponId
(
initCoupon
.
getCouponId
());
// initMgtCoupon.setState(0);
// initMgtCoupon.setState(initCoupon.getBindType() == 2 ? 1 : 0);// TODO: 2021/11/9 PM上线前临时加的券领取类型(2-积分
兑换
),这里根据发放类型设置该记录不执行发放
// initMgtCoupon.setState(initCoupon.getBindType() == 2 ? 1 : 0);// TODO: 2021/11/9 PM上线前临时加的券领取类型(2-积分
商品
),这里根据发放类型设置该记录不执行发放
initMgtCoupon
.
setState
(
Arrays
.
asList
(
2
,
4
).
contains
(
initCoupon
.
getBindType
())
?
1
:
0
);
initMgtCoupon
.
setEventAmt
(
parameter
.
getEventAmt
());
initMgtCoupon
.
setEventType
(
parameter
.
getEventType
());
...
...
@@ -442,6 +446,18 @@ public class CandyMgtCouponAdminServiceImpl extends ServiceImpl<CandyMgtCouponMa
throw
new
LiquidnetServiceException
();
}
List
<
CandyCouponRuleDto
>
couponRuleDtoList
=
new
ArrayList
<>();
initCouponRuleList
.
forEach
(
r
->
{
couponRuleDtoList
.
add
(
CandyCouponRuleDto
.
getNew
().
copy
(
r
));
});
CandyCouponInfoDto
couponInfoDto
=
new
CandyCouponInfoDto
();
BeanUtils
.
copyProperties
(
initCoupon
,
couponInfoDto
);
couponInfoDto
.
setUseRules
(
couponRuleDtoList
);
String
couponInfoDtoKey
=
CandyRedisConst
.
BASIC_COUPON_INFO
.
concat
(
couponInfoDto
.
getCouponId
());
redisDataSourceUtil
.
getRedisCandyUtil
().
set
(
couponInfoDtoKey
,
couponInfoDto
);
// switch (initCoupon.getExclusive()) {
// case 0:
// break;
...
...
liquidnet-bus-do/liquidnet-service-candy-do/src/main/java/com/liquidnet/service/candy/dto/CandyCouponRuleDto.java
View file @
81a1765f
package
com
.
liquidnet
.
service
.
candy
.
dto
;
import
com.liquidnet.service.candy.entity.CandyCouponRule
;
import
lombok.Data
;
import
java.io.Serializable
;
...
...
@@ -25,4 +26,14 @@ public class CandyCouponRuleDto implements Serializable, Cloneable {
return
new
CandyCouponRuleDto
();
}
}
public
CandyCouponRuleDto
copy
(
CandyCouponRule
source
)
{
if
(
null
==
source
)
return
this
;
this
.
setCruleId
(
source
.
getCruleId
());
this
.
setCouponId
(
source
.
getCouponId
());
this
.
setUseScope
(
source
.
getUseScope
());
this
.
setBusiName
(
source
.
getBusiName
());
this
.
setBusiId
(
source
.
getBusiId
());
return
this
;
}
}
liquidnet-bus-do/liquidnet-service-candy-do/src/main/java/com/liquidnet/service/candy/dto/admin/CandyCouponListParam.java
View file @
81a1765f
...
...
@@ -10,7 +10,7 @@ public class CandyCouponListParam {
*/
private
String
keyword
;
/**
* 领取方式[0-用户输入兑换|1-发放至用户|2-积分
兑换
|3-发放需领取|4-会员专属]
* 领取方式[0-用户输入兑换|1-发放至用户|2-积分
商品
|3-发放需领取|4-会员专属]
* <p>
* 多种方式则以,分隔入参
* </p>
...
...
liquidnet-bus-do/liquidnet-service-candy-do/src/main/java/com/liquidnet/service/candy/dto/admin/CandyMgtCouponListParam.java
View file @
81a1765f
...
...
@@ -12,7 +12,7 @@ public class CandyMgtCouponListParam {
*/
private
String
keyword
;
/**
* 领取方式[0-用户输入兑换|1-发放至用户|2-积分
兑换
|3-发放需领取|4-会员专属]
* 领取方式[0-用户输入兑换|1-发放至用户|2-积分
商品
|3-发放需领取|4-会员专属]
*/
private
Integer
bindType
;
/**
...
...
liquidnet-bus-do/liquidnet-service-candy-do/src/main/java/com/liquidnet/service/candy/entity/CandyCoupon.java
View file @
81a1765f
...
...
@@ -65,7 +65,7 @@ public class CandyCoupon implements Serializable {
private
Integer
couType
;
/**
* 领取方式[0-用户输入兑换|1-发放至用户|2-积分
兑换
|3-发放需领取|4-会员专属]
* 领取方式[0-用户输入兑换|1-发放至用户|2-积分
商品
|3-发放需领取|4-会员专属]
*/
private
Integer
bindType
;
...
...
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/docu/db_ln_candy_initialdata.sql
View file @
81a1765f
...
...
@@ -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-发放至用户|2-积分
兑换
]'
,
#
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-发放至用户|2-积分
兑换
|3-发放需领取|4-会员专属]'
,
bind_type
smallint
comment
'领取方式[0-用户输入兑换|1-发放至用户|2-积分
商品
|3-发放需领取|4-会员专属]'
,
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 @
81a1765f
...
...
@@ -48,14 +48,15 @@ public class PlatformCandyCouponService extends ServiceImpl<CandyCouponMapper, C
private
void
issueCouponProcessing
(
final
CandyMgtCoupon
mgtCoupon
,
final
CandyCoupon
coupon
)
{
List
<
CandyCouponRuleDto
>
couponRuleDtoList
=
platformCandyCouponRuleService
.
listForCouponRuleDto
(
coupon
.
getCouponId
());
CandyCouponInfoDto
couponInfoDto
=
new
CandyCouponInfoDto
();
BeanUtils
.
copyProperties
(
coupon
,
couponInfoDto
);
couponInfoDto
.
setUseRules
(
couponRuleDtoList
);
String
couponInfoDtoKey
=
CandyRedisConst
.
BASIC_COUPON_INFO
.
concat
(
couponInfoDto
.
getCouponId
());
redisDataSourceUtil
.
getRedisCandyUtil
().
set
(
couponInfoDtoKey
,
couponInfoDto
);
switch
(
coupon
.
getBindType
())
{
// 领取方式[0-用户输入兑换|1-发放至用户|2-积分兑换|3-发放需领取|4-会员专属]
// 后台创建券时,同步至REDIS,这里不再同步
// CandyCouponInfoDto couponInfoDto = new CandyCouponInfoDto();
// BeanUtils.copyProperties(coupon, couponInfoDto);
// couponInfoDto.setUseRules(couponRuleDtoList);
//
// String couponInfoDtoKey = CandyRedisConst.BASIC_COUPON_INFO.concat(couponInfoDto.getCouponId());
// redisDataSourceUtil.getRedisCandyUtil().set(couponInfoDtoKey, couponInfoDto);
switch
(
coupon
.
getBindType
())
{
// 领取方式[0-用户输入兑换|1-发放至用户|2-积分商品|3-发放需领取|4-会员专属]
case
0
:
this
.
processingCouponCode
(
mgtCoupon
,
coupon
);
break
;
...
...
@@ -75,9 +76,9 @@ public class PlatformCandyCouponService extends ServiceImpl<CandyCouponMapper, C
// break;
// }
// break;
case
3
:
// 新增券领取类型(3-发放需领取)处理逻辑同(1-发放至用户|2-积分
兑换
)
case
4
:
// 新增券领取类型(4-会员专属)处理逻辑同(1-发放至用户|2-积分
兑换
)
case
2
:
// TODO: 2021/11/9 PM上线前临时加的券领取类型(2-积分
兑换),这里`1-发放至用户|2-积分兑换
`做同逻辑处理
case
3
:
// 新增券领取类型(3-发放需领取)处理逻辑同(1-发放至用户|2-积分
商品
)
case
4
:
// 新增券领取类型(4-会员专属)处理逻辑同(1-发放至用户|2-积分
商品
)
case
2
:
// TODO: 2021/11/9 PM上线前临时加的券领取类型(2-积分
商品),这里`1-发放至用户|2-积分商品
`做同逻辑处理
switch
(
mgtCoupon
.
getEventType
())
{
// 发放类型[1-会员|2-手机号|10-全体用户]
case
1
:
this
.
processForAllMember
(
mgtCoupon
,
coupon
,
couponRuleDtoList
);
...
...
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