Browse Source

# 巡检定义巡检内容list查询条件将IDS由String变更为List<Long>

# pom文件依赖问题修改
zhongwei
haungxing 1 year ago
parent
commit
8865a8ecd6
  1. 2
      hzims-service-api/hzims-operational-api/pom.xml
  2. 3
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/dto/ContentDefinitionDTO.java
  3. 4
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/feign/IContentDefinitionClient.java
  4. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/feign/ContentDefinitionClient.java
  5. 3
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ContentDefinitionServiceImpl.java
  6. 5
      pom.xml

2
hzims-service-api/hzims-operational-api/pom.xml

@ -67,8 +67,6 @@
<dependency> <dependency>
<groupId>com.hnac.hzims</groupId> <groupId>com.hnac.hzims</groupId>
<artifactId>middle-api</artifactId> <artifactId>middle-api</artifactId>
<version>4.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>

3
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 lombok.EqualsAndHashCode;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
/** /**
* @ClassName ContentDefinitionDTO * @ClassName ContentDefinitionDTO
@ -21,6 +22,6 @@ import java.io.Serializable;
public class ContentDefinitionDTO extends ContentDefinitionEntity implements Serializable { public class ContentDefinitionDTO extends ContentDefinitionEntity implements Serializable {
@ApiModelProperty("id,按逗号分隔") @ApiModelProperty("id,按逗号分隔")
private String ids; private List<Long> ids;
} }

4
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 * @param request
* @return * @return
*/ */
@GetMapping(SAVE_OR_UPDATE_BATCH) @PostMapping(SAVE_OR_UPDATE_BATCH)
R<Boolean> saveOrUpdateBatch(List<ContentDefinitionDTO> request); R<Boolean> saveOrUpdateBatch(@RequestBody List<ContentDefinitionDTO> request);
} }

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/feign/ContentDefinitionClient.java

@ -53,7 +53,7 @@ public class ContentDefinitionClient implements IContentDefinitionClient {
@Override @Override
@PostMapping(SAVE_OR_UPDATE_BATCH) @PostMapping(SAVE_OR_UPDATE_BATCH)
public R<Boolean> saveOrUpdateBatch(List<ContentDefinitionDTO> request) { public R<Boolean> saveOrUpdateBatch(@RequestBody List<ContentDefinitionDTO> request) {
List<ContentDefinitionEntity> list = JSONArray.parseArray(JSON.toJSONString(request), ContentDefinitionEntity.class); List<ContentDefinitionEntity> list = JSONArray.parseArray(JSON.toJSONString(request), ContentDefinitionEntity.class);
return R.data(contentDefinitionService.saveOrUpdateBatch(list)); return R.data(contentDefinitionService.saveOrUpdateBatch(list));
} }

3
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.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
import org.springblade.core.tool.utils.BeanUtil; 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.Func;
import org.springblade.core.tool.utils.StringUtil; import org.springblade.core.tool.utils.StringUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -40,7 +41,7 @@ public class ContentDefinitionServiceImpl extends BaseServiceImpl<ContentDefinit
public List<ContentDefinitionVO> list(ContentDefinitionDTO request) { public List<ContentDefinitionVO> list(ContentDefinitionDTO request) {
QueryWrapper<ContentDefinitionEntity> queryWrapper = Condition.getQueryWrapper(BeanUtil.copy(request, ContentDefinitionEntity.class)); QueryWrapper<ContentDefinitionEntity> queryWrapper = Condition.getQueryWrapper(BeanUtil.copy(request, ContentDefinitionEntity.class));
LambdaQueryWrapper<ContentDefinitionEntity> lambda = queryWrapper.lambda(); LambdaQueryWrapper<ContentDefinitionEntity> 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)); return ContentDefinitionWrapper.build().listVO(this.list(lambda));
} }
} }

5
pom.xml

@ -195,6 +195,11 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.hnac.hzims</groupId> <groupId>com.hnac.hzims</groupId>
<artifactId>middle-api</artifactId>
<version>${hzims.project.version}</version>
</dependency>
<dependency>
<groupId>com.hnac.hzims</groupId>
<artifactId>assets-api</artifactId> <artifactId>assets-api</artifactId>
<version>${hzims.project.version}</version> <version>${hzims.project.version}</version>
</dependency> </dependency>

Loading…
Cancel
Save