bug修复

master
wj 2 years ago
parent 447b8479b9
commit c807bfe86e

@ -96,11 +96,11 @@
<!--<version>1.0</version>--> <!--<version>1.0</version>-->
<!--</dependency>--> <!--</dependency>-->
<!--mybatis --> <!--mybatis -->
<dependency> <!-- <dependency>-->
<groupId>org.mybatis.spring.boot</groupId> <!-- <groupId>org.mybatis.spring.boot</groupId>-->
<artifactId>mybatis-spring-boot-starter</artifactId> <!-- <artifactId>mybatis-spring-boot-starter</artifactId>-->
<version>1.3.2</version> <!-- <version>1.3.2</version>-->
</dependency> <!-- </dependency>-->
<dependency> <dependency>
<groupId>com.itfsw</groupId> <groupId>com.itfsw</groupId>
<artifactId>mybatis-generator-plugin</artifactId> <artifactId>mybatis-generator-plugin</artifactId>
@ -304,7 +304,7 @@
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId> <artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.2</version> <version>3.5.3</version>
</dependency> </dependency>
</dependencies> </dependencies>

@ -1,5 +1,6 @@
package com.glxp.sale.admin.config; package com.glxp.sale.admin.config;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
@ -39,7 +40,7 @@ public class MasterDataSourceConfig {//TODO Mapper
@Primary @Primary
public SqlSessionFactory masterSqlSessionFactory(@Qualifier("masterDataSource") DataSource masterDataSource) public SqlSessionFactory masterSqlSessionFactory(@Qualifier("masterDataSource") DataSource masterDataSource)
throws Exception { throws Exception {
final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); final MybatisSqlSessionFactoryBean sessionFactory = new MybatisSqlSessionFactoryBean();
sessionFactory.setDataSource(masterDataSource); sessionFactory.setDataSource(masterDataSource);
sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver() sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver()
.getResources(MasterDataSourceConfig.MAPPER_LOCATION)); .getResources(MasterDataSourceConfig.MAPPER_LOCATION));

@ -247,7 +247,7 @@ public class SpsSyncDataController {
.build(); .build();
} }
} }
baseResponse.setCode(ResultEnum.SUCCESS.getCode()); baseResponse.setCode(20000);
baseResponse.setData(relaySyncResponse); baseResponse.setData(relaySyncResponse);
return baseResponse; return baseResponse;
} }
@ -277,14 +277,9 @@ public class SpsSyncDataController {
if (StrUtil.isBlank(basicExportStatusEntity.getId())) { if (StrUtil.isBlank(basicExportStatusEntity.getId())) {
return ResultVOUtils.error(500, "缺少唯一标识!"); return ResultVOUtils.error(500, "缺少唯一标识!");
} }
if (StrUtil.isEmpty(basicExportStatusEntity.getReceiveStatus())) {
basicExportStatusEntity.setEndTime(DateUtil.getDateTime());
}
basicExportStatusEntity.setUpdateTime(new Date());
basicExportStatusEntity.setStatus(BasicExportStatusEnum.COMPLETED.getCode());
boolean b = basicExportService.update(Wrappers.lambdaUpdate(BasicExportStatusEntity.class) boolean b = basicExportService.update(Wrappers.lambdaUpdate(BasicExportStatusEntity.class)
.set(BasicExportStatusEntity::getStatus, BasicExportStatusEnum.COMPLETED.getCode())
.set(BasicExportStatusEntity::getEndTime, new Date()) .set(BasicExportStatusEntity::getEndTime, new Date())
.set(BasicExportStatusEntity::getStatus, BasicExportStatusEnum.COMPLETED.getCode())
.set(BasicExportStatusEntity::getUpdateTime, new Date()) .set(BasicExportStatusEntity::getUpdateTime, new Date())
.set(BasicExportStatusEntity::getReceiveStatus, 1) .set(BasicExportStatusEntity::getReceiveStatus, 1)
.eq(BasicExportStatusEntity::getId, basicExportStatusEntity.getId()) .eq(BasicExportStatusEntity::getId, basicExportStatusEntity.getId())
@ -293,7 +288,7 @@ public class SpsSyncDataController {
if (b) if (b)
return ResultVOUtils.success("更新成功!"); return ResultVOUtils.success("更新成功!");
else else
return ResultVOUtils.error(500, "更新成功"); return ResultVOUtils.error(500, "更新失败");
} }
} }

@ -3,7 +3,6 @@ package com.glxp.sale.admin.dao.sync;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.sale.admin.entity.sync.BasicExportStatusEntity; import com.glxp.sale.admin.entity.sync.BasicExportStatusEntity;
import com.glxp.sale.admin.req.sync.BasicExportStatusRequest; import com.glxp.sale.admin.req.sync.BasicExportStatusRequest;
import com.glxp.sale.admin.service.sync.BasicExportService;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;

@ -1,5 +1,8 @@
package com.glxp.sale.admin.entity.sync; package com.glxp.sale.admin.entity.sync;
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 com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
@ -14,23 +17,39 @@ import java.util.Date;
@NoArgsConstructor @NoArgsConstructor
@TableName("basic_export_status") @TableName("basic_export_status")
public class BasicExportStatusEntity { public class BasicExportStatusEntity {
@TableId(type = IdType.INPUT)
private String id; private String id;
@TableField(value = "taskId")
private String taskId; private String taskId;
@TableField(value = "idDatas")
private String idDatas; private String idDatas;
@TableField(value = "status")
private Integer status; private Integer status;
@TableField(value = "type")
private String type; private String type;
/** /**
* 1. 2. * 1. 2.
*/ */
@TableField(value = "transportType")
private Integer transportType; private Integer transportType;
@TableField(value = "updateTime")
private Date updateTime; private Date updateTime;
@TableField(value = "scheduleType")
private Integer scheduleType; private Integer scheduleType;
@TableField(exist = false)
private int fromType; //来源类型0默认自助平台1:中继服务 private int fromType; //来源类型0默认自助平台1:中继服务
@TableField(value = "startTime")
private String startTime; private String startTime;
@TableField(value = "endTime")
private String endTime; private String endTime;
@TableField(value = "remark")
private String remark; private String remark;
@TableField(value = "superiorService")
private String superiorService; //上游服务 private String superiorService; //上游服务
@TableField(value = "subordinateService")
private String subordinateService; //下游服务 private String subordinateService; //下游服务
@TableField(value = "cacheFilePath")
private String cacheFilePath; private String cacheFilePath;
@TableField(value = "receiveStatus")
private String receiveStatus; private String receiveStatus;
} }

@ -332,7 +332,7 @@ public class SpGetHttp {
public void finishTask(String id) { public void finishTask(String id) {
String result = UHttpClient.mipsGetHead(getSpmsUrl() + "/spssync/basic/udiinfo/finishTask" String result = UHttpClient.postJson(getSpmsUrl() + "/spssync/basic/udiinfo/finishTask"
, Map.of("id", id), getHeaders()); , Map.of("id", id), getHeaders());
} }

@ -2,7 +2,6 @@ spring.profiles.active=dev
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
mybatis.config-location=classpath:mybatis/mybatis-config.xml mybatis.config-location=classpath:mybatis/mybatis-config.xml
mybatis.mapper-locations=classpath:mybatis/mapper/*/*.xml mybatis.mapper-locations=classpath:mybatis/mapper/*/*.xml
mybatis-plus.map-underscore-to-camel-case=false
spring.jmx.enabled=false spring.jmx.enabled=false
server.tomcat.max-http-form-post-size=100MB server.tomcat.max-http-form-post-size=100MB
server.tomcat.max-http-post-size=100MB server.tomcat.max-http-post-size=100MB

Loading…
Cancel
Save