Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-shopmall-parent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5b7bbb9f
authored
Nov 30, 2023
by
张漳铖
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增油劵订单下单接口2
1 parent
ea80b2d3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
platform-shopmall/src/main/java/cn/com/glsx/admin/modules/service/CouponService.java
platform-shopmall/src/main/java/cn/com/glsx/admin/modules/service/CouponService.java
View file @
5b7bbb9
...
@@ -131,8 +131,8 @@ public class CouponService implements InitializingBean {
...
@@ -131,8 +131,8 @@ public class CouponService implements InitializingBean {
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
rollbackFor
=
Exception
.
class
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
rollbackFor
=
Exception
.
class
)
public
void
upadateOrderStatus
(
OilCouponOrderStatusRequest
request
)
{
public
void
upadateOrderStatus
(
OilCouponOrderStatusRequest
request
)
{
//
未发放成功
//
发放中不处理
if
(
request
.
getStatus
()
!=
1
)
{
if
(
request
.
getStatus
()
!=
1
||
request
.
getStatus
()
!=
2
)
{
return
;
return
;
}
}
// 验证订单号是否存在
// 验证订单号是否存在
...
@@ -141,15 +141,18 @@ public class CouponService implements InitializingBean {
...
@@ -141,15 +141,18 @@ public class CouponService implements InitializingBean {
return
;
return
;
}
}
Date
now
=
new
Date
();
Date
now
=
new
Date
();
order
.
setAcquireDate
(
now
);
order
.
setStatus
(
request
.
getStatus
());
order
.
setStatus
(
request
.
getStatus
());
order
.
setFaceValue
(
request
.
getFaceValue
());
order
.
setFaceValue
(
request
.
getFaceValue
());
// 发放成功
if
(
request
.
getStatus
()
==
1
)
{
order
.
setAcquireDate
(
now
);
if
(!
"null"
.
equals
(
request
.
getStart
()))
{
if
(!
"null"
.
equals
(
request
.
getStart
()))
{
order
.
setCouponStartDate
(
request
.
getStart
());
order
.
setCouponStartDate
(
request
.
getStart
());
}
}
if
(!
"null"
.
equals
(
request
.
getEnd
()))
{
if
(!
"null"
.
equals
(
request
.
getEnd
()))
{
order
.
setCouponEndDate
(
request
.
getEnd
());
order
.
setCouponEndDate
(
request
.
getEnd
());
}
}
}
order
.
setUpdatedBy
(
"outCallbackSystem"
);
order
.
setUpdatedBy
(
"outCallbackSystem"
);
order
.
setUpdatedDate
(
now
);
order
.
setUpdatedDate
(
now
);
// 更新订单状态
// 更新订单状态
...
@@ -172,6 +175,7 @@ public class CouponService implements InitializingBean {
...
@@ -172,6 +175,7 @@ public class CouponService implements InitializingBean {
log
.
info
(
"kafka topic platmall_biznotiy_topic --> {}"
,
record
);
log
.
info
(
"kafka topic platmall_biznotiy_topic --> {}"
,
record
);
kafkaProducer
.
send
(
new
ProducerRecord
(
"platmall_biznotiy_topic"
,
record
));
kafkaProducer
.
send
(
new
ProducerRecord
(
"platmall_biznotiy_topic"
,
record
));
}
}
private
BizOrderNotifyMessage
buildOrderStatusNotice
(
OilCouponOrder
order
)
{
private
BizOrderNotifyMessage
buildOrderStatusNotice
(
OilCouponOrder
order
)
{
return
BizOrderNotifyMessage
.
builder
()
return
BizOrderNotifyMessage
.
builder
()
.
messageType
(
BizMessageTypeEnum
.
MessageTypeEnum
.
OIL_COUPON_ORDER
.
getValue
())
.
messageType
(
BizMessageTypeEnum
.
MessageTypeEnum
.
OIL_COUPON_ORDER
.
getValue
())
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment