mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-29 22:56:40 +08:00
add 添加模型分类查询
This commit is contained in:
parent
b809773773
commit
52bf215b6d
@ -33,6 +33,12 @@ public class ModelBo extends PageEntity implements Serializable {
|
||||
@NotBlank(message = "模型标识key不能为空", groups = {AddGroup.class})
|
||||
private String key;
|
||||
|
||||
/**
|
||||
* 模型标识key
|
||||
*/
|
||||
@NotBlank(message = "模型分类不能为空", groups = {AddGroup.class})
|
||||
private String categoryCode;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
@ -83,6 +83,9 @@ public class ActModelServiceImpl implements IActModelService {
|
||||
if (StringUtils.isNotEmpty(modelBo.getKey())) {
|
||||
query.modelKey(modelBo.getKey());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(modelBo.getCategoryCode())) {
|
||||
query.modelCategory(modelBo.getCategoryCode());
|
||||
}
|
||||
query.orderByLastUpdateTime().desc();
|
||||
//创建时间降序排列
|
||||
query.orderByCreateTime().desc();
|
||||
@ -125,6 +128,7 @@ public class ActModelServiceImpl implements IActModelService {
|
||||
Model model = repositoryService.newModel();
|
||||
model.setKey(key);
|
||||
model.setName(name);
|
||||
model.setCategory(modelBo.getCategoryCode());
|
||||
model.setVersion(version);
|
||||
model.setTenantId(TenantHelper.getTenantId());
|
||||
ObjectMapper objectMapper = JsonUtils.getObjectMapper();
|
||||
|
Loading…
Reference in New Issue
Block a user