From 8865a8ecd69040137c28a4ad158e61e38ebb61ef Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Tue, 4 Jul 2023 14:00:46 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E5=B7=A1=E6=A3=80=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=B7=A1=E6=A3=80=E5=86=85=E5=AE=B9list=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E5=B0=86IDS=E7=94=B1String=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=E4=B8=BAList=20#=20pom=E6=96=87=E4=BB=B6=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hzims-service-api/hzims-operational-api/pom.xml | 2 -- .../java/com/hnac/hzinfo/inspect/obj/dto/ContentDefinitionDTO.java | 3 ++- .../com/hnac/hzinfo/inspect/obj/feign/IContentDefinitionClient.java | 4 ++-- .../com/hnac/hzinfo/inspect/obj/feign/ContentDefinitionClient.java | 2 +- .../inspect/obj/services/impl/ContentDefinitionServiceImpl.java | 3 ++- pom.xml | 5 +++++ 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/hzims-service-api/hzims-operational-api/pom.xml b/hzims-service-api/hzims-operational-api/pom.xml index 10b24a0..7b370f2 100644 --- a/hzims-service-api/hzims-operational-api/pom.xml +++ b/hzims-service-api/hzims-operational-api/pom.xml @@ -67,8 +67,6 @@ com.hnac.hzims middle-api - 4.0.0-SNAPSHOT - provided diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/dto/ContentDefinitionDTO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/dto/ContentDefinitionDTO.java index 16402fe..50f0607 100644 --- a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/dto/ContentDefinitionDTO.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/dto/ContentDefinitionDTO.java @@ -7,6 +7,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import java.io.Serializable; +import java.util.List; /** * @ClassName ContentDefinitionDTO @@ -21,6 +22,6 @@ import java.io.Serializable; public class ContentDefinitionDTO extends ContentDefinitionEntity implements Serializable { @ApiModelProperty("id,按逗号分隔") - private String ids; + private List ids; } diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/feign/IContentDefinitionClient.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/feign/IContentDefinitionClient.java index ebaa95c..1d1e630 100644 --- a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/feign/IContentDefinitionClient.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/feign/IContentDefinitionClient.java @@ -57,7 +57,7 @@ public interface IContentDefinitionClient { * @param request * @return */ - @GetMapping(SAVE_OR_UPDATE_BATCH) - R saveOrUpdateBatch(List request); + @PostMapping(SAVE_OR_UPDATE_BATCH) + R saveOrUpdateBatch(@RequestBody List request); } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/feign/ContentDefinitionClient.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/feign/ContentDefinitionClient.java index add8955..5cf8228 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/feign/ContentDefinitionClient.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/feign/ContentDefinitionClient.java @@ -53,7 +53,7 @@ public class ContentDefinitionClient implements IContentDefinitionClient { @Override @PostMapping(SAVE_OR_UPDATE_BATCH) - public R saveOrUpdateBatch(List request) { + public R saveOrUpdateBatch(@RequestBody List request) { List list = JSONArray.parseArray(JSON.toJSONString(request), ContentDefinitionEntity.class); return R.data(contentDefinitionService.saveOrUpdateBatch(list)); } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ContentDefinitionServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ContentDefinitionServiceImpl.java index 1b5bdbd..58bc5f4 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ContentDefinitionServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ContentDefinitionServiceImpl.java @@ -16,6 +16,7 @@ import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.support.Condition; import org.springblade.core.tool.utils.BeanUtil; +import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.StringUtil; import org.springframework.stereotype.Service; @@ -40,7 +41,7 @@ public class ContentDefinitionServiceImpl extends BaseServiceImpl list(ContentDefinitionDTO request) { QueryWrapper queryWrapper = Condition.getQueryWrapper(BeanUtil.copy(request, ContentDefinitionEntity.class)); LambdaQueryWrapper lambda = queryWrapper.lambda(); - lambda.in(StringUtil.isNotBlank(request.getIds()),ContentDefinitionEntity::getId,Func.toLongList(",",request.getIds())); + lambda.in(CollectionUtil.isNotEmpty(request.getIds()),ContentDefinitionEntity::getId,request.getIds()); return ContentDefinitionWrapper.build().listVO(this.list(lambda)); } } diff --git a/pom.xml b/pom.xml index 255422d..93bc8d2 100644 --- a/pom.xml +++ b/pom.xml @@ -195,6 +195,11 @@ com.hnac.hzims + middle-api + ${hzims.project.version} + + + com.hnac.hzims assets-api ${hzims.project.version}