-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat task执行底层提交(未完工),增加日志样式处理器,可以自定义多种处理器并在不同的推送种类中应用
- Loading branch information
1 parent
dbaa0d4
commit 4ea4ca8
Showing
43 changed files
with
774 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,29 @@ | ||
package com.github.push.base.model; | ||
|
||
import com.github.task.base.dto.TaskLog; | ||
import com.github.task.base.service.TaskLogDisplayHandler; | ||
import lombok.Data; | ||
|
||
import static com.github.task.base.init.TaskInit.taskLogHandlerClassesMap; | ||
|
||
@Data | ||
public class PushData<T extends PushBaseConfig> { | ||
|
||
private Integer userId; | ||
private Long logId; | ||
private String content; | ||
private TaskLog taskLog; | ||
private String title; | ||
private T config; | ||
|
||
public Object getContent(String handlerName) { | ||
TaskLogDisplayHandler taskLogDisplayHandler = taskLogHandlerClassesMap.get(handlerName); | ||
if (taskLogDisplayHandler == null) { | ||
taskLogDisplayHandler = taskLogHandlerClassesMap.get("TXT"); | ||
} | ||
return taskLogDisplayHandler.handle(this.taskLog); | ||
} | ||
|
||
public String getContent() { | ||
return (String) getContent("TXT"); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/com/github/system/base/config/mybatis/BatchInjector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.github.system.base.config.mybatis; | ||
|
||
import com.baomidou.mybatisplus.core.injector.AbstractMethod; | ||
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector; | ||
import com.baomidou.mybatisplus.core.metadata.TableInfo; | ||
import com.baomidou.mybatisplus.extension.injector.methods.InsertBatchSomeColumn; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.util.List; | ||
|
||
@Component | ||
public class BatchInjector extends DefaultSqlInjector { | ||
@Override | ||
public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) { | ||
List<AbstractMethod> methodList = super.getMethodList(mapperClass,tableInfo); | ||
methodList.add(new InsertBatchSomeColumn()); | ||
return methodList; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
src/main/java/com/github/system/task/service/LogService.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.github.task.base; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum AutoTaskStatus { | ||
|
||
SUCCESS(200), SYSTEM_ERROR(500); | ||
|
||
private final int status; | ||
|
||
AutoTaskStatus(int status) { | ||
this.status = status; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/github/task/base/annotation/DataDesensitization.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.github.task.base.annotation; | ||
|
||
/** | ||
* 指定某一个字段是否需要脱敏 | ||
* 目前仅对BaseTaskService生效 | ||
*/ | ||
public @interface DataDesensitization { | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/github/task/base/annotation/TaskAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.github.task.base.annotation; | ||
|
||
public @interface TaskAction { | ||
|
||
/** | ||
* 子任务名称 用于任务结果日志回显 | ||
*/ | ||
String name(); | ||
|
||
/** | ||
* 子任务延时 | ||
*/ | ||
int delay() default 0; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.github.task.base.dao; | ||
|
||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
import com.github.task.base.entity.AutoIndex; | ||
import org.apache.ibatis.annotations.Mapper; | ||
|
||
import java.util.List; | ||
|
||
@Mapper | ||
public interface AutoIndexDao extends BaseMapper<AutoIndex> { | ||
|
||
int insertBatchSomeColumn(List<AutoIndex> autoIndexListList); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.github.task.base.dao; | ||
|
||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
import com.github.task.base.entity.AutoTask; | ||
import org.apache.ibatis.annotations.Mapper; | ||
|
||
@Mapper | ||
public interface AutoTaskDao extends BaseMapper<AutoTask> { | ||
} |
4 changes: 2 additions & 2 deletions
4
...ub/system/task/dao/HistoryTaskLogDao.java → ...thub/task/base/dao/HistoryTaskLogDao.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.