feat:枚举表增加sort排序字段
This commit is contained in:
@@ -62,6 +62,7 @@ public class CommWebController {
|
||||
QueryWrapper<CoreConfigEnum> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("is_deleted", 0);
|
||||
queryWrapper.eq("type", dto.getType());
|
||||
queryWrapper.orderByAsc("type", "sort");
|
||||
List<CoreConfigEnum> selectList = coreConfigService.getEnumMapper().selectList(queryWrapper);
|
||||
|
||||
return ApiResp.respOK(selectList);
|
||||
|
||||
@@ -41,6 +41,7 @@ public class ConfigEnumController {
|
||||
if (!StrUtil.isEmpty(dto.getType())) {
|
||||
queryWrapper.eq("type", dto.getType());
|
||||
}
|
||||
queryWrapper.orderByAsc("type", "sort");
|
||||
List<CoreConfigEnum> selectList = coreConfigService.getEnumMapper().selectList(queryWrapper);
|
||||
|
||||
return ApiResp.respOK(selectList);
|
||||
|
||||
@@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.tiesheng.util.pojos.DaoBase;
|
||||
|
||||
/**
|
||||
* 配置-枚举
|
||||
*/
|
||||
* 配置-枚举
|
||||
*/
|
||||
@TableName(value = "core_config_enum")
|
||||
public class CoreConfigEnum extends DaoBase {
|
||||
/**
|
||||
@@ -21,6 +21,12 @@ public class CoreConfigEnum extends DaoBase {
|
||||
@TableField(value = "`name`")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@TableField(value = "sort")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@@ -69,6 +75,24 @@ public class CoreConfigEnum extends DaoBase {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取排序
|
||||
*
|
||||
* @return sort - 排序
|
||||
*/
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置排序
|
||||
*
|
||||
* @param sort 排序
|
||||
*/
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取备注
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user