1.下载记录增加taskId 任务ID字段

master
x_z 3 years ago
parent db682bb340
commit 1ce8d710e0

@ -7,7 +7,15 @@ import java.util.Date;
@Data
public class BasicDownloadStatusEntity {
/**
* ID
*/
private String id;
/**
* ID
*/
private String taskId;
private String idDatas;
private Integer status;
private Integer type;

@ -6,6 +6,7 @@ import lombok.Data;
@Data
public class BasicDownloadRequest extends ListPageRequest {
private String id;
private String taskId; //任务ID
private Integer status;
private Integer type;
private String idDatas;

@ -36,6 +36,7 @@ import com.glxp.api.admin.service.info.SystemParamConfigService;
import com.glxp.api.admin.service.inout.OrderService;
import com.glxp.api.admin.service.inventory.InvWarehouseService;
import com.glxp.api.admin.service.thrsys.ThrInvWarehouseService;
import com.glxp.api.admin.util.CustomUtil;
import com.glxp.api.admin.util.RedisUtil;
import com.glxp.api.common.res.BaseResponse;
import org.apache.ibatis.session.ExecutorType;
@ -103,7 +104,8 @@ public class DlBasicService {
//构造下载记录
BasicDownloadStatusEntity basicDownloadStatusEntity = new BasicDownloadStatusEntity();
basicDownloadStatusEntity.setId(syncDataResponse.getTaskId());
basicDownloadStatusEntity.setId(CustomUtil.getId());
basicDownloadStatusEntity.setTaskId(syncDataResponse.getTaskId());
basicDownloadStatusEntity.setStartTime(new Date());
basicDownloadStatusEntity.setIdDatas(ConstantStatus.SYNC_DOWNLOAD_BASIC_DATA);
basicDownloadStatusEntity.setStatus(0); //下载中
@ -313,7 +315,8 @@ public class DlBasicService {
//构造下载记录
BasicDownloadStatusEntity basicDownloadStatusEntity = new BasicDownloadStatusEntity();
basicDownloadStatusEntity.setId(syncDataResponse.getTaskId());
basicDownloadStatusEntity.setId(CustomUtil.getId());
basicDownloadStatusEntity.setTaskId(syncDataResponse.getTaskId());
basicDownloadStatusEntity.setStartTime(new Date());
basicDownloadStatusEntity.setIdDatas(ConstantStatus.SYNC_DOWNLOAD_BUS_TYPE);
basicDownloadStatusEntity.setStatus(0); //下载中
@ -419,7 +422,8 @@ public class DlBasicService {
SpsSyncOrderResponse syncDataResponse = response.getData();
BasicDownloadStatusEntity basicDownloadStatusEntity = new BasicDownloadStatusEntity();
basicDownloadStatusEntity.setId(syncDataResponse.getTaskId());
basicDownloadStatusEntity.setId(CustomUtil.getId());
basicDownloadStatusEntity.setTaskId(syncDataResponse.getTaskId());
basicDownloadStatusEntity.setStartTime(new Date());
basicDownloadStatusEntity.setIdDatas(ConstantStatus.SYNC_DOWNLOAD_SCAN_ORDER);
basicDownloadStatusEntity.setStatus(0); //下载中
@ -525,7 +529,8 @@ public class DlBasicService {
SpSyncUdiResponse spSyncUdiResponse = response.getData();
BasicDownloadStatusEntity basicDownloadStatusEntity = new BasicDownloadStatusEntity();
basicDownloadStatusEntity.setId(spSyncUdiResponse.getTaskId());
basicDownloadStatusEntity.setId(CustomUtil.getId());
basicDownloadStatusEntity.setTaskId(spSyncUdiResponse.getTaskId());
basicDownloadStatusEntity.setStartTime(new Date());
basicDownloadStatusEntity.setIdDatas(ConstantStatus.SYNC_DOWNLOAD_DI_PRODUCTS);
basicDownloadStatusEntity.setStatus(0); //下载中

@ -5,21 +5,25 @@
<select id="filterDownloadStatus" parameterType="com.glxp.api.admin.req.basic.BasicDownloadRequest"
resultType="com.glxp.api.admin.entity.basic.BasicDownloadStatusEntity">
select * from basic_download_status
select *
from basic_download_status
<where>
<if test="id != '' and id!=null">
<if test="id != '' and id != null">
and id = #{id}
</if>
<if test="status!=null">
<if test="taskId != null and taskId != ''">
and taskId = #{taskId}
</if>
<if test="status != null">
and status = #{status}
</if>
<if test="type!=null">
<if test="type != null">
and `type` = #{type}
</if>
<if test="idDatas != '' and idDatas!=null">
<if test="idDatas != '' and idDatas != null">
and idDatas = #{idDatas}
</if>
<if test="scheduleType!=null">
<if test="scheduleType != null">
and scheduleType = #{scheduleType}
</if>
</where>
@ -30,9 +34,10 @@
<insert id="insertDownloadStatus" keyProperty="id"
parameterType="com.glxp.api.admin.entity.basic.BasicDownloadStatusEntity">
replace
INTO basic_download_status(id,idDatas,status,type,updateTime,scheduleType,startTime,endTime,remark)
INTO basic_download_status(id,taskId,idDatas,status,type,updateTime,scheduleType,startTime,endTime,remark)
values(
#{id},
#{taskId},
#{idDatas},
#{status},
#{type},

Loading…
Cancel
Save