记得上下班打卡 | 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
8dd99b34
Commit
8dd99b34
authored
Dec 14, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交 券 领取
parent
b5d03e38
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
101 deletions
+28
-101
CandyCouponVo.java
...in/java/com/liquidnet/service/candy/vo/CandyCouponVo.java
+15
-15
CandyCouponCodeController.java
...t/service/candy/controller/CandyCouponCodeController.java
+0
-20
CandyCouponRuleController.java
...t/service/candy/controller/CandyCouponRuleController.java
+0
-20
CandyMgtCouponController.java
...et/service/candy/controller/CandyMgtCouponController.java
+0
-20
CandyUserCouponController.java
...t/service/candy/controller/CandyUserCouponController.java
+0
-20
CandyCouponServiceImpl.java
...et/service/candy/service/impl/CandyCouponServiceImpl.java
+4
-1
CouponBaseUtil.java
...java/com/liquidnet/service/candy/util/CouponBaseUtil.java
+9
-5
No files found.
liquidnet-bus-api/liquidnet-service-candy-api/src/main/java/com/liquidnet/service/candy/vo/CandyCouponVo.java
View file @
8dd99b34
...
@@ -18,39 +18,39 @@ public class CandyCouponVo implements Serializable, Cloneable {
...
@@ -18,39 +18,39 @@ public class CandyCouponVo implements Serializable, Cloneable {
private
static
final
long
serialVersionUID
=
4073256621782131606L
;
private
static
final
long
serialVersionUID
=
4073256621782131606L
;
/* --- --- --- CandyCoupon */
/* --- --- --- CandyCoupon */
@ApiModelProperty
(
value
=
"标题"
,
example
=
"标题"
)
@ApiModelProperty
(
value
=
"标题"
,
example
=
"标题"
)
private
String
title
;
private
String
title
;
@ApiModelProperty
(
value
=
"标注"
,
example
=
"标注"
)
@ApiModelProperty
(
value
=
"标注"
,
example
=
"标注"
)
private
String
label
;
private
String
label
;
@ApiModelProperty
(
value
=
"须知"
,
example
=
"须知"
)
@ApiModelProperty
(
value
=
"须知"
,
example
=
"须知"
)
private
String
notice
;
private
String
notice
;
// private Integer exclusive;//专享标识[0-常规|1-会员礼包]
// private Integer exclusive;//专享标识[0-常规|1-会员礼包]
@ApiModelProperty
(
value
=
"业务类别[0-全场|1-演出|2-商品|3-优先购]"
,
example
=
"0"
)
@ApiModelProperty
(
value
=
"业务类别[0-全场|1-演出|2-商品|3-优先购]"
,
example
=
"0"
)
private
Integer
busiType
;
private
Integer
busiType
;
@ApiModelProperty
(
value
=
"券类型[1-代金券|2-满减券|3-兑换券|4-折扣券 | 101-优先券]"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"券类型[1-代金券|2-满减券|3-兑换券|4-折扣券 | 101-优先券]"
,
example
=
"1"
)
private
Integer
couType
;
private
Integer
couType
;
@ApiModelProperty
(
value
=
"[0-用户输入兑换|1-发放至用户|2-积分商品|3-发放需领取|4-会员专属]"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"[0-用户输入兑换|1-发放至用户|2-积分商品|3-发放需领取|4-会员专属]"
,
example
=
"1"
)
private
Integer
bindType
;
private
Integer
bindType
;
@ApiModelProperty
(
value
=
"折扣 可null"
,
example
=
"0.5"
)
@ApiModelProperty
(
value
=
"折扣 可null"
,
example
=
"0.5"
)
private
BigDecimal
discount
;
private
BigDecimal
discount
;
@ApiModelProperty
(
value
=
"面值 可null"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"面值 可null"
,
example
=
"1"
)
private
BigDecimal
valFace
;
private
BigDecimal
valFace
;
@ApiModelProperty
(
value
=
"满减~满 可null"
,
example
=
"100"
)
@ApiModelProperty
(
value
=
"满减~满 可null"
,
example
=
"100"
)
private
BigDecimal
valOver
;
private
BigDecimal
valOver
;
@ApiModelProperty
(
value
=
"满减~减少 可null"
,
example
=
"5"
)
@ApiModelProperty
(
value
=
"满减~减少 可null"
,
example
=
"5"
)
private
BigDecimal
valMinus
;
private
BigDecimal
valMinus
;
@ApiModelProperty
(
value
=
"过期时间 可null"
,
example
=
"2021-09-25"
)
@ApiModelProperty
(
value
=
"过期时间 可null"
,
example
=
"2021-09-25"
)
private
String
expireAt
;
private
String
expireAt
;
/* --- --- --- CandyUserCoupon */
/* --- --- --- CandyUserCoupon */
@ApiModelProperty
(
value
=
"券id"
,
example
=
"6d74a49d3d1d13f96ba09215abcc49af"
)
@ApiModelProperty
(
value
=
"券id"
,
example
=
"6d74a49d3d1d13f96ba09215abcc49af"
)
private
String
ucouponId
;
private
String
ucouponId
;
@ApiModelProperty
(
value
=
"券状态[1-可用|2-无效|3-已过期 |31-未到期|5-已使用 |21-不可用
]"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"券状态[1-可用|2-无效|3-已过期 |31-未到期|5-已使用 |21-不可用
| 22-需领取]"
,
example
=
"1"
)
private
Integer
state
;
private
Integer
state
;
// private String bindAt;//激活时间
// private String bindAt;//激活时间
@ApiModelProperty
(
value
=
"使用时间 可null"
,
example
=
"2021-09-25"
)
@ApiModelProperty
(
value
=
"使用时间 可null"
,
example
=
"2021-09-25"
)
private
String
usedAt
;
private
String
usedAt
;
@ApiModelProperty
(
value
=
"购买内容 可null"
,
example
=
"北京草莓"
)
@ApiModelProperty
(
value
=
"购买内容 可null"
,
example
=
"北京草莓"
)
private
String
usedFor
;
private
String
usedFor
;
...
...
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/controller/CandyCouponCodeController.java
deleted
100644 → 0
View file @
b5d03e38
package
com
.
liquidnet
.
service
.
candy
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* <p>
* 券码信息 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-18
*/
@RestController
@RequestMapping
(
"/candy-coupon-code"
)
public
class
CandyCouponCodeController
{
}
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/controller/CandyCouponRuleController.java
deleted
100644 → 0
View file @
b5d03e38
package
com
.
liquidnet
.
service
.
candy
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* <p>
* 券适用规则 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-18
*/
@RestController
@RequestMapping
(
"/candy-coupon-rule"
)
public
class
CandyCouponRuleController
{
}
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/controller/CandyMgtCouponController.java
deleted
100644 → 0
View file @
b5d03e38
package
com
.
liquidnet
.
service
.
candy
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* <p>
* 券发放管理 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-18
*/
@RestController
@RequestMapping
(
"/candy-mgt-coupon"
)
public
class
CandyMgtCouponController
{
}
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/controller/CandyUserCouponController.java
deleted
100644 → 0
View file @
b5d03e38
package
com
.
liquidnet
.
service
.
candy
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* <p>
* 用户券信息 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-18
*/
@RestController
@RequestMapping
(
"/candy-user-coupon"
)
public
class
CandyUserCouponController
{
}
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/service/impl/CandyCouponServiceImpl.java
View file @
8dd99b34
...
@@ -72,6 +72,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -72,6 +72,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
if
(
baseVo
.
getState
().
equals
(
1
))
{
if
(
baseVo
.
getState
().
equals
(
1
))
{
continue
;
continue
;
}
}
}
if
(
baseVo
.
getBindType
().
equals
(
"3"
)){
}
}
if
(
dtoItem
.
getExclusive
().
equals
(
1
))
{
//会员券
if
(
dtoItem
.
getExclusive
().
equals
(
1
))
{
//会员券
memberCoupon
.
add
(
baseVo
);
memberCoupon
.
add
(
baseVo
);
...
@@ -313,7 +316,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -313,7 +316,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
if
(
dto
==
null
)
{
if
(
dto
==
null
)
{
return
null
;
//券不存在
return
null
;
//券不存在
}
}
return
CouponBaseUtil
.
getCouponState
(
LocalDateTime
.
now
(),
dto
.
getDuedAt
(),
dto
.
getBindAt
(),
dto
.
getState
());
return
CouponBaseUtil
.
getCouponState
(
LocalDateTime
.
now
(),
dto
.
getDuedAt
(),
dto
.
getBindAt
(),
dto
.
getState
()
,
dto
.
getBindType
()
);
}
}
@Override
@Override
...
...
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/util/CouponBaseUtil.java
View file @
8dd99b34
...
@@ -59,7 +59,7 @@ public class CouponBaseUtil {
...
@@ -59,7 +59,7 @@ public class CouponBaseUtil {
if
(
dtoItem
.
getDuedAt
()
==
null
)
{
if
(
dtoItem
.
getDuedAt
()
==
null
)
{
return
null
;
return
null
;
}
}
vo
.
setState
(
getCouponState
(
now
,
dtoItem
.
getDuedAt
(),
dtoItem
.
getBindAt
(),
dtoItem
.
getState
()));
vo
.
setState
(
getCouponState
(
now
,
dtoItem
.
getDuedAt
(),
dtoItem
.
getBindAt
(),
dtoItem
.
getState
()
,
dtoItem
.
getBindType
()
));
vo
.
setUseRules
(
rulesVoList
);
vo
.
setUseRules
(
rulesVoList
);
return
vo
;
return
vo
;
}
}
...
@@ -144,7 +144,7 @@ public class CouponBaseUtil {
...
@@ -144,7 +144,7 @@ public class CouponBaseUtil {
}
else
{
}
else
{
vo
.
setCouType
(
dtoItem
.
getCouType
());
vo
.
setCouType
(
dtoItem
.
getCouType
());
}
}
int
state
=
getCouponState
(
now
,
dtoItem
.
getDuedAt
(),
dtoItem
.
getBindAt
(),
dtoItem
.
getState
());
int
state
=
getCouponState
(
now
,
dtoItem
.
getDuedAt
(),
dtoItem
.
getBindAt
(),
dtoItem
.
getState
()
,
dtoItem
.
getBindType
()
);
if
(
isTarget
)
{
if
(
isTarget
)
{
vo
.
setState
(
state
);
vo
.
setState
(
state
);
}
else
{
}
else
{
...
@@ -227,7 +227,7 @@ public class CouponBaseUtil {
...
@@ -227,7 +227,7 @@ public class CouponBaseUtil {
}
else
{
}
else
{
vo
.
setCouType
(
dtoItem
.
getCouType
());
vo
.
setCouType
(
dtoItem
.
getCouType
());
}
}
int
state
=
getCouponState
(
now
,
dtoItem
.
getDuedAt
(),
dtoItem
.
getBindAt
(),
dtoItem
.
getState
());
int
state
=
getCouponState
(
now
,
dtoItem
.
getDuedAt
(),
dtoItem
.
getBindAt
(),
dtoItem
.
getState
()
,
dtoItem
.
getBindType
()
);
if
(
isTarget
)
{
if
(
isTarget
)
{
vo
.
setState
(
state
);
vo
.
setState
(
state
);
...
@@ -272,7 +272,7 @@ public class CouponBaseUtil {
...
@@ -272,7 +272,7 @@ public class CouponBaseUtil {
* @param state 券状态
* @param state 券状态
* @return 判断过后的券状态
* @return 判断过后的券状态
*/
*/
public
static
Integer
getCouponState
(
LocalDateTime
currentTime
,
LocalDateTime
expireAt
,
LocalDateTime
effectAt
,
Integer
state
)
{
public
static
Integer
getCouponState
(
LocalDateTime
currentTime
,
LocalDateTime
expireAt
,
LocalDateTime
effectAt
,
Integer
state
,
Integer
bindType
)
{
//券状态
//券状态
Integer
data
;
Integer
data
;
if
(
state
.
equals
(
1
))
{
if
(
state
.
equals
(
1
))
{
...
@@ -281,7 +281,11 @@ public class CouponBaseUtil {
...
@@ -281,7 +281,11 @@ public class CouponBaseUtil {
}
else
if
(
currentTime
.
isBefore
(
effectAt
))
{
}
else
if
(
currentTime
.
isBefore
(
effectAt
))
{
data
=
31
;
data
=
31
;
}
else
{
}
else
{
data
=
state
;
if
(
bindType
==
3
)
{
data
=
21
;
}
else
{
data
=
state
;
}
}
}
}
else
{
}
else
{
data
=
state
;
data
=
state
;
...
...
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