diff --git a/src/main/java/com/glxp/api/entity/thrsys/ThrSystemBusApiEntity.java b/src/main/java/com/glxp/api/entity/thrsys/ThrSystemBusApiEntity.java
index 449429225..f368eefec 100644
--- a/src/main/java/com/glxp/api/entity/thrsys/ThrSystemBusApiEntity.java
+++ b/src/main/java/com/glxp/api/entity/thrsys/ThrSystemBusApiEntity.java
@@ -1,26 +1,94 @@
package com.glxp.api.entity.thrsys;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+
import lombok.Data;
@Data
-public class ThrSystemBusApiEntity {
-
+@TableName(value = "thr_system_bus_api")
+public class ThrSystemBusApiEntity implements Serializable {
+ @TableId(value = "id", type = IdType.AUTO)
private Integer id;
+
+ @TableField(value = "code")
private String code;
+
+ @TableField(value = "`name`")
private String name;
- private String thirdBuyName; //第三方系统单据类型名称
- private String thirdBuyCode; //第三方系统单据类型代码
+
+ /**
+ * 第三方系统单据类型代码
+ */
+ @TableField(value = "thirdBuyCode")
+ private String thirdBuyCode;
+
+ @TableField(value = "thirdSys")
private String thirdSys;
+
+ @TableField(value = "url")
private String url;
- private Integer type;
+
+ @TableField(value = "`type`")
+ private Byte type;
+
+ @TableField(value = "remark")
private String remark;
- private Integer inoutType;
- //扩展字段 暂未启用
+ /**
+ * 扩展字段,暂未启用
+ */
+ @TableField(value = "filed")
private String filed;
+
+ @TableField(value = "filed1")
private String filed1;
+
+ @TableField(value = "filed2")
private String filed2;
+
+ @TableField(value = "filed3")
private String filed3;
+
+ @TableField(value = "filed4")
private String filed4;
+
+ @TableField(exist = false)
+ private Integer inoutType;
+ @TableField(exist = false)
+ private String thirdBuyName; //第三方系统单据类型名称
+
+
+ private static final long serialVersionUID = 1L;
+
+ public static final String COL_ID = "id";
+
+ public static final String COL_CODE = "code";
+
+ public static final String COL_NAME = "name";
+
+ public static final String COL_THIRDBUYCODE = "thirdBuyCode";
+
+ public static final String COL_THIRDSYS = "thirdSys";
+
+ public static final String COL_URL = "url";
+
+ public static final String COL_TYPE = "type";
+
+ public static final String COL_REMARK = "remark";
+
+ public static final String COL_FILED = "filed";
+
+ public static final String COL_FILED1 = "filed1";
+
+ public static final String COL_FILED2 = "filed2";
+
+ public static final String COL_FILED3 = "filed3";
+
+ public static final String COL_FILED4 = "filed4";
}
diff --git a/src/main/java/com/glxp/api/task/TaskExecutorConfig.java b/src/main/java/com/glxp/api/task/TaskExecutorConfig.java
index a6436503d..217ecf014 100644
--- a/src/main/java/com/glxp/api/task/TaskExecutorConfig.java
+++ b/src/main/java/com/glxp/api/task/TaskExecutorConfig.java
@@ -3,16 +3,20 @@ package com.glxp.api.task;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.AsyncConfigurer;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+import org.springframework.stereotype.Component;
import java.lang.reflect.Method;
import java.util.concurrent.Executor;
-//@EnableAsync
-//@Configuration
+@EnableAsync
+@Configuration
+@ConditionalOnProperty(prefix = "spring.sgrain.async-thread-pool", name = "enable", havingValue = "true", matchIfMissing = false)
public class TaskExecutorConfig implements AsyncConfigurer {
private static final Logger log = LoggerFactory.getLogger(TaskExecutorConfig.class);
@@ -31,4 +35,19 @@ public class TaskExecutorConfig implements AsyncConfigurer {
return threadPool;
}
+
+ class MyAsyncExceptionHandler implements AsyncUncaughtExceptionHandler {
+
+ //手动处理捕获的异常
+ @Override
+ public void handleUncaughtException(Throwable throwable, Method method, Object... obj) {
+ System.out.println("-------------》》》捕获线程异常信息");
+ log.info("Exception message - " + throwable.getMessage());
+ log.info("Method name - " + method.getName());
+ for (Object param : obj) {
+ log.info("Parameter value - " + param);
+ }
+ }
+
+ }
}
diff --git a/src/main/resources/mybatis/mapper/thrsys/ThrBusTypeOriginDao.xml b/src/main/resources/mybatis/mapper/thrsys/ThrBusTypeOriginDao.xml
index e052cfd21..dde42bcea 100644
--- a/src/main/resources/mybatis/mapper/thrsys/ThrBusTypeOriginDao.xml
+++ b/src/main/resources/mybatis/mapper/thrsys/ThrBusTypeOriginDao.xml
@@ -75,12 +75,11 @@
replace
into thr_bustype_origin
- (`name`, `action`, thirdSys, thirdSysName, `enable`, inoutType, updateTime, remark, createUser, updateUser,
+ (`name`, `action`, thirdSys, `enable`, inoutType, updateTime, remark, createUser, updateUser,
createTime)
values (#{name},
#{action},
#{thirdSys},
- #{thirdSysName},
#{enable},
#{inoutType},
#{updateTime},
diff --git a/src/main/resources/mybatis/mapper/thrsys/ThrSystemBusApiDao.xml b/src/main/resources/mybatis/mapper/thrsys/ThrSystemBusApiDao.xml
index 5726b786a..28e73ae04 100644
--- a/src/main/resources/mybatis/mapper/thrsys/ThrSystemBusApiDao.xml
+++ b/src/main/resources/mybatis/mapper/thrsys/ThrSystemBusApiDao.xml
@@ -11,9 +11,6 @@
`name`=#{name},
-
- `thirdBuyName`=#{thirdBuyName},
-
`thirdBuyCode`=#{thirdBuyCode},
@@ -60,10 +57,9 @@
insert
ignore
INTO thr_system_bus_api
- (`code`, `name`, thirdBuyName, thirdBuyCode, `thirdSys`, url, `type`, remark)
+ (`code`, `name`, thirdBuyCode, `thirdSys`, url, `type`, remark)
values (#{code},
#{name},
- #{thirdBuyName},
#{thirdBuyCode},
#{thirdSys},
#{url},
@@ -72,12 +68,11 @@
- insert into thr_system_bus_api (code, `name`, thirdBuyName, thirdBuyCode, thirdSys, type)
+ insert into thr_system_bus_api (code, `name`, thirdBuyCode, thirdSys, type)
values
(#{item.code},
#{item.name},
- #{item.thirdBuyName},
#{item.thirdBuyCode},
#{item.thirdSys},
#{item.type})