Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
刘栋
/
infynova-udi
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3837ed15
authored
May 17, 2024
by
刘栋
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
UDI-定时任务中设定创建人ID
parent
b7150e10
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
3 deletions
saas-udi-service/src/main/java/com/infynova/udi/mapper/TaskMapper.java
saas-udi-service/src/main/java/com/infynova/udi/service/helper/MatchHelper.java
saas-udi-service/src/main/java/com/infynova/udi/service/helper/TaskUploadHelper.java
saas-udi-service/src/main/java/com/infynova/udi/service/impl/TaskServiceImpl.java
saas-udi-service/src/main/resources/mapper/TaskMapper.xml
saas-udi-service/src/main/java/com/infynova/udi/mapper/TaskMapper.java
View file @
3837ed15
...
...
@@ -8,6 +8,8 @@ import com.infynova.udi.mapper.base.SuperMapper;
import
com.infynova.udi.vo.UdiMatchListVo
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @author liudong
* 2024/2/29 16:41
...
...
@@ -18,4 +20,6 @@ public interface TaskMapper extends SuperMapper<Task> {
Page
<
UdiMatchListVo
>
queryTaskPage
(
IPage
page
,
@Param
(
"query"
)
UdiMatchTaskListQry
udiMatchTaskListQry
);
Task
queryTaskNo
(
@Param
(
"taskNo"
)
String
taskNo
);
List
<
Task
>
getUploadingTask
();
}
saas-udi-service/src/main/java/com/infynova/udi/service/helper/MatchHelper.java
View file @
3837ed15
...
...
@@ -2,6 +2,8 @@ package com.infynova.udi.service.helper;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.infynova.common.core.context.HeaderCode
;
import
com.infynova.common.core.context.SpringContextUtils
;
import
com.infynova.udi.entity.MatchData
;
import
com.infynova.udi.entity.MatchTemp
;
import
com.infynova.udi.enums.match.MatchStatusEnum
;
...
...
@@ -108,6 +110,8 @@ public class MatchHelper {
TaskVo
taskVo
=
taskHelper
.
getTaskVo
(
taskId
);
log
.
info
(
"对码匹配-taskNo:{}"
,
taskVo
.
getTask
().
getTaskNo
());
SpringContextUtils
.
set
(
HeaderCode
.
IDENTITY_ID
,
String
.
valueOf
(
taskVo
.
getTask
().
getCreateBy
()));
SpringContextUtils
.
set
(
HeaderCode
.
TENANT_ID
,
String
.
valueOf
(
taskVo
.
getTask
().
getCreateBy
()));
while
(
true
){
// 查询未开始的数据
...
...
saas-udi-service/src/main/java/com/infynova/udi/service/helper/TaskUploadHelper.java
View file @
3837ed15
...
...
@@ -5,6 +5,8 @@ import cn.hutool.core.date.LocalDateTimeUtil;
import
cn.hutool.core.io.FileUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.read.listener.PageReadListener
;
import
com.infynova.common.core.context.HeaderCode
;
import
com.infynova.common.core.context.SpringContextUtils
;
import
com.infynova.udi.entity.MatchData
;
import
com.infynova.udi.entity.Task
;
import
com.infynova.udi.enums.match.MatchStatusEnum
;
...
...
@@ -79,6 +81,8 @@ public class TaskUploadHelper {
log
.
info
(
"任务上传转换定时执行-此次处理的任务数量:{}"
,
uploadingTaskList
.
size
());
}
for
(
Task
uploadingTask
:
uploadingTaskList
)
{
SpringContextUtils
.
set
(
HeaderCode
.
IDENTITY_ID
,
String
.
valueOf
(
uploadingTask
.
getCreateBy
()));
SpringContextUtils
.
set
(
HeaderCode
.
TENANT_ID
,
String
.
valueOf
(
uploadingTask
.
getCreateBy
()));
tranUpload
(
uploadingTask
.
getId
());
}
}
...
...
saas-udi-service/src/main/java/com/infynova/udi/service/impl/TaskServiceImpl.java
View file @
3837ed15
...
...
@@ -191,9 +191,7 @@ public class TaskServiceImpl extends BaseService implements TaskService {
*/
@Override
public
List
<
Task
>
getUploadingTask
()
{
LambdaQueryWrapper
<
Task
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
Task:
:
getTaskStatus
,
TaskStatusEnum
.
UPLOADING
.
getCode
());
return
taskMapper
.
selectList
(
queryWrapper
);
return
taskMapper
.
getUploadingTask
();
}
/**
...
...
saas-udi-service/src/main/resources/mapper/TaskMapper.xml
View file @
3837ed15
...
...
@@ -36,4 +36,14 @@
where
t.task_no = #{taskNo}
</select>
<select
id=
"getUploadingTask"
resultType=
"com.infynova.udi.entity.Task"
>
select
t.*
from
task as t
where
t.task_status = 10
limit 10
</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