mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-14 11:05:06 +08:00
完善 BPM Model 的搜索功能
This commit is contained in:
@ -14,7 +14,13 @@ import lombok.ToString;
|
||||
@ToString(callSuper = true)
|
||||
public class ModelPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "名字", example = "芋道")
|
||||
@ApiModelProperty(value = "标识", example = "process1641042089407", notes = "精准匹配")
|
||||
private String key;
|
||||
|
||||
@ApiModelProperty(value = "名字", example = "芋道", notes = "模糊匹配")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
|
||||
private String category;
|
||||
|
||||
}
|
||||
|
@ -55,9 +55,15 @@ public class BpmModelServiceImpl implements BpmModelService {
|
||||
@Override
|
||||
public PageResult<BpmModelPageItemRespVO> getModelPage(ModelPageReqVO pageVO) {
|
||||
ModelQuery modelQuery = repositoryService.createModelQuery();
|
||||
if (StrUtil.isNotBlank(pageVO.getKey())) {
|
||||
modelQuery.modelKey(pageVO.getKey());
|
||||
}
|
||||
if (StrUtil.isNotBlank(pageVO.getName())) {
|
||||
modelQuery.modelNameLike("%" + pageVO.getName() + "%"); // 模糊匹配
|
||||
}
|
||||
if (StrUtil.isNotBlank(pageVO.getCategory())) {
|
||||
modelQuery.modelCategory(pageVO.getCategory());
|
||||
}
|
||||
// 执行查询
|
||||
List<Model> models = modelQuery.orderByCreateTime().desc()
|
||||
.listPage(PageUtils.getStart(pageVO), pageVO.getPageSize());
|
||||
|
Reference in New Issue
Block a user