修改卡片模板.
This commit is contained in:
@@ -22,6 +22,9 @@ import java.util.List;
|
||||
@Schema(name = "HostQueryRequest", description = "主机 查询请求对象")
|
||||
public class HostQueryRequest extends PageRequest {
|
||||
|
||||
@Schema(description = "搜索")
|
||||
private String searchValue;
|
||||
|
||||
@Schema(description = "id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.orion.lang.define.wrapper.DataGrid;
|
||||
import com.orion.lang.utils.Booleans;
|
||||
import com.orion.lang.utils.Strings;
|
||||
import com.orion.lang.utils.collect.Lists;
|
||||
import com.orion.ops.framework.common.constant.ErrorMessage;
|
||||
import com.orion.ops.framework.common.utils.Valid;
|
||||
@@ -249,11 +250,17 @@ public class HostServiceImpl implements HostService {
|
||||
}
|
||||
}
|
||||
// 基础条件
|
||||
String searchValue = request.getSearchValue();
|
||||
LambdaQueryWrapper<HostDO> wrapper = hostDAO.wrapper()
|
||||
.eq(HostDO::getId, request.getId())
|
||||
.like(HostDO::getName, request.getName())
|
||||
.like(HostDO::getCode, request.getCode())
|
||||
.like(HostDO::getAddress, request.getAddress());
|
||||
.like(HostDO::getAddress, request.getAddress())
|
||||
.and(Strings.isNotEmpty(searchValue), c -> c
|
||||
.like(HostDO::getName, searchValue)
|
||||
.like(HostDO::getCode, searchValue)
|
||||
.like(HostDO::getAddress, searchValue)
|
||||
);
|
||||
if (setIdList) {
|
||||
wrapper.in(HostDO::getId, idList);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user