mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 15:13:55 +08:00
后端
参数管理新增参数: server.beian_icp_num server.beian_ga_num 修改: 参数查询支持备注查询
This commit is contained in:
+2
@@ -203,6 +203,8 @@ public class LoginController {
|
||||
config.put("allowUserRegister", sysUserService.getAllowUserRegister());
|
||||
List<SysDictDataItem> list = sysDictDataService.getDictDataByType("MOBILE_AREA");
|
||||
config.put("mobileAreaList", list);
|
||||
config.put("beianIcpNum", sysParamsService.getValue("beian_icp_num", true));
|
||||
config.put("beianGaNum", sysParamsService.getValue("beian_ga_num", true));
|
||||
|
||||
return new Result<Map<String, Object>>().ok(config);
|
||||
}
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ public class SysParamsController {
|
||||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", in = ParameterIn.QUERY, required = true, ref = "int"),
|
||||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段", in = ParameterIn.QUERY, ref = "String"),
|
||||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)", in = ParameterIn.QUERY, ref = "String"),
|
||||
@Parameter(name = "paramCode", description = "参数编码", in = ParameterIn.QUERY, ref = "String")
|
||||
@Parameter(name = "paramCode", description = "参数编码或参数备注", in = ParameterIn.QUERY, ref = "String")
|
||||
})
|
||||
@RequiresPermissions("sys:role:superAdmin")
|
||||
public Result<PageData<SysParamsDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params) {
|
||||
|
||||
+3
-1
@@ -55,7 +55,9 @@ public class SysParamsServiceImpl extends BaseServiceImpl<SysParamsDao, SysParam
|
||||
|
||||
QueryWrapper<SysParamsEntity> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("param_type", 1);
|
||||
wrapper.like(StringUtils.isNotBlank(paramCode), "param_code", paramCode);
|
||||
wrapper.nested(StringUtils.isNotBlank(paramCode),i->i.like("param_code", paramCode)
|
||||
.or()
|
||||
.like("remark", paramCode));
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
delete from sys_params where id in (700,701);
|
||||
INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (700, 'beian_icp_num', '', 'string', 1, 'ipc备案号');
|
||||
INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (701, 'beian_ga_num', '', 'string', 1, '公安备案号');
|
||||
@@ -149,3 +149,10 @@ databaseChangeLog:
|
||||
- sqlFile:
|
||||
encoding: utf8
|
||||
path: classpath:db/changelog/202505142037.sql
|
||||
- changeSet:
|
||||
id: 202505182232
|
||||
author: amen
|
||||
changes:
|
||||
- sqlFile:
|
||||
encoding: utf8
|
||||
path: classpath:db/changelog/202505182232.sql
|
||||
Reference in New Issue
Block a user