Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
88edc9d1
Commit
88edc9d1
authored
Jun 13, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息提醒
parent
ab726e04
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
103 additions
and
18 deletions
+103
-18
DaprMsgProperties.java
...ud/plus/v1/yifu/common/dapr/config/DaprMsgProperties.java
+39
-0
MsgTask.java
...main/java/com/yifu/cloud/plus/v1/job/compont/MsgTask.java
+41
-0
MsgInfoController.java
.../yifu/cloud/plus/v1/msg/controller/MsgInfoController.java
+1
-1
MsgInfoServiceImpl.java
...fu/cloud/plus/v1/msg/service/impl/MsgInfoServiceImpl.java
+2
-2
MsgInfoMapper.xml
.../yifu-msg-biz/src/main/resources/mapper/MsgInfoMapper.xml
+20
-15
No files found.
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/config/DaprMsgProperties.java
0 → 100644
View file @
88edc9d1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
dapr
.
config
;
import
lombok.Data
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.stereotype.Component
;
/**
* @Author fxj
* @Date 2022/7/4
* @Description
* @Version 1.0
*/
@Data
@Component
@PropertySource
(
"classpath:daprConfig.properties"
)
@ConfigurationProperties
(
value
=
"dapr.msg"
,
ignoreInvalidFields
=
false
)
public
class
DaprMsgProperties
{
/*
* @author fxj
* @date 14:34
* @Description dapr sidercar url 如:http://localhost:3005/v1.0/invoke/
**/
String
appUrl
;
/*
* @author fxj
* @date 14:35
* @decription app_id 如:"yifu_upms_sider"
**/
String
appId
;
String
appPort
;
String
httpPort
;
String
grpcPort
;
String
metricsPort
;
}
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/MsgTask.java
0 → 100644
View file @
88edc9d1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
job
.
compont
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprMsgProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.stereotype.Component
;
/**
* @Author fxj
* @Description 定時任務--定时生成 超时提醒
* @Date 19:57 2023/5/30
* @Param
* @return
**/
@Component
(
value
=
"msgTask"
)
@Slf4j
@EnableConfigurationProperties
(
DaprMsgProperties
.
class
)
public
class
MsgTask
{
@Autowired
private
DaprMsgProperties
daprMsgProperties
;
/**
* @Author fxj
* @Description 每29分钟刷新 超时待办提醒
* @Date 20:01 2023/5/30
* @Param
* @return
**/
public
void
createOderOverTimeMsg
()
{
log
.
info
(
"-------------每29分钟刷新 超时待办提醒-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprMsgProperties
.
getAppUrl
(),
daprMsgProperties
.
getAppId
(),
"/msg/inner/updateOverTimeMsg"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每29分钟刷新 超时待办提醒定时任务结束------------"
);
}
}
\ No newline at end of file
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/controller/MsgInfoController.java
View file @
88edc9d1
...
...
@@ -86,7 +86,7 @@ public class MsgInfoController {
@Operation
(
summary
=
"每29分钟刷新 超时待办提醒"
,
description
=
"每29分钟刷新 超时待办提醒"
)
@Inner
@PostMapping
(
"/inner/updateOverTimeMsg"
)
public
void
everyMonthUpdateSalaryStatus
()
{
public
void
updateOverTimeMsg
()
{
msgInfoService
.
updateOverTimeMsg
();
}
}
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/service/impl/MsgInfoServiceImpl.java
View file @
88edc9d1
...
...
@@ -84,7 +84,7 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
if
(
Common
.
isNotNull
(
save
)){
save
.
setCreateTime
(
LocalDateTime
.
now
());
save
.
setUrl
(
MesConstants
.
orderUrl
+
vo
.
getOrderId
());
save
.
setAlertUser
(
vo
.
getAlertUser
());
save
.
setAlertUser
(
vo
.
getAlertUser
()
.
replace
(
"\""
,
""
)
);
baseMapper
.
insert
(
save
);
log
.
error
(
JSON
.
toJSONString
(
save
));
}
...
...
@@ -96,7 +96,7 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
save
.
setCreateTime
(
LocalDateTime
.
now
());
save
.
setUrl
(
MesConstants
.
orderUrl
+
save
.
getOrderId
());
save
.
setAlertType
(
CommonConstants
.
TWO_STRING
);
save
.
setAlertUser
(
vo
.
getAlertUser
());
save
.
setAlertUser
(
vo
.
getAlertUser
()
.
replace
(
"\""
,
""
)
);
baseMapper
.
insert
(
save
);
log
.
error
(
JSON
.
toJSONString
(
save
));
}
...
...
yifu-msg/yifu-msg-biz/src/main/resources/mapper/MsgInfoMapper.xml
View file @
88edc9d1
...
...
@@ -103,21 +103,26 @@
WHERE
a.fd_id = #{orderId} limit 1
</select>
<select
id=
"getMsgByTask"
resultMap=
"msgInfoMap"
>
select
<!-- 加急(2-3小时)|1 紧急(3-5小时)|4 常规(5-8小时)|7 -->
o.fd_name alertUser,
b1.fd_3ac901c5184274 orderNo,
b1.fd_id orderId,
'1' as alertType
FROM lbpm_workitem a
LEFT JOIN lbpm_node e on e.fd_id= a.fd_node_id
LEFT JOIN lbpm_process p on p.fd_id=e.fd_process_id
LEFT JOIN ekp_ea33075576149bb8a4f5 b1 on p.fd_model_id=b1.fd_id
LEFT JOIN sys_org_element o on o.fd_id=fd_expected_id
where
e.fd_fact_node_id='N5' and b1.fd_id is not null;
and DATE_ADD(NOW(),INTERVAL 30 MINUTE) > IF(b1.fd_3b779ba2168eea=1,DATE_ADD(a.fd_start_date,INTERVAL 3 HOUR),IF(b1.fd_3b779ba2168eea=4,DATE_ADD(a.fd_start_date,INTERVAL 5 HOUR),DATE_ADD(a.fd_start_date,INTERVAL 8 HOUR)))
<select
id=
"getMsgByTask"
resultMap=
"msgInfoMap"
>
SELECT * from (
SELECT
o.fd_no ALERT_USER,
b1.fd_3ac901c5184274 ORDER_NO,
b1.fd_id ORDER_ID,
'1' AS ALERT_TYPE,
DATE_ADD(NOW(), INTERVAL 30 MINUTE) as 'date1',
IF(b1.fd_3b779ba2168eea = 1,DATE_ADD(a.fd_start_date,INTERVAL 3 HOUR),IF(b1.fd_3b779ba2168eea = 4,DATE_ADD(a.fd_start_date,INTERVAL 5 HOUR),DATE_ADD(a.fd_start_date,INTERVAL 8 HOUR))) as 'date2'
FROM
lbpm_workitem a
LEFT JOIN lbpm_node e ON e.fd_id = a.fd_node_id
LEFT JOIN lbpm_process p ON p.fd_id = e.fd_process_id
LEFT JOIN ekp_ea33075576149bb8a4f5 b1 ON p.fd_model_id = b1.fd_id
LEFT JOIN sys_org_element o ON o.fd_id = fd_expected_id
WHERE
e.fd_fact_node_id = 'N5'
AND b1.fd_id IS NOT NULL
) x
where x.date1 > date2
</select>
</mapper>
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