diff --git a/src/main/java/com/glxp/api/idc/service/impl/IdcServiceImpl.java b/src/main/java/com/glxp/api/idc/service/impl/IdcServiceImpl.java index 841c2f7f..76d4ce3a 100644 --- a/src/main/java/com/glxp/api/idc/service/impl/IdcServiceImpl.java +++ b/src/main/java/com/glxp/api/idc/service/impl/IdcServiceImpl.java @@ -282,8 +282,8 @@ public class IdcServiceImpl implements IdcService { if (!StringUtils.isEmpty(updateTimeColumn)) { - sqlWhere += " " + updateTimeColumn + ">= cast('" + lastUpdateTime + "' as datetime)";// and date_add(cast('"+DateUtil.formatDate(nowUpdateTime, "yyyy-MM-dd HH:mm:ss")+"' as datetime),INTERVAL 1 day)"; - sqlWhere += " and not exists (select fkId from idc_record where type='" + tnames[2] + "' and fkId=" + tnames[2] + "." + keyColumn + " and createTime>date_sub(now(),interval 15 MINUTE))"; + sqlWhere += " " + updateTimeColumn + " between cast('" + lastUpdateTime + "' as datetime) and cast('"+DateUtil.formatDate(nowUpdateTime, "yyyy-MM-dd HH:mm:ss")+"' as datetime)"; + //sqlWhere += " and not exists (select fkId from idc_record where type='" + tnames[2] + "' and fkId=" + tnames[2] + "." + keyColumn + " and createTime>date_sub(now(),interval 15 MINUTE))"; } else { sqlWhere = "not exists (select fkId from idc_record where type='" + tnames[2] + "' and fkId=" + tnames[2] + "." + keyColumn + ")"; map.put("isEnd", "1"); @@ -1023,7 +1023,7 @@ public class IdcServiceImpl implements IdcService { .build(); try { Response result = client.newCall(request).execute(); - + String msg = result!=null ? result.message().length()>200 ? result.message().substring(0,200) : result.message() : ""; int total = 0; if (result!=null&&result.isSuccessful()&&MediaType.parse("application/force-download").equals(result.body().contentType())) { try (InputStream inputStream = result.body().byteStream()) { @@ -1054,7 +1054,7 @@ public class IdcServiceImpl implements IdcService { } } if(!(total>0)) { - String sql = "replace idc_file (filePath,createTime) values ('"+fileName+"',now())"; + String sql = "replace idc_file (filePath,createTime,msg) values ('"+fileName+"',now(),'"+msg+"')"; executeSql(sql); } @@ -1230,6 +1230,7 @@ public class IdcServiceImpl implements IdcService { executeSql("alter table basic_export_status add column msg varchar(255)"); executeSql("alter table basic_upload_status add column msg varchar(255)"); executeSql("alter table basic_download_status add column msg varchar(255)"); + executeSql("alter table idc_file add column msg varchar(255)"); executeSql("create index i_idc_file_create_time on idc_file (createTime asc)"); } catch (Exception e) { diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml deleted file mode 100644 index eb401e13..00000000 --- a/src/main/resources/application-dev.yml +++ /dev/null @@ -1,56 +0,0 @@ -server: - port: 9993 - -spring: - datasource: - driver-class-name: com.p6spy.engine.spy.P6SpyDriver - jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_spms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true - username: root - password: 123456 - hikari: - connection-timeout: 60000 - maximum-pool-size: 20 - minimum-idle: 10 - - - redis: - database: 10 - host: 127.0.0.1 - port: 6379 - # password: 123456 - timeout: 300 - jedis: - pool: - max-active: 8 - max-wait: -1 - max-idle: 8 - min-idle: 0 - jackson: - date-format: yyyy-MM-dd HH:mm:ss - time-zone: GMT+8 - servlet: - multipart: - max-file-size: 500MB - max-request-size: 500MB - -ok: - http: - connect-timeout: 3000 - read-timeout: 3000 - write-timeout: 3000 - max-idle-connections: 200 - keep-alive-duration: 300 - - -logging: - level: - com.glxp.api.dao: debug - -file_path: D:/udi/udiwms/udiwmsfile/ -back_file_path: D:/share/udisps/back/ -UDI_KEY: 6b137c66-6286-46c6-8efa-c2f5dd9237df -UDI_SERVER_URL: https://www.udims.com/UDI_DL_Server_test -SPMS_KEY: lCOdWCBKS6Kw45wdnnqUTELXyuSKnXEs - -API_KEY: 1101 -API_SECRET: zBITspLNvuoEd4FaamlSoqxRHmNsmQ9L