记得上下班打卡 | 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
728b16a0
Commit
728b16a0
authored
Sep 01, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加券:生效|失效时间字段赋值逻辑调整;
parent
d13fbd83
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
10 deletions
+26
-10
CandyMgtCoupon1AdminController.java
...roller/zhengzai/candy/CandyMgtCoupon1AdminController.java
+15
-8
FeignPlatformCandyTaskClient.java
...ice/feign/platform/task/FeignPlatformCandyTaskClient.java
+10
-1
CandyMgtCouponTaskController.java
...m/controller/candy/task/CandyMgtCouponTaskController.java
+1
-1
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/candy/CandyMgtCoupon1AdminController.java
View file @
728b16a0
...
@@ -79,33 +79,40 @@ public class CandyMgtCoupon1AdminController extends BaseController {
...
@@ -79,33 +79,40 @@ public class CandyMgtCoupon1AdminController extends BaseController {
public
AjaxResult
addSave
(
@Validated
CandyMgtCouponBuildParam
buildParam
)
{
public
AjaxResult
addSave
(
@Validated
CandyMgtCouponBuildParam
buildParam
)
{
BigDecimal
discount
=
null
,
valFace
=
null
,
valOver
=
null
,
valMinus
=
null
;
BigDecimal
discount
=
null
,
valFace
=
null
,
valOver
=
null
,
valMinus
=
null
;
Integer
couType
=
buildParam
.
getCouType
(),
Integer
couType
=
buildParam
.
getCouType
(),
bindType
=
buildParam
.
getBindType
(),
validity
=
buildParam
.
getValidity
(),
validity
=
buildParam
.
getValidity
(),
redeemValidity
=
buildParam
.
getRedeemValidity
();
redeemValidity
=
buildParam
.
getRedeemValidity
();
LocalDateTime
nowTime
=
LocalDateTime
.
now
(),
LocalDateTime
nowTime
=
LocalDateTime
.
now
(),
redeemStart
=
null
,
redeemStop
=
null
,
effectAt
,
expireAt
,
redeemStart
=
null
,
redeemStop
=
null
,
effectAt
=
null
,
expireAt
=
null
,
eventAt
=
LocalDateTime
.
parse
(
buildParam
.
getEventAt
(),
DateTimeFormatter
.
ofPattern
(
DateUtils
.
YYYY_MM_DD_HH_MM_SS
));
eventAt
=
LocalDateTime
.
parse
(
buildParam
.
getEventAt
(),
DateTimeFormatter
.
ofPattern
(
DateUtils
.
YYYY_MM_DD_HH_MM_SS
));
switch
(
couType
)
{
// TODO: 2021/8/20 校验
switch
(
couType
)
{
//
券类型[1-代金券|2-满减券|3-兑换券|4-折扣券]
TODO: 2021/8/20 校验
case
1
:
// 代金券
case
1
:
valFace
=
buildParam
.
getValFace
();
valFace
=
buildParam
.
getValFace
();
break
;
break
;
case
2
:
// 满减券
case
2
:
valOver
=
buildParam
.
getValOver
();
valOver
=
buildParam
.
getValOver
();
valMinus
=
buildParam
.
getValMinus
();
valMinus
=
buildParam
.
getValMinus
();
break
;
break
;
case
3
:
// 兑换券
case
3
:
redeemStart
=
eventAt
.
with
(
LocalTime
.
MIN
);
redeemStart
=
eventAt
.
with
(
LocalTime
.
MIN
);
redeemStop
=
eventAt
.
plusDays
(
redeemValidity
).
withHour
(
23
).
withMinute
(
59
).
withSecond
(
59
);
redeemStop
=
eventAt
.
plusDays
(
redeemValidity
).
withHour
(
23
).
withMinute
(
59
).
withSecond
(
59
);
break
;
break
;
case
4
:
// 折扣券
case
4
:
discount
=
buildParam
.
getDiscount
();
discount
=
buildParam
.
getDiscount
();
break
;
break
;
default
:
default
:
logger
.
warn
(
"Invalid operation[buildParam.couType={}]"
,
couType
);
logger
.
warn
(
"Invalid operation[buildParam.couType={}]"
,
couType
);
return
this
.
error
(
AjaxResult
.
Type
.
WARN
,
"券类型无效"
);
return
this
.
error
(
AjaxResult
.
Type
.
WARN
,
"券类型无效"
);
}
}
switch
(
bindType
)
{
// 领取方式[0-用户输入兑换|1-发放至用户]
// case 0:// 实际兑换发生时,计算到期时间
// break;
case
1
:
effectAt
=
eventAt
.
with
(
LocalTime
.
MIN
);
effectAt
=
eventAt
.
with
(
LocalTime
.
MIN
);
expireAt
=
eventAt
.
plusDays
(
validity
).
withHour
(
23
).
withMinute
(
59
).
withSecond
(
59
);
expireAt
=
eventAt
.
plusDays
(
validity
).
withHour
(
23
).
withMinute
(
59
).
withSecond
(
59
);
break
;
}
StringBuilder
eventLimit
=
new
StringBuilder
();
StringBuilder
eventLimit
=
new
StringBuilder
();
String
operator
=
ShiroUtils
.
getLoginName
();
String
operator
=
ShiroUtils
.
getLoginName
();
...
...
liquidnet-bus-feign/liquidnet-api-feign-platform/src/main/java/com/liquidnet/service/feign/platform/task/FeignPlatformCandyTaskClient.java
View file @
728b16a0
...
@@ -15,6 +15,15 @@ import org.springframework.web.bind.annotation.PutMapping;
...
@@ -15,6 +15,15 @@ import org.springframework.web.bind.annotation.PutMapping;
)
)
public
interface
FeignPlatformCandyTaskClient
{
public
interface
FeignPlatformCandyTaskClient
{
@PutMapping
(
"
/ccoupon/mgt/task
/issue/coupons"
)
@PutMapping
(
"
ccoupon/task/mgt
/issue/coupons"
)
ResponseDto
<
String
>
issueCoupons
();
ResponseDto
<
String
>
issueCoupons
();
@PutMapping
(
"ccoupon/task/due/redeem"
)
ResponseDto
<
String
>
processForRedeem
();
@PutMapping
(
"ccoupon/task/due/common"
)
ResponseDto
<
String
>
processForCommon
();
@PutMapping
(
"ccoupon/task/due/user"
)
ResponseDto
<
String
>
processForUser
();
}
}
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/candy/task/CandyMgtCouponTaskController.java
View file @
728b16a0
...
@@ -18,7 +18,7 @@ import java.util.List;
...
@@ -18,7 +18,7 @@ import java.util.List;
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"ccoupon/
mgt/task
"
)
@RequestMapping
(
"ccoupon/
task/mgt
"
)
public
class
CandyMgtCouponTaskController
{
public
class
CandyMgtCouponTaskController
{
@Autowired
@Autowired
private
PlatformCandyMgtCouponService
platformCandyMgtCouponService
;
private
PlatformCandyMgtCouponService
platformCandyMgtCouponService
;
...
...
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