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
eb9b9252
Commit
eb9b9252
authored
Jan 03, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
ef53beaa
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
15 deletions
+55
-15
TBusWarningController.java
.../v1/business/controller/system/TBusWarningController.java
+4
-4
TBusWarningService.java
...d/plus/v1/business/service/system/TBusWarningService.java
+4
-5
TBusWarningServiceImpl.java
.../business/service/system/impl/TBusWarningServiceImpl.java
+2
-5
DaprBusinessProperties.java
...us/v1/yifu/common/dapr/config/DaprBusinessProperties.java
+39
-0
daprConfig.properties
...yifu-common-dapr/src/main/resources/daprConfig.properties
+5
-1
BusinessTask.java
...java/com/yifu/cloud/plus/v1/job/compont/BusinessTask.java
+1
-0
No files found.
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/controller/system/TBusWarningController.java
View file @
eb9b9252
...
...
@@ -61,8 +61,8 @@ public class TBusWarningController {
*/
@Operation
(
summary
=
"获取所有要自动发送的主表,以及人员信息进行定时任务发送"
,
description
=
"获取所有要自动发送的主表,以及人员信息进行定时任务发送"
)
@PostMapping
(
"/inner/doBatchSendBusSms"
)
public
R
<
Boolean
>
doBatchSendBusSms
()
{
return
tBusWarningService
.
doBatchSendBusSms
();
public
void
doBatchSendBusSms
()
{
tBusWarningService
.
doBatchSendBusSms
();
}
/**
...
...
@@ -74,8 +74,8 @@ public class TBusWarningController {
*/
@Operation
(
summary
=
"更新当日所有发送的短信状态"
,
description
=
"更新当日所有发送的短信状态"
)
@PostMapping
(
"/inner/doUpdateSendBusSmsStatus"
)
public
R
<
Boolean
>
doUpdateSendBusSmsStatus
()
{
return
tBusWarningService
.
doUpdateSendBusSmsStatus
(
DateUtil
.
getCurrentDateString
(
DateUtil
.
ISO_DATE_FORMAT
));
public
void
doUpdateSendBusSmsStatus
()
{
tBusWarningService
.
doUpdateSendBusSmsStatus
(
DateUtil
.
getCurrentDateString
(
DateUtil
.
ISO_DATE_FORMAT
));
}
}
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/service/system/TBusWarningService.java
View file @
eb9b9252
...
...
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.business.entity.system.TBusWarning
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
/**
* B端预警表
...
...
@@ -27,17 +26,17 @@ public interface TBusWarningService extends IService<TBusWarning> {
* @Description: 获取所有要自动发送的主表,以及人员信息进行定时任务发送短信
* @Author: hgw
* @Date: 2021/8/25 11:32
* @return:
com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @return:
**/
R
<
Boolean
>
doBatchSendBusSms
();
void
doBatchSendBusSms
();
/**
* @param dateStr
* @Description: 更新当日所有发送的短信状态
* @Author: hgw
* @Date: 2021/8/25 11:32
* @return:
com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @return:
**/
R
<
Boolean
>
doUpdateSendBusSmsStatus
(
String
dateStr
);
void
doUpdateSendBusSmsStatus
(
String
dateStr
);
}
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/service/system/impl/TBusWarningServiceImpl.java
View file @
eb9b9252
...
...
@@ -13,7 +13,6 @@ import com.yifu.cloud.plus.v1.business.service.system.TBusWarningService;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
...
...
@@ -56,7 +55,7 @@ public class TBusWarningServiceImpl extends ServiceImpl<TBusWarningMapper, TBusW
* @Date 2021-8-23 16:47:44
*/
@Override
public
R
<
Boolean
>
doBatchSendBusSms
()
{
public
void
doBatchSendBusSms
()
{
List
<
TBusWarning
>
smsInfoList
=
this
.
getTBusWarningListByAuto
();
if
(
Common
.
isNotNull
(
smsInfoList
))
{
List
<
TBusWarningEmployee
>
smsEmployeeList
;
...
...
@@ -65,7 +64,6 @@ public class TBusWarningServiceImpl extends ServiceImpl<TBusWarningMapper, TBusW
this
.
doSendOne
(
smsEmployeeList
,
smsInfo
);
}
}
return
R
.
ok
(
null
,
CommonConstants
.
RESULT_DATA_SUCESS
);
}
private
void
doSendOne
(
List
<
TBusWarningEmployee
>
smsEmployeeList
,
TBusWarning
smsInfo
)
{
...
...
@@ -125,7 +123,7 @@ public class TBusWarningServiceImpl extends ServiceImpl<TBusWarningMapper, TBusW
* @Date 2021-8-23 16:47:52
*/
@Override
public
R
<
Boolean
>
doUpdateSendBusSmsStatus
(
String
dateStr
)
{
public
void
doUpdateSendBusSmsStatus
(
String
dateStr
)
{
List
<
TBusWarningEmployee
>
smsEmployeeList
=
busWarningEmployeeService
.
getTBusWarningEmployeeListToday
(
dateStr
);
if
(
Common
.
isNotNull
(
smsEmployeeList
))
{
QuerySendResult
res
;
...
...
@@ -142,7 +140,6 @@ public class TBusWarningServiceImpl extends ServiceImpl<TBusWarningMapper, TBusW
}
}
busWarningEmployeeService
.
updateBatchById
(
smsEmployeeList
);
return
R
.
ok
(
null
,
CommonConstants
.
RESULT_DATA_SUCESS
);
}
/**
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/config/DaprBusinessProperties.java
0 → 100644
View file @
eb9b9252
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 hgw
* @Date 2022-7-27 19:38:08
* @Description
* @Version 1.0
*/
@Data
@Component
@PropertySource
(
"classpath:daprConfig.properties"
)
@ConfigurationProperties
(
value
=
"dapr.business"
,
ignoreInvalidFields
=
false
)
public
class
DaprBusinessProperties
{
/*
* @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-common/yifu-common-dapr/src/main/resources/daprConfig.properties
View file @
eb9b9252
...
...
@@ -21,4 +21,8 @@ dapr.salary.appId=yifu-salary
#\u6D4B\u8BD5\u73AF\u5883-\u793E\u4FDD\u670D\u52A1
dapr.social.appUrl
=
http://yifu-social.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.social.appId
=
yifu-social
\ No newline at end of file
dapr.social.appId
=
yifu-social
#\u6D4B\u8BD5\u73AF\u5883-B\u7AEF\u670D\u52A1
dapr.business.appUrl
=
http://yifu-business.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.business.appId
=
yifu-business
\ No newline at end of file
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/BusinessTask.java
0 → 100644
View file @
eb9b9252
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.DaprBusinessProperties
;
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 wangweiguo * @description hrob端微服务定时任务 * @date 22:31 2021/8/17 **/
@Component
(
value
=
"businessTask"
)
@Slf4j
@EnableConfigurationProperties
(
DaprBusinessProperties
.
class
)
public
class
BusinessTask
{
@Autowired
private
DaprBusinessProperties
daprBusinessProperties
;
// // /** // * @author wangweiguo // * @description 每天初始化年假信息 // * @date 22:35 2021/8/17 // * @return void // **/ // public void buildMonitorData() { // remoteVacationMonitorService.buildMonitorData(SecurityConstants.FROM_IN); // } // /** // * @author fxj // * @description 每天更新证件状态 // * @date 2021-08-23 // * @return void // **/ // public void updateCertStatusTask() { // log.info("------------扫描定时任务开始:定时更新B端证据状态信息开始------------"); // remoteBusinessService.updateCertStatusTask(SecurityConstants.FROM_IN); // log.info("------------扫描定时任务开始:定时更新B端证据状态信息结束------------"); // } /** * @Description: 发送短信定时任务 * @Author: hgw * @Date: 2021/8/25 9:35 * @return: void **/ public void doBatchSendBusSms(){ log.info("------------发送短信定时任务-开始------------"); HttpDaprUtil.invokeMethodPost(daprBusinessProperties.getAppUrl(), daprBusinessProperties.getAppId(), "/tbuswarning/inner/doBatchSendBusSms", "", Object.class, SecurityConstants.FROM_IN); log.info("------------发送短信定时任务-结束------------"); } /** * @Description: 短信状态更新定时任务 * @Author: hgw * @Date: 2021/8/25 9:35 * @return: void **/ public void doUpdateSendBusSmsStatus(){ log.info("------------短信状态更新定时任务-开始------------"); HttpDaprUtil.invokeMethodPost(daprBusinessProperties.getAppUrl(), daprBusinessProperties.getAppId(), "/tbuswarning/inner/doUpdateSendBusSmsStatus", "", Object.class, SecurityConstants.FROM_IN); log.info("------------短信状态更新定时任务-结束------------"); } }
\ No newline at end of file
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