生成主机秘钥卡片视图.
This commit is contained in:
@@ -21,6 +21,9 @@ import javax.validation.constraints.Size;
|
||||
@Schema(name = "HostKeyQueryRequest", description = "主机秘钥 查询请求对象")
|
||||
public class HostKeyQueryRequest extends PageRequest {
|
||||
|
||||
@Schema(description = "搜索")
|
||||
private String searchValue;
|
||||
|
||||
@Schema(description = "id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@@ -202,9 +202,14 @@ public class HostKeyServiceImpl implements HostKeyService {
|
||||
* @return wrapper
|
||||
*/
|
||||
private LambdaQueryWrapper<HostKeyDO> buildQueryWrapper(HostKeyQueryRequest request) {
|
||||
String searchValue = request.getSearchValue();
|
||||
return hostKeyDAO.wrapper()
|
||||
.eq(HostKeyDO::getId, request.getId())
|
||||
.like(HostKeyDO::getName, request.getName());
|
||||
.like(HostKeyDO::getName, request.getName())
|
||||
.and(Strings.isNotEmpty(searchValue), c -> c
|
||||
.eq(HostKeyDO::getId, searchValue).or()
|
||||
.like(HostKeyDO::getName, searchValue)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -257,8 +257,8 @@ public class HostServiceImpl implements HostService {
|
||||
.like(HostDO::getCode, request.getCode())
|
||||
.like(HostDO::getAddress, request.getAddress())
|
||||
.and(Strings.isNotEmpty(searchValue), c -> c
|
||||
.like(HostDO::getName, searchValue)
|
||||
.like(HostDO::getCode, searchValue)
|
||||
.like(HostDO::getName, searchValue).or()
|
||||
.like(HostDO::getCode, searchValue).or()
|
||||
.like(HostDO::getAddress, searchValue)
|
||||
);
|
||||
if (setIdList) {
|
||||
|
||||
Reference in New Issue
Block a user