新增第三方产品信息上传审核,中继服务同步问题,定时任务问题

purchase
anthonyywj2 3 years ago
parent 374cfda8aa
commit 80b19f4cea

@ -0,0 +1,129 @@
package com.glxp.api.admin.controller.basic;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.github.pagehelper.PageInfo;
import com.glxp.api.admin.dao.basic.BasicThirdSysDao;
import com.glxp.api.admin.entity.basic.BasicThirdSysEntity;
import com.glxp.api.admin.entity.basic.CorpImportLogEntity;
import com.glxp.api.admin.entity.basic.NewUploadDiEntity;
import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
import com.glxp.api.admin.req.basic.FilterNewUploadDiRequest;
import com.glxp.api.admin.req.basic.FilterUdiIpLogRequest;
import com.glxp.api.admin.req.inout.DeleteRequest;
import com.glxp.api.admin.res.PageSimpleResponse;
import com.glxp.api.admin.res.basic.NewUploadDiResponse;
import com.glxp.api.admin.res.basic.UdiRelevanceResponse;
import com.glxp.api.admin.service.basic.NewUploadDiService;
import com.glxp.api.admin.service.basic.UdiRelevanceService;
import com.glxp.api.admin.util.HttpOkClient;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
@RestController
public class NewUploadDiController {
@Resource
NewUploadDiService newUploadDiService;
@Resource
UdiRelevanceService udiRelevanceService;
@Resource
HttpOkClient httpOkClient;
@Resource
private BasicThirdSysDao basicThirdSysDao;
@PostMapping("/udiwms/basic/newDi/postThird")
public BaseResponse postThird(@RequestBody NewUploadDiEntity newUploadDiEntity, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
ThrProductsEntity thrProductsEntity = new ThrProductsEntity();
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectGroupById(newUploadDiEntity.getRelId());
BeanUtils.copyProperties(udiRelevanceResponse, thrProductsEntity);
thrProductsEntity.setStandard(udiRelevanceResponse.getGgxh());
thrProductsEntity.setSpec(udiRelevanceResponse.getGgxh());
thrProductsEntity.setName(udiRelevanceResponse.getCpmctymc());
thrProductsEntity.setRegisterNo(udiRelevanceResponse.getZczbhhzbapzbh());
BasicThirdSysEntity basicThirdSysEntity = basicThirdSysDao.selectByThirdId(newUploadDiEntity.getThirdSysFk());
String response = httpOkClient.uCloudPost(basicThirdSysEntity.getThridUrl() + "/udiwms/erp/post/product", thrProductsEntity);
if (StrUtil.isEmpty(response)) {
newUploadDiEntity.setUploadStatus(2);
newUploadDiEntity.setUploadMsg("提交失败!");
return ResultVOUtils.error(500, "提交失败!");
}
try {
BaseResponse baseResponse = JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
});
if (baseResponse.getCode().equals(20000)) {
newUploadDiEntity.setUploadStatus(3);
newUploadDiEntity.setUploadMsg("上传成功!");
newUploadDiService.updateNewUploadDi(newUploadDiEntity);
return ResultVOUtils.success("上传成功!");
} else {
newUploadDiEntity.setUploadStatus(2);
newUploadDiEntity.setUploadMsg("提交失败,异常信息:" + baseResponse.getMessage());
newUploadDiService.updateNewUploadDi(newUploadDiEntity);
return ResultVOUtils.error(500, "提交失败,异常信息:" + baseResponse.getMessage());
}
} catch (Exception e) {
newUploadDiEntity.setUploadStatus(2);
newUploadDiEntity.setUploadMsg("提交失败,异常信息:" + e.getMessage());
newUploadDiService.updateNewUploadDi(newUploadDiEntity);
return ResultVOUtils.error(500, "提交失败,异常信息:" + e.getMessage());
}
}
@GetMapping("/udiwms/basic/newDi/filter")
public BaseResponse filter(FilterNewUploadDiRequest filterNewUploadDiRequest,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
List<NewUploadDiResponse> newUploadDiEntities
= newUploadDiService.filterJoinNewUploads(filterNewUploadDiRequest);
PageInfo<NewUploadDiResponse> pageInfo;
pageInfo = new PageInfo<>(newUploadDiEntities);
PageSimpleResponse<NewUploadDiResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(newUploadDiEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@PostMapping("/udiwms/basic/newDi/delete")
public BaseResponse delete(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (StrUtil.isEmpty(deleteRequest.getId())) {
return ResultVOUtils.error(500, "删除失败!");
}
boolean b = newUploadDiService.deleteById(Integer.parseInt(deleteRequest.getId()));
if (b) {
return ResultVOUtils.success("删除成功!");
} else {
return ResultVOUtils.error(500, "删除失败!");
}
}
}

@ -0,0 +1,24 @@
package com.glxp.api.admin.dao.basic;
import com.glxp.api.admin.entity.basic.NewUploadDiEntity;
import com.glxp.api.admin.req.basic.FilterNewUploadDiRequest;
import com.glxp.api.admin.res.basic.NewUploadDiResponse;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface NewUploadDiDao {
List<NewUploadDiResponse> filterJoinNewUploads(FilterNewUploadDiRequest filterNewUploadDiRequest);
List<NewUploadDiEntity> filterNewUploads(FilterNewUploadDiRequest filterNewUploadDiRequest);
boolean deleteById(Integer id);
boolean insertNewUploadDi(NewUploadDiEntity newUploadDiEntity);
boolean updateNewUploadDi(NewUploadDiEntity newUploadDiEntity);
}

@ -0,0 +1,19 @@
package com.glxp.api.admin.entity.basic;
import lombok.Data;
import java.util.Date;
@Data
public class NewUploadDiEntity {
private Integer id;
private String relId;
private String thirdSysFk;
private Integer uploadStatus;
private String uploadMsg;
private String uploadCode;
private String remark;
private Date updateTime;
private Date submitTime;
}

@ -0,0 +1,17 @@
package com.glxp.api.admin.req.basic;
import com.glxp.api.admin.req.ListPageRequest;
import lombok.Data;
@Data
public class FilterNewUploadDiRequest extends ListPageRequest {
private Integer id;
private String relId;
private String thirdSysFk;
private Integer uploadStatus;
private String uploadCode;
private String lastUpdateTime;
private String nameCode;
}

@ -0,0 +1,22 @@
package com.glxp.api.admin.res.basic;
import lombok.Data;
import java.util.Date;
@Data
public class NewUploadDiResponse {
private Integer id;
private String nameCode;
private String productName;
private String relId;
private String thirdSysFk;
private Integer uploadStatus;
private String uploadMsg;
private String uploadCode;
private String remark;
private Date updateTime;
private Date submitTime;
}

@ -2,10 +2,7 @@ package com.glxp.api.admin.res.basic;
import com.glxp.api.admin.entity.auth.AuthAdmin;
import com.glxp.api.admin.entity.auth.DeptEntity;
import com.glxp.api.admin.entity.basic.BasicUnitMaintainEntity;
import com.glxp.api.admin.entity.basic.CompanyProductRelevanceEntity;
import com.glxp.api.admin.entity.basic.UdiInfoEntity;
import com.glxp.api.admin.entity.basic.UdiRelevanceEntity;
import com.glxp.api.admin.entity.basic.*;
import com.glxp.api.admin.entity.inout.WarehouseBussinessTypeEntity;
import com.glxp.api.admin.entity.inout.WarehouseUserEntity;
import com.glxp.api.admin.entity.inventory.InvBusUserEntity;
@ -46,4 +43,7 @@ public class SpsSyncDataResponse {
List<InvSubWarehouseEntity> invSubWarehouseEntities;
List<InvBusUserEntity> invBusUserEntities;
//新增配送产品信息
List<NewUploadDiEntity> newUploadDiEntities;
}

@ -2,6 +2,8 @@ package com.glxp.api.admin.res.basic;
import lombok.Data;
import java.util.Date;
@Data
public class UdiRelevanceResponse {
private Integer id;

@ -0,0 +1,22 @@
package com.glxp.api.admin.service.basic;
import com.glxp.api.admin.entity.basic.NewUploadDiEntity;
import com.glxp.api.admin.req.basic.FilterNewUploadDiRequest;
import com.glxp.api.admin.res.basic.NewUploadDiResponse;
import java.util.List;
public interface NewUploadDiService {
List<NewUploadDiResponse> filterJoinNewUploads(FilterNewUploadDiRequest filterNewUploadDiRequest);
List<NewUploadDiEntity> filterNewUploads(FilterNewUploadDiRequest filterNewUploadDiRequest);
boolean deleteById(Integer id);
boolean insertNewUploadDi(NewUploadDiEntity newUploadDiEntity);
boolean updateNewUploadDi(NewUploadDiEntity newUploadDiEntity);
}

@ -0,0 +1,61 @@
package com.glxp.api.admin.service.basic.impl;
import com.github.pagehelper.PageHelper;
import com.glxp.api.admin.dao.basic.NewUploadDiDao;
import com.glxp.api.admin.entity.basic.NewUploadDiEntity;
import com.glxp.api.admin.req.basic.FilterNewUploadDiRequest;
import com.glxp.api.admin.res.basic.NewUploadDiResponse;
import com.glxp.api.admin.service.basic.NewUploadDiService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
public class NewUploadDiServiceImpl implements NewUploadDiService {
@Resource
NewUploadDiDao newUploadDiDao;
@Override
public List<NewUploadDiResponse> filterJoinNewUploads(FilterNewUploadDiRequest filterNewUploadDiRequest) {
if (filterNewUploadDiRequest == null) {
return Collections.emptyList();
}
if (filterNewUploadDiRequest.getPage() != null) {
int offset = (filterNewUploadDiRequest.getPage() - 1) * filterNewUploadDiRequest.getLimit();
PageHelper.offsetPage(offset, filterNewUploadDiRequest.getLimit());
}
List<NewUploadDiResponse> data = newUploadDiDao.filterJoinNewUploads(filterNewUploadDiRequest);
return data;
}
@Override
public List<NewUploadDiEntity> filterNewUploads(FilterNewUploadDiRequest filterNewUploadDiRequest) {
if (filterNewUploadDiRequest == null) {
return Collections.emptyList();
}
if (filterNewUploadDiRequest.getPage() != null) {
int offset = (filterNewUploadDiRequest.getPage() - 1) * filterNewUploadDiRequest.getLimit();
PageHelper.offsetPage(offset, filterNewUploadDiRequest.getLimit());
}
List<NewUploadDiEntity> data = newUploadDiDao.filterNewUploads(filterNewUploadDiRequest);
return data;
}
@Override
public boolean deleteById(Integer id) {
return newUploadDiDao.deleteById(id);
}
@Override
public boolean insertNewUploadDi(NewUploadDiEntity newUploadDiEntity) {
return newUploadDiDao.insertNewUploadDi(newUploadDiEntity);
}
@Override
public boolean updateNewUploadDi(NewUploadDiEntity newUploadDiEntity) {
return newUploadDiDao.updateNewUploadDi(newUploadDiEntity);
}
}

@ -35,10 +35,7 @@ import com.glxp.api.admin.res.basic.SpsSyncBusResponse;
import com.glxp.api.admin.res.basic.SpsSyncDataResponse;
import com.glxp.api.admin.res.basic.SpsSyncOrderResponse;
import com.glxp.api.admin.service.auth.DeptService;
import com.glxp.api.admin.service.basic.BasicDownloadService;
import com.glxp.api.admin.service.basic.BussinessChangeTypeService;
import com.glxp.api.admin.service.basic.BussinessTypeService;
import com.glxp.api.admin.service.basic.EntrustReceService;
import com.glxp.api.admin.service.basic.*;
import com.glxp.api.admin.service.info.SystemParamConfigService;
import com.glxp.api.admin.service.inout.OrderService;
import com.glxp.api.admin.service.inventory.InvBusUserService;
@ -82,6 +79,8 @@ public class DlBasicService {
AuthAdminDao authAdminService;
@Resource
DeptService deptService;
@Resource
NewUploadDiService newUploadDiService;
@Resource
WarehouseUserDao warehouseUserDao;
@ -349,6 +348,14 @@ public class DlBasicService {
}
//新增配送产品信息
if (CollUtil.isNotEmpty(syncDataResponse.getNewUploadDiEntities())) {
for (NewUploadDiEntity newUploadDiEntity : syncDataResponse.getNewUploadDiEntities()) {
newUploadDiService.insertNewUploadDi(newUploadDiEntity);
}
remark.append("新增配送产品信息:").append(syncDataResponse.getNewUploadDiEntities().size()).append("条\n");
}
spGetHttp.postBasicStatus(basicExportStatusEntity.getId());
batchSession.close();

@ -99,18 +99,6 @@ public class HeartTask implements SchedulingConfigurer {
redisUtil.set("SPS_SYNC_DOWNLOAD_DATA", curTime);
}
// long timeInterval3 = syncDataSetEntity.getSyncDownloadTime() * 60 * 1000;
// long curTime3 = System.currentTimeMillis();
// Long lastTime3 = (Long) redisUtil.get("SPS_SYNC_DOWNLOAD_ORDER");
// if (lastTime3 == null) {
// lastTime3 = System.currentTimeMillis();
// redisUtil.set("SPS_SYNC_DOWNLOAD_ORDER", lastTime3);
// }
// if (curTime3 - lastTime3 > timeInterval3) {
// dlUploadService.dlBasicUdiInfo();
// redisUtil.set("SPS_SYNC_DOWNLOAD_ORDER", curTime3);
// }
}
}

@ -3,6 +3,8 @@ package com.glxp.api.admin.thread;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.glxp.api.admin.constant.Constant;
import com.glxp.api.admin.constant.ConstantStatus;
import com.glxp.api.admin.constant.ThirdSysConstant;
@ -12,21 +14,31 @@ import com.glxp.api.admin.dao.basic.BasicThirdSysDetailDao;
import com.glxp.api.admin.dao.schedule.ScheduledDao;
import com.glxp.api.admin.dao.schedule.SystemParamConfigDao;
import com.glxp.api.admin.entity.basic.BasicThirdSysDetailEntity;
import com.glxp.api.admin.entity.basic.BasicThirdSysEntity;
import com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity;
import com.glxp.api.admin.entity.basic.NewUploadDiEntity;
import com.glxp.api.admin.entity.business.StockOrderEntity;
import com.glxp.api.admin.entity.info.ScheduledEntity;
import com.glxp.api.admin.entity.info.SyncDataBustypeEntity;
import com.glxp.api.admin.entity.info.SyncUploadDataSetEntity;
import com.glxp.api.admin.entity.info.SystemParamConfigEntity;
import com.glxp.api.admin.entity.inout.OrderEntity;
import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
import com.glxp.api.admin.req.basic.FilterNewUploadDiRequest;
import com.glxp.api.admin.req.info.ScheduledRequest;
import com.glxp.api.admin.res.basic.UdiRelevanceResponse;
import com.glxp.api.admin.service.basic.BussinessLocalTypeService;
import com.glxp.api.admin.service.basic.NewUploadDiService;
import com.glxp.api.admin.service.basic.UdiRelevanceService;
import com.glxp.api.admin.service.business.StockOrderService;
import com.glxp.api.admin.service.info.SyncUploadDataSetService;
import com.glxp.api.admin.service.inout.OrderService;
import com.glxp.api.admin.util.HttpOkClient;
import com.glxp.api.admin.util.RedisUtil;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
@ -95,10 +107,10 @@ public class OrderSubmitTask implements SchedulingConfigurer {
}
if (curTime1 - lastTime1 > timeInterval1) {
submitOrder(syncUploadDataSetEntity);
submitProducts();
redisUtil.set(Constant.LAST_THIRD_UPLOAD_TIME, curTime1);
}
}
public void submitOrder(SyncUploadDataSetEntity syncUploadDataSetEntity) {
@ -181,11 +193,11 @@ public class OrderSubmitTask implements SchedulingConfigurer {
if (!syncUploadDataSetEntity.isOrderScanFinish()) {
continue;
}
} else if (stockOrderEntity.getStatus() .equals( ConstantStatus.SORDER_CHECKED)) {
} else if (stockOrderEntity.getStatus().equals(ConstantStatus.SORDER_CHECKED)) {
if (!syncUploadDataSetEntity.isOrderUnReceive()) {
continue;
}
} else if (stockOrderEntity.getStatus() .equals( ConstantStatus.SORDER_CHECK)) {
} else if (stockOrderEntity.getStatus().equals(ConstantStatus.SORDER_CHECK)) {
if (!syncUploadDataSetEntity.isOrderUnCheck()) {
continue;
}
@ -213,6 +225,61 @@ public class OrderSubmitTask implements SchedulingConfigurer {
}
@Resource
NewUploadDiService newUploadDiService;
@Resource
UdiRelevanceService udiRelevanceService;
@Resource
HttpOkClient httpOkClient;
public void submitProducts() {
List<String> thirdIds = basicThirdSysDao.selectEnabledThirdId();
if (CollUtil.isNotEmpty(thirdIds)) {
for (String thirdId : thirdIds) {
FilterNewUploadDiRequest filterNewUploadDiRequest = new FilterNewUploadDiRequest();
filterNewUploadDiRequest.setThirdSysFk(thirdId);
filterNewUploadDiRequest.setUploadStatus(0);
List<NewUploadDiEntity> newUploadDiEntities = newUploadDiService.filterNewUploads(filterNewUploadDiRequest);
if (CollUtil.isNotEmpty(newUploadDiEntities)) {
for (NewUploadDiEntity newUploadDiEntity : newUploadDiEntities) {
ThrProductsEntity thrProductsEntity = new ThrProductsEntity();
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectGroupById(newUploadDiEntity.getRelId());
BeanUtils.copyProperties(udiRelevanceResponse, thrProductsEntity);
thrProductsEntity.setStandard(udiRelevanceResponse.getGgxh());
thrProductsEntity.setSpec(udiRelevanceResponse.getGgxh());
thrProductsEntity.setName(udiRelevanceResponse.getCpmctymc());
thrProductsEntity.setRegisterNo(udiRelevanceResponse.getZczbhhzbapzbh());
BasicThirdSysEntity basicThirdSysEntity = basicThirdSysDao.selectByThirdId(thirdId);
String response = httpOkClient.uCloudPost(basicThirdSysEntity.getThridUrl() + "/udiwms/erp/post/product", thrProductsEntity);
if (StrUtil.isEmpty(response)) {
newUploadDiEntity.setUploadStatus(2);
newUploadDiEntity.setUploadMsg("提交失败!");
}
try {
BaseResponse baseResponse = JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
});
if (baseResponse.getCode().equals(20000)) {
newUploadDiEntity.setUploadStatus(3);
newUploadDiEntity.setUploadMsg("提交失败!");
newUploadDiService.updateNewUploadDi(newUploadDiEntity);
} else {
newUploadDiEntity.setUploadStatus(2);
newUploadDiEntity.setUploadMsg("提交失败,异常信息:" + baseResponse.getMessage());
newUploadDiService.updateNewUploadDi(newUploadDiEntity);
}
} catch (Exception e) {
newUploadDiEntity.setUploadStatus(2);
newUploadDiEntity.setUploadMsg("提交失败,异常信息:" + e.getMessage());
newUploadDiService.updateNewUploadDi(newUploadDiEntity);
}
}
}
}
}
}
public boolean isConatin(List<SyncDataBustypeEntity> syncDataBustypeEntities, String action) {
if (CollUtil.isNotEmpty(syncDataBustypeEntities)) {
for (SyncDataBustypeEntity syncDataBustypeEntity : syncDataBustypeEntities) {

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.admin.dao.basic.NewUploadDiDao">
<select id="filterNewUploads" parameterType="com.glxp.api.admin.req.basic.FilterUdiIpLogRequest"
resultType="com.glxp.api.admin.entity.basic.NewUploadDiEntity">
SELECT * FROM basic_new_udi_upload
<where>
<if test="id != '' and id != null">
AND id = #{id}
</if>
<if test="relId != '' and relId != null">
AND relId = #{relId}
</if>
<if test="thirdSysFk != '' and thirdSysFk != null">
AND thirdSysFk = #{thirdSysFk}
</if>
<if test="uploadStatus != '' and uploadStatus != null">
AND uploadStatus = #{uploadStatus}
</if>
<if test="uploadCode != '' and uploadCode != null">
AND uploadCode = #{uploadCode}
</if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
</if>
</where>
ORDER BY updateTime DESC
</select>
<select id="filterJoinNewUploads" parameterType="com.glxp.api.admin.req.basic.FilterUdiIpLogRequest"
resultType="com.glxp.api.admin.res.basic.NewUploadDiResponse">
SELECT basic_new_udi_upload.* ,basic_products.nameCode ,basic_products.cpmctymc productName FROM basic_new_udi_upload
INNER JOIN basic_udirel on basic_new_udi_upload.relId = basic_udirel.id
INNER JOIN basic_products on basic_udirel.uuid = basic_products.uuid
<where>
<if test="id != '' and id != null">
AND id = #{id}
</if>
<if test="relId != '' and relId != null">
AND relId = #{relId}
</if>
<if test="thirdSysFk != '' and thirdSysFk != null">
AND thirdSysFk = #{thirdSysFk}
</if>
<if test="uploadStatus != '' and uploadStatus != null">
AND uploadStatus = #{uploadStatus}
</if>
<if test="uploadCode != '' and uploadCode != null">
AND uploadCode = #{uploadCode}
</if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
</if>
</where>
ORDER BY updateTime DESC
</select>
<insert id="insertNewUploadDi" keyProperty="id" parameterType="com.glxp.api.admin.entity.basic.NewUploadDiEntity">
replace
INTO basic_new_udi_upload
(relId, thirdSysFk, uploadStatus, uploadMsg, uploadCode, remark, updateTime, submitTime)
values (
#{relId},
#{thirdSysFk},
#{uploadStatus},
#{uploadMsg},
#{uploadCode},
#{remark},
#{updateTime},
#{submitTime}
)
</insert>
<delete id="deleteById" parameterType="Map">
DELETE
FROM basic_new_udi_upload
WHERE id = #{id}
</delete>
<update id="updateNewUploadDi" parameterType="com.glxp.api.admin.entity.basic.NewUploadDiEntity">
UPDATE basic_new_udi_upload
<set>
<if test="relId != null">relId=#{relId},</if>
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="uploadStatus != null">uploadStatus=#{uploadStatus},</if>
<if test="uploadMsg != null">uploadMsg=#{uploadMsg},</if>
<if test="uploadCode != null">uploadCode=#{uploadCode},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="submitTime != null">submitTime=#{submitTime},</if>
</set>
WHERE id = #{id}
</update>
</mapper>
Loading…
Cancel
Save