opt: 优化

This commit is contained in:
yanps
2024-02-04 18:00:15 +08:00
parent 95c0ce68a7
commit 160cbd506a
6 changed files with 13 additions and 4 deletions

View File

@@ -256,6 +256,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
if (!StrUtil.isEmpty(create_time) && !StrUtil.isEmpty(end_time)) {
wrapper.between(InstructionMybatis::getCreate_time, create_time, end_time);
}
wrapper.orderByDesc(InstructionMybatis::getCreate_time);
IPage<InstructionMybatis> insPage = instructionMapper.selectPage(queryPage, wrapper);
final JSONObject json = (JSONObject) JSON.toJSON(ConvertUtil.convertPage(insPage, InstructionDto.class));
return json;

View File

@@ -237,6 +237,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
String status = (String) whereJson.get("status");
String point_code = (String) whereJson.get("point_code");
String is_over = (String) whereJson.get("is_over");
String task_type = (String) whereJson.get("task_type");
IPage<Task> queryPage = PageUtil.toMybatisPage(page);
LambdaQueryWrapper<Task> wrapper = new LambdaQueryWrapper<>();
@@ -255,6 +256,9 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
if (!StrUtil.isEmpty(point_code)) {
wrapper.and(task -> task.like(Task::getStart_point_code, point_code).or().like(Task::getNext_point_code, point_code));
}
if(StrUtil.isNotEmpty(task_type)){
wrapper.eq(Task::getTask_type, task_type);
}
if (!StrUtil.isEmpty(is_over)) {
if (StrUtil.equals(is_over, CommonFinalParam.ONE)) {
wrapper.ge(Task::getTask_status, TaskStatusEnum.FINISHED.getIndex());
@@ -362,6 +366,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
if (!StrUtil.isEmpty(create_time) && !StrUtil.isEmpty(end_time)) {
wrapper.between(Task::getCreate_time, create_time, end_time);
}
wrapper.orderByDesc(Task::getCreate_time);
IPage<Task> taskPage = taskMapper.selectPage(queryPage, wrapper);
final JSONObject json = (JSONObject) JSON.toJSON(ConvertUtil.convertPage(taskPage, TaskDto.class));
JSONArray array = json.getJSONArray("content");

View File

@@ -18,7 +18,8 @@ export default {
'outside_chain': 'Out Chain',
'cache': 'Cache',
'visible': 'Visible',
'create_time': 'Create Time'
'create_time': 'Create Time',
'SystemParam': 'System Parameters'
},
'dialog': {
'menu_type': 'Menu Type',

View File

@@ -18,7 +18,8 @@ export default {
'outside_chain': 'Rantai Luar',
'cache': 'Cache',
'visible': 'Terlihat',
'create_time': 'Tarikh Penciptaan'
'create_time': 'Tarikh Penciptaan',
'SystemParam': 'Parameter Sistem'
},
'dialog': {
'menu_type': 'Jenis Menu',

View File

@@ -18,7 +18,8 @@ export default {
'outside_chain': '外链',
'cache': '缓存',
'visible': '可见',
'create_time': '创建日期'
'create_time': '创建日期',
'SystemParam': '系统参数'
},
'dialog': {
'menu_type': '菜单类型',

View File

@@ -81,7 +81,7 @@ export default {
components: { pagination, crudOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({ title: 'menu.SystemParam', url: 'api/param', idField: 'id', sort: 'id,desc', crudMethod: { ...crudParam },
return CRUD({ title: 'menu.table_title.SystemParam', url: 'api/param', idField: 'id', sort: 'id,desc', crudMethod: { ...crudParam },
optShow: {
add: true,
edit: true,