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
80127ce8
Commit
80127ce8
authored
May 14, 2021
by
Shen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 更新微信推送模板id
2. 更新枚举类字段 3. 添加更新活动状态接口 4. 修复移动端机构人员信息
parent
2723f560
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
60 additions
and
16 deletions
+60
-16
PensionEventController.java
...dules/serviceOrder/controller/PensionEventController.java
+14
-0
PensionEventService.java
...mit/modules/serviceOrder/service/PensionEventService.java
+2
-0
PensionEventServiceImpl.java
...es/serviceOrder/service/impl/PensionEventServiceImpl.java
+27
-0
PensionOrderController.java
...dules/serviceOrder/controller/PensionOrderController.java
+1
-1
PensionOrderServiceImpl.java
...es/serviceOrder/service/impl/PensionOrderServiceImpl.java
+3
-3
PushMessage.java
hmit-api/src/main/java/io/hmit/service/PushMessage.java
+1
-1
PushMessageImpl.java
...i/src/main/java/io/hmit/service/impl/PushMessageImpl.java
+6
-6
application.yml
hmit-api/src/main/resources/application.yml
+1
-1
PensionOrganizationServiceDao.xml
...ces/mapper/serviceOrder/PensionOrganizationServiceDao.xml
+3
-2
EventEnum.java
...-common/src/main/java/io/hmit/common/enums/EventEnum.java
+2
-2
No files found.
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/controller/PensionEventController.java
View file @
80127ce8
...
...
@@ -81,6 +81,20 @@ public class PensionEventController {
return
new
Result
<
PensionEventDTO
>().
ok
(
data
);
}
@PostMapping
(
"updateStatus"
)
@ApiOperation
(
"更新活动状态"
)
@LogOperation
(
"更新活动状态"
)
@RequiresPermissions
(
"serviceOrder:pensionevent:save"
)
public
Result
updateStatus
(
@RequestParam
(
"eventId"
)
Long
id
,
@RequestParam
(
"status"
)
Integer
status
,
@RequestParam
(
value
=
"endDesc"
,
required
=
false
)
String
endDesc
,
@RequestParam
(
value
=
"eventClock"
,
required
=
false
)
String
eventClock
)
{
pensionEventService
.
updateStatus
(
id
,
status
,
endDesc
,
eventClock
);
return
new
Result
();
}
@PostMapping
@ApiOperation
(
"保存"
)
@LogOperation
(
"保存"
)
...
...
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/service/PensionEventService.java
View file @
80127ce8
...
...
@@ -12,4 +12,6 @@ import io.hmit.modules.serviceOrder.entity.PensionEventEntity;
*/
public
interface
PensionEventService
extends
CrudService
<
PensionEventEntity
,
PensionEventDTO
>
{
PensionEventDTO
updateStatus
(
Long
id
,
Integer
status
,
String
endDesc
,
String
eventClock
);
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionEventServiceImpl.java
View file @
80127ce8
package
io
.
hmit
.
modules
.
serviceOrder
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.hmit.common.enums.EventEnum
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.common.utils.ConvertUtils
;
import
io.hmit.modules.serviceOrder.dao.PensionEventDao
;
import
io.hmit.modules.serviceOrder.dto.PensionEventDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionEventEntity
;
...
...
@@ -31,4 +33,29 @@ public class PensionEventServiceImpl extends CrudServiceImpl<PensionEventDao, Pe
}
@Override
public
PensionEventDTO
updateStatus
(
Long
id
,
Integer
status
,
String
endDesc
,
String
eventClock
)
{
PensionEventEntity
pensionEventEntity
=
selectById
(
id
);
if
(
status
.
equals
(
EventEnum
.
SUCCESS
.
getCode
()))
{
//开始报名 / 发布
if
(
pensionEventEntity
.
getStatus
().
equals
(
EventEnum
.
NEW
.
getCode
())){
pensionEventEntity
.
setStatus
(
EventEnum
.
SUCCESS
.
getCode
());
}
}
else
if
(
status
.
equals
(
EventEnum
.
OVER
.
getCode
()))
{
//停止报名
if
(
pensionEventEntity
.
getStatus
().
equals
(
EventEnum
.
NEW
.
getCode
())){
pensionEventEntity
.
setStatus
(
EventEnum
.
OVER
.
getCode
());
}
}
else
if
(
status
.
equals
(
EventEnum
.
COMPLETE
.
getCode
()))
{
//活动结束
if
(
pensionEventEntity
.
getStatus
().
equals
(
EventEnum
.
OVER
.
getCode
())){
pensionEventEntity
.
setStatus
(
EventEnum
.
COMPLETE
.
getCode
());
pensionEventEntity
.
setEventClock
(
eventClock
);
pensionEventEntity
.
setEventEndDescribe
(
endDesc
);
}
}
else
if
(
status
.
equals
(
EventEnum
.
HIDDEN
.
getCode
())){
//活动隐藏
if
(
pensionEventEntity
.
getStatus
().
equals
(
EventEnum
.
COMPLETE
.
getCode
())){
pensionEventEntity
.
setStatus
(
EventEnum
.
HIDDEN
.
getCode
());
}
}
update
(
ConvertUtils
.
sourceToTarget
(
pensionEventEntity
,
PensionEventDTO
.
class
));
return
null
;
}
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/serviceOrder/controller/PensionOrderController.java
View file @
80127ce8
...
...
@@ -194,7 +194,7 @@ public class PensionOrderController {
pensionOrderDTO
.
setStatus
(
Constant
.
OrderStatus
.
ORDER
.
geStatus
());
pensionOrderDTO
.
setStatusName
(
"已接单"
);
pensionOrderService
.
update
(
pensionOrderDTO
);
pushMessage
.
sendWeChatMsg
(
pensionOrderDTO
,
userService
.
getUserByUserId
(
pensionOrderDTO
.
getCreator
()).
getOpenid
());
pushMessage
.
sendWeChatMsg
(
pensionOrderDTO
,
userService
.
getUserByUserId
(
pensionOrderDTO
.
getCreator
()).
getOpenid
()
,
"oldman"
);
return
new
Result
();
}
...
...
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionOrderServiceImpl.java
View file @
80127ce8
...
...
@@ -91,7 +91,7 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
save
(
pensionOrderDTO
);
PensionOrderServiceDTO
orderServiceDTO
=
new
PensionOrderServiceDTO
().
assemblePensionOrderService
(
pensionOrderDTO
);
pensionOrderServiceService
.
save
(
orderServiceDTO
);
pushMessage
.
sendWeChatMsg
(
pensionOrderDTO
,
userService
.
getUserByUserId
(
pensionOrderDTO
.
getCreator
()).
getOpenid
());
pushMessage
.
sendWeChatMsg
(
pensionOrderDTO
,
userService
.
getUserByUserId
(
pensionOrderDTO
.
getCreator
()).
getOpenid
()
,
"oldman"
);
// pushMessage.sendSMSMsg(pensionOrderDTO, userService.getUserByUserId(pensionOrderDTO.getCreator()).getOpenid());
}
...
...
@@ -251,7 +251,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
());
pushMessage
.
sendWeChatMsg
(
ConvertUtils
.
sourceToTarget
(
pensionOrderEntity
,
PensionOrderDTO
.
class
),
userService
.
getUserByUserId
(
pensionOrderEntity
.
getCreator
()).
getOpenid
()
,
"oldman"
);
}
//对List进行手动分页
...
...
@@ -317,7 +317,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
());
pushMessage
.
sendWeChatMsg
(
pensionOrderDTO
,
userService
.
getUserByUserId
(
pensionOrderDTO
.
getCreator
()).
getOpenid
()
,
"oldman"
);
}
}
hmit-api/src/main/java/io/hmit/service/PushMessage.java
View file @
80127ce8
...
...
@@ -4,7 +4,7 @@ import io.hmit.modules.serviceOrder.dto.PensionOrderDTO;
public
interface
PushMessage
{
void
sendWeChatMsg
(
PensionOrderDTO
pensionOrderDTO
,
String
openId
);
void
sendWeChatMsg
(
PensionOrderDTO
pensionOrderDTO
,
String
openId
,
String
flag
);
void
sendSMSMsg
(
PensionOrderDTO
pensionOrderDTO
,
String
receiver
);
...
...
hmit-api/src/main/java/io/hmit/service/impl/PushMessageImpl.java
View file @
80127ce8
...
...
@@ -44,7 +44,7 @@ public class PushMessageImpl implements PushMessage {
private
SmsService
smsService
;
@Override
public
void
sendWeChatMsg
(
PensionOrderDTO
pensionOrderDTO
,
String
openId
)
{
public
void
sendWeChatMsg
(
PensionOrderDTO
pensionOrderDTO
,
String
openId
,
String
flag
)
{
WxMpTemplateMessage
templateMessage
=
new
WxMpTemplateMessage
();
templateMessage
.
setTemplateId
(
wechatAccountConfig
.
getTemplateId
());
templateMessage
.
setToUser
(
openId
);
...
...
@@ -54,14 +54,14 @@ public class PushMessageImpl implements PushMessage {
List
<
WxMpTemplateData
>
data
=
Arrays
.
asList
(
new
WxMpTemplateData
(
"first"
,
"【智慧养老】您的订单提醒"
),
new
WxMpTemplateData
(
"keyword1"
,
pensionOrderDTO
.
getServiceName
()),
new
WxMpTemplateData
(
"keyword2"
,
pensionOrderDTO
.
getId
().
toString
()),
new
WxMpTemplateData
(
"keyword3"
,
pensionOrderDTO
.
getServiceName
()),
new
WxMpTemplateData
(
"keyword4"
,
appointmentTime
),
new
WxMpTemplateData
(
"keyword1"
,
pensionOrderDTO
.
getId
().
toString
()),
new
WxMpTemplateData
(
"keyword2"
,
pensionOrderDTO
.
getServiceName
()),
new
WxMpTemplateData
(
"keyword3"
,
appointmentTime
),
new
WxMpTemplateData
(
"remark"
,
"当前状态:"
+
pensionOrderDTO
.
getStatusName
())
);
templateMessage
.
setData
(
data
);
templateMessage
.
setUrl
(
SYSURL
+
"/?openid="
+
openId
+
"#/orderDetail?id="
+
pensionOrderDTO
.
getId
());
String
url
=
SYSURL
+
"/#/orderDetail/?openid="
+
openId
+
"&id="
+
pensionOrderDTO
.
getId
()+
"&flag="
+
flag
;
templateMessage
.
setUrl
(
url
);
try
{
wxMpService
.
getTemplateMsgService
().
sendTemplateMsg
(
templateMessage
);
}
catch
(
WxErrorException
e
){
...
...
hmit-api/src/main/resources/application.yml
View file @
80127ce8
...
...
@@ -83,4 +83,4 @@ wechat:
# mpAppId: wx6e3288074243a47f
mpAppSecret
:
f7b1120a49de078dd1be0080832ad42f
# mpAppSecret: 603d6ebf4db906bdb24eb9a1c0cbb444
templateId
:
_7PQQku6jHU4yE42NZIbX9cyvRWeeMSAGKhhs0uzWYM
\ No newline at end of file
templateId
:
gU3gtQxrwX0Z6khAL_9tuwzT83KlXk3oV6jbPNuNHbc
\ No newline at end of file
hmit-api/src/main/resources/mapper/serviceOrder/PensionOrganizationServiceDao.xml
View file @
80127ce8
...
...
@@ -12,8 +12,9 @@
</resultMap>
<select
id=
"findServiceIdListByServiceUserId"
resultType=
"Long"
>
SELECT pos.service_id FROM pension_organization_user pou, pension_organization_service pos
WHERE pou.organization_id = pos.organization_id and pou.user_id = #{userId}
SELECT pos.service_id FROM pension_organization_service pos,
(SELECT pou.organization_id, tu.id FROM pension_organization_user pou, tb_user tu WHERE pou.user_id = tu.user_id) pou
WHERE pos.organization_id = pou.organization_id and pou.id = #{userId}
</select>
</mapper>
\ No newline at end of file
hmit-common/src/main/java/io/hmit/common/enums/EventEnum.java
View file @
80127ce8
...
...
@@ -12,9 +12,9 @@ import lombok.Getter;
public
enum
EventEnum
{
NEW
(
0
,
"未发布(草稿)"
),
SUCCESS
(
1
,
"已发布(可报名)"
),
CANCEL
(
2
,
"结束报名"
),
OVER
(
2
,
"结束报名"
),
COMPLETE
(
3
,
"活动结束"
),
SIGNED
(
4
,
"隐藏"
),
HIDDEN
(
4
,
"隐藏"
),
;
private
Integer
code
;
...
...
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