Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pension
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mengmeng
pension
Commits
d68e945d
Commit
d68e945d
authored
Mar 11, 2021
by
mlchun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.添加 老人、子女取消订单接口
parent
f50ca1bd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
PensionOrderController.java
...dules/serviceOrder/controller/PensionOrderController.java
+20
-0
PensionOrderService.java
...mit/modules/serviceOrder/service/PensionOrderService.java
+4
-0
PensionOrderServiceImpl.java
...es/serviceOrder/service/impl/PensionOrderServiceImpl.java
+13
-0
No files found.
hmit-api/src/main/java/io/hmit/modules/serviceOrder/controller/PensionOrderController.java
View file @
d68e945d
...
@@ -246,6 +246,26 @@ public class PensionOrderController {
...
@@ -246,6 +246,26 @@ public class PensionOrderController {
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
}
}
/**
* 老人、子女取消订单
*/
@Login
@GetMapping
(
"elderFamilyCancel"
)
@ApiOperation
(
value
=
"老人、子女取消订单"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"订单ID"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"long"
)
,
@ApiImplicitParam
(
name
=
"cancel_reason"
,
value
=
"订单取消原因"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
public
Result
elderFamilyCancel
(
@ApiIgnore
@LoginUser
UserEntity
user
,
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
Boolean
result
=
pensionOrderService
.
elderFamilyCancel
(
Long
.
parseLong
(
params
.
get
(
"id"
).
toString
()),
params
.
get
(
"cancel_reason"
).
toString
());
if
(!
result
)
{
return
new
Result
().
error
();
}
return
new
Result
();
}
//新订单接口
//新订单接口
@GetMapping
(
"{id}"
)
@GetMapping
(
"{id}"
)
...
...
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/PensionOrderService.java
View file @
d68e945d
...
@@ -48,6 +48,10 @@ public interface PensionOrderService extends CrudService<PensionOrderEntity, Pen
...
@@ -48,6 +48,10 @@ public interface PensionOrderService extends CrudService<PensionOrderEntity, Pen
//查询机构订单
//查询机构订单
PageData
<
PensionOrderDTO
>
getOrganizationOrder
(
Map
<
String
,
Object
>
params
,
Long
userId
);
PageData
<
PensionOrderDTO
>
getOrganizationOrder
(
Map
<
String
,
Object
>
params
,
Long
userId
);
//机构处理订单状态
Boolean
organizationHandle
(
Map
<
String
,
Object
>
params
,
Long
userId
);
Boolean
organizationHandle
(
Map
<
String
,
Object
>
params
,
Long
userId
);
//老人、子女取消订单
Boolean
elderFamilyCancel
(
Long
id
,
String
reason
);
}
}
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionOrderServiceImpl.java
View file @
d68e945d
...
@@ -201,6 +201,19 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
...
@@ -201,6 +201,19 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
return
true
;
return
true
;
}
}
@Override
public
Boolean
elderFamilyCancel
(
Long
id
,
String
reason
)
{
PensionOrderEntity
pensionOrderEntity
=
pensionOrderDao
.
selectById
(
id
);
if
(
null
!=
pensionOrderEntity
.
getStatus
()
&&
pensionOrderEntity
.
getStatus
()
!=
2
&&
pensionOrderEntity
.
getStatus
()
!=
4
)
{
pensionOrderEntity
.
setStatus
(
3
);
pensionOrderEntity
.
setStatusName
(
Constant
.
OrderStatus
.
CANCEL
.
getMessage
());
pensionOrderEntity
.
setCancelReason
(
reason
);
update
(
ConvertUtils
.
sourceToTarget
(
pensionOrderEntity
,
PensionOrderDTO
.
class
));
return
true
;
}
return
false
;
}
//对List进行手动分页
//对List进行手动分页
private
List
<
PensionOrderDTO
>
getSubList
(
Map
<
String
,
Object
>
params
,
List
<
PensionOrderDTO
>
list
){
private
List
<
PensionOrderDTO
>
getSubList
(
Map
<
String
,
Object
>
params
,
List
<
PensionOrderDTO
>
list
){
Integer
pageNum
=
Integer
.
parseInt
(
params
.
get
(
"page"
).
toString
());
Integer
pageNum
=
Integer
.
parseInt
(
params
.
get
(
"page"
).
toString
());
...
...
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