From c6e75ba27808c87c543dd9736d824741024f21b8 Mon Sep 17 00:00:00 2001 From: wj <1285151836@qq.com> Date: Mon, 24 Apr 2023 17:07:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=A1=A8=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../glxp/api/controller/sync/SpsSyncDownloadController.java | 5 +++-- src/main/java/com/glxp/api/entity/thrsys/ThrCorpEntity.java | 2 ++ src/main/java/com/glxp/api/entity/thrsys/ThrDeptEntity.java | 2 ++ .../com/glxp/api/entity/thrsys/ThrInvWarehouseEntity.java | 4 ++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java b/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java index cfd83a91..2f24bd8a 100644 --- a/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java +++ b/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java @@ -155,11 +155,11 @@ public class SpsSyncDownloadController { @AuthRuleAnnotation("") @GetMapping("sps/sync/data") @ApiOperation("拉取同步任务数据") - public BaseResponse data(BasicExportTypeEnum exportType) { + public BaseResponse data(BasicExportTypeEnum exportType) { BaseResponse baseResponse = new BaseResponse<>(); BasicExportStatusEntity one = basicExportService.getOne(Wrappers.lambdaQuery(BasicExportStatusEntity.class) .eq(BasicExportStatusEntity::getType, exportType.getRemark()) - .orderByDesc(BasicExportStatusEntity::getStartTime) + .orderByAsc(BasicExportStatusEntity::getStartTime) .last("limit 1") ); RelaySyncResponse relaySyncResponse = null; @@ -369,6 +369,7 @@ public class SpsSyncDownloadController { private final ThrInvWarehouseDao thrInvWarehouseDao; private final ThrProductsDao thrProductsDao; private final ThrCorpDao thrCorpDao; + private void saveUploadThrData(SpsSyncThrDataResponse bean) { if (CollectionUtil.isNotEmpty(bean.getDeptEntities())) { diff --git a/src/main/java/com/glxp/api/entity/thrsys/ThrCorpEntity.java b/src/main/java/com/glxp/api/entity/thrsys/ThrCorpEntity.java index cf69b066..2f3d673b 100644 --- a/src/main/java/com/glxp/api/entity/thrsys/ThrCorpEntity.java +++ b/src/main/java/com/glxp/api/entity/thrsys/ThrCorpEntity.java @@ -3,6 +3,7 @@ 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 lombok.Data; import java.util.Date; @@ -14,6 +15,7 @@ import java.util.Date; * @since 2023-01-12 */ @Data +@TableName("thr_corp") public class ThrCorpEntity{ @TableId(value = "id", type = IdType.AUTO) diff --git a/src/main/java/com/glxp/api/entity/thrsys/ThrDeptEntity.java b/src/main/java/com/glxp/api/entity/thrsys/ThrDeptEntity.java index ecfb4b2f..f2703de3 100644 --- a/src/main/java/com/glxp/api/entity/thrsys/ThrDeptEntity.java +++ b/src/main/java/com/glxp/api/entity/thrsys/ThrDeptEntity.java @@ -1,5 +1,6 @@ package com.glxp.api.entity.thrsys; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import java.util.Date; @@ -8,6 +9,7 @@ import java.util.Date; * 第三方仓库信息 */ @Data +@TableName("thr_dept") public class ThrDeptEntity { private Integer id; diff --git a/src/main/java/com/glxp/api/entity/thrsys/ThrInvWarehouseEntity.java b/src/main/java/com/glxp/api/entity/thrsys/ThrInvWarehouseEntity.java index 74070ffa..52c8991f 100644 --- a/src/main/java/com/glxp/api/entity/thrsys/ThrInvWarehouseEntity.java +++ b/src/main/java/com/glxp/api/entity/thrsys/ThrInvWarehouseEntity.java @@ -1,10 +1,13 @@ package com.glxp.api.entity.thrsys; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import java.util.Date; @Data +@TableName("thr_inv_warehouse") public class ThrInvWarehouseEntity { @@ -14,6 +17,7 @@ public class ThrInvWarehouseEntity { private String parentId; private String remark; private String thirdSysFk; + @TableField(exist = false) private String parentName; private Date updateTime;