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
d4799cea
Commit
d4799cea
authored
May 08, 2021
by
Shen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 部分接口添加推送功能
parent
8422f765
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
2 deletions
+9
-2
SwaggerConfig.java
hmit-api/src/main/java/io/hmit/config/SwaggerConfig.java
+1
-1
PensionOrderController.java
...dules/serviceOrder/controller/PensionOrderController.java
+5
-0
PensionOrderServiceImpl.java
...es/serviceOrder/service/impl/PensionOrderServiceImpl.java
+2
-0
PushMessageImpl.java
...i/src/main/java/io/hmit/service/impl/PushMessageImpl.java
+1
-1
No files found.
hmit-api/src/main/java/io/hmit/config/SwaggerConfig.java
View file @
d4799cea
...
...
@@ -27,7 +27,7 @@ public class SwaggerConfig {
@Bean
public
Docket
createRestApi
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
//
.host("byyl.zjhmit.com")
.
host
(
"byyl.zjhmit.com"
)
.
apiInfo
(
apiInfo
())
.
select
()
//加了ApiOperation注解的类,才生成接口文档
...
...
hmit-api/src/main/java/io/hmit/modules/serviceOrder/controller/PensionOrderController.java
View file @
d4799cea
...
...
@@ -16,6 +16,7 @@ import io.hmit.modules.serviceOrder.dto.PensionOrderDTO;
import
io.hmit.modules.serviceOrder.dto.ReservationDTO
;
import
io.hmit.modules.serviceOrder.dto.StaffFinishDTO
;
import
io.hmit.modules.serviceOrder.service.*
;
import
io.hmit.service.PushMessage
;
import
io.hmit.service.UserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
...
...
@@ -54,6 +55,9 @@ public class PensionOrderController {
@Autowired
private
PensionServiceService
pensionServiceService
;
@Autowired
private
PushMessage
pushMessage
;
@Login
@GetMapping
(
"page"
)
@ApiOperation
(
"全部订单(志愿者)"
)
...
...
@@ -190,6 +194,7 @@ public class PensionOrderController {
pensionOrderDTO
.
setStatus
(
Constant
.
OrderStatus
.
ORDER
.
geStatus
());
pensionOrderDTO
.
setStatusName
(
"已接单"
);
pensionOrderService
.
update
(
pensionOrderDTO
);
pushMessage
.
sendWeChatMsg
(
pensionOrderDTO
,
userService
.
getUserByUserId
(
pensionOrderDTO
.
getCreator
()).
getOpenid
());
return
new
Result
();
}
...
...
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionOrderServiceImpl.java
View file @
d4799cea
...
...
@@ -235,6 +235,7 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
pensionOrderEntity
.
setContent
(
dto
.
getContent
());
pensionOrderEntity
.
setLocation
(
dto
.
getLocation
());
update
(
ConvertUtils
.
sourceToTarget
(
pensionOrderEntity
,
PensionOrderDTO
.
class
));
pushMessage
.
sendWeChatMsg
(
ConvertUtils
.
sourceToTarget
(
pensionOrderEntity
,
PensionOrderDTO
.
class
),
userService
.
getUserByUserId
(
pensionOrderEntity
.
getCreator
()).
getOpenid
());
}
//对List进行手动分页
...
...
@@ -300,6 +301,7 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
}
update
(
pensionOrderDTO
);
// saveFilesToDB(dto.getOrderId(),dto.getFiles(),dto.getRoleId());
pushMessage
.
sendWeChatMsg
(
pensionOrderDTO
,
userService
.
getUserByUserId
(
pensionOrderDTO
.
getCreator
()).
getOpenid
());
}
}
hmit-api/src/main/java/io/hmit/service/impl/PushMessageImpl.java
View file @
d4799cea
...
...
@@ -54,7 +54,7 @@ public class PushMessageImpl implements PushMessage {
new
WxMpTemplateData
(
"keyword2"
,
pensionOrderDTO
.
getId
().
toString
()),
new
WxMpTemplateData
(
"keyword3"
,
pensionOrderDTO
.
getServiceName
()),
new
WxMpTemplateData
(
"keyword4"
,
appointmentTime
),
new
WxMpTemplateData
(
"remark"
,
"
备注:"
+
pensionOrderDTO
.
getRemark
())
new
WxMpTemplateData
(
"remark"
,
"
当前状态:"
+
pensionOrderDTO
.
getStatusName
())
);
templateMessage
.
setData
(
data
);
try
{
...
...
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