Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SiEn
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
SiEn
Commits
f1482e70
Commit
f1482e70
authored
Nov 12, 2020
by
giaogiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加商家驳回理由
parent
6f267d1b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
3 deletions
+12
-3
api-merchant/src/main/java/com/jumeirah/api/merchant/controller/order/McStrokeController.java
+1
-1
api-merchant/src/main/java/com/jumeirah/api/merchant/entity/param/StrokeCancelParam.java
+4
-0
common/src/main/java/com/jumeirah/common/entity/Stroke.java
+4
-0
common/src/main/java/com/jumeirah/common/service/StrokeService.java
+1
-1
common/src/main/java/com/jumeirah/common/service/impl/StrokeServiceImpl.java
+2
-1
No files found.
api-merchant/src/main/java/com/jumeirah/api/merchant/controller/order/McStrokeController.java
View file @
f1482e70
...
...
@@ -152,7 +152,7 @@ public class McStrokeController extends BaseController {
@RequiresPermissions
(
"merchant:order:edit"
)
public
ApiResult
<
Boolean
>
cancel
(
@Validated
@RequestBody
StrokeCancelParam
strokeCancelParam
)
throws
Exception
{
boolean
flag
=
strokeService
.
cancel
(
strokeCancelParam
.
getId
());
boolean
flag
=
strokeService
.
cancel
(
strokeCancelParam
.
getId
()
,
strokeCancelParam
.
getRefusalReason
()
);
return
ApiResult
.
result
(
flag
);
}
...
...
api-merchant/src/main/java/com/jumeirah/api/merchant/entity/param/StrokeCancelParam.java
View file @
f1482e70
...
...
@@ -7,6 +7,7 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
/**
...
...
@@ -26,5 +27,8 @@ public class StrokeCancelParam extends BaseEntity {
@ApiModelProperty
(
"主键ID"
)
private
Long
id
;
@NotBlank
(
message
=
"商家驳回理由不能为空"
)
@ApiModelProperty
(
"商家驳回理由"
)
private
String
refusalReason
;
}
common/src/main/java/com/jumeirah/common/entity/Stroke.java
View file @
f1482e70
...
...
@@ -174,4 +174,8 @@ public class Stroke extends BaseEntity {
@ApiModelProperty
(
"付款渠道,0-线下渠道,1-线上渠道"
)
private
Integer
paymentChannel
;
@NotBlank
(
message
=
"商家驳回理由不能为空"
)
@ApiModelProperty
(
"商家驳回理由"
)
private
String
refusalReason
;
}
common/src/main/java/com/jumeirah/common/service/StrokeService.java
View file @
f1482e70
...
...
@@ -41,7 +41,7 @@ public interface StrokeService extends BaseService<Stroke> {
boolean
updateStroke
(
Stroke
stroke
)
throws
Exception
;
boolean
cancel
(
Long
id
)
throws
Exception
;
boolean
cancel
(
Long
id
,
String
refusalReason
)
throws
Exception
;
/**
* 删除
...
...
common/src/main/java/com/jumeirah/common/service/impl/StrokeServiceImpl.java
View file @
f1482e70
...
...
@@ -69,11 +69,12 @@ public class StrokeServiceImpl extends BaseServiceImpl<StrokeMapper, Stroke> imp
}
@Override
public
boolean
cancel
(
Long
id
)
throws
Exception
{
public
boolean
cancel
(
Long
id
,
String
refusalReason
)
throws
Exception
{
// 修改订单状态为取消
Stroke
stroke
=
new
Stroke
();
stroke
.
setId
(
id
)
.
setRefusalReason
(
refusalReason
)
.
setStatus
(
StrokeStatusEnum
.
CANCEL
.
getCode
())
.
setUpdateTime
(
new
Timestamp
(
System
.
currentTimeMillis
()));
boolean
b
=
super
.
updateById
(
stroke
);
...
...
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