微调
This commit is contained in:
@@ -92,21 +92,28 @@ public class DictTreeServiceImpl extends ServiceImpl<DictTreeMapper, DictTree> i
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public boolean updateDictTree(DictTreeParam.UpdateParam param) {
|
||||
DictTree dictTree = this.getById(param.getId());
|
||||
if("975f63baeb6f653c54fca226a9ae36ca".equals(param.getId()) || dictTree.getPids().contains("975f63baeb6f653c54fca226a9ae36ca")){
|
||||
throw new BusinessException(SystemResponseEnum.CAN_NOT_UPDATE_USED_DICT);
|
||||
}
|
||||
checkRepeat(param, true);
|
||||
boolean result;
|
||||
DictTree dictTree = new DictTree();
|
||||
BeanUtils.copyProperties(param, dictTree);
|
||||
result = this.updateById(dictTree);
|
||||
DictTree copyDictTree = new DictTree();
|
||||
BeanUtils.copyProperties(param, copyDictTree);
|
||||
// if (result) {
|
||||
// refreshDictTreeCache();
|
||||
// }
|
||||
return result;
|
||||
return this.updateById(copyDictTree);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public boolean deleteDictTree(String id) {
|
||||
boolean result = false;
|
||||
DictTree dictTree = this.getById(id);
|
||||
if("975f63baeb6f653c54fca226a9ae36ca".equals(id) || dictTree.getPids().contains("975f63baeb6f653c54fca226a9ae36ca")){
|
||||
throw new BusinessException(SystemResponseEnum.CAN_NOT_DELETE_USED_DICT);
|
||||
}
|
||||
|
||||
List<DictTree> childrenList = this.lambdaQuery().eq(DictTree::getState, DictConst.ENABLE).eq(DictTree::getPid, id).list();
|
||||
if (CollectionUtils.isEmpty(childrenList)) {
|
||||
result = this.lambdaUpdate().set(DictTree::getState, DictConst.DELETE).in(DictTree::getId, id).update();
|
||||
|
||||
@@ -48,8 +48,8 @@ public class LogAdvice implements ApplicationListener<ContextRefreshedEvent> {
|
||||
|
||||
private BlockingQueue<SysLogAudit> logQueue = new LinkedBlockingDeque<>();
|
||||
|
||||
// @Pointcut(value = "execution(* com.njcn.gather..controller.*(..))")
|
||||
@Pointcut(value = "execution(* com.njcn.gather..controller.*.*(..)) && !execution(* com.njcn.gather..controller.AuthController.*(..))")
|
||||
@Pointcut(value = "execution(* com.njcn.gather..controller.*(..))")
|
||||
//@Pointcut(value = "execution(* com.njcn.gather..controller.*.*(..)) && !execution(* com.njcn.gather..controller.AuthController.*(..))")
|
||||
public void logPointcut() {
|
||||
}
|
||||
|
||||
|
||||
@@ -14,36 +14,36 @@ public enum SystemResponseEnum {
|
||||
* 系统模块异常响应码的范围:
|
||||
* A00350 ~ A00449
|
||||
*/
|
||||
SYSTEM_COMMON_ERROR("A00350","系统模块异常"),
|
||||
SYSTEM_COMMON_ERROR("A00350", "系统模块异常"),
|
||||
DICT_TYPE_REPEAT("A00351", "字典类型名称或编码重复"),
|
||||
DICT_DATA_REPEAT("A00352", "字典数据名称或编码重复"),
|
||||
AREA_CODE_REPEAT("A00353","行政区域编码重复"),
|
||||
LOAD_TYPE_EMPTY("A00354","用能负荷数据为空"),
|
||||
LINE_MARK_EMPTY("A00355","字典监测点评分等级数据为空"),
|
||||
VOLTAGE_EMPTY("A00356","查询字典电压等级数据为空"),
|
||||
AREA_CODE_REPEAT("A00353", "行政区域编码重复"),
|
||||
LOAD_TYPE_EMPTY("A00354", "用能负荷数据为空"),
|
||||
LINE_MARK_EMPTY("A00355", "字典监测点评分等级数据为空"),
|
||||
VOLTAGE_EMPTY("A00356", "查询字典电压等级数据为空"),
|
||||
|
||||
INTERFERENCE_EMPTY("A00356","查询字典干扰源类型数据为空"),
|
||||
BUSINESS_EMPTY("A00356","查询字典行业类型数据为空"),
|
||||
SYSTEM_TYPE_EMPTY("A00356","查询字典系统类型数据为空"),
|
||||
DEV_TYPE_EMPTY("A00357","查询字典设备类型数据为空"),
|
||||
MANUFACTURER("A00358","查询字典终端厂家数据为空"),
|
||||
DEV_VARIETY("A00359","查询字典终端类型数据为空"),
|
||||
INTERFERENCE_EMPTY("A00356", "查询字典干扰源类型数据为空"),
|
||||
BUSINESS_EMPTY("A00356", "查询字典行业类型数据为空"),
|
||||
SYSTEM_TYPE_EMPTY("A00356", "查询字典系统类型数据为空"),
|
||||
DEV_TYPE_EMPTY("A00357", "查询字典设备类型数据为空"),
|
||||
MANUFACTURER("A00358", "查询字典终端厂家数据为空"),
|
||||
DEV_VARIETY("A00359", "查询字典终端类型数据为空"),
|
||||
|
||||
/*pms*/
|
||||
LINE_TYPE_VARIETY_EMPTY("A00360","查询字典监测点类型数据为空"),
|
||||
LINE_STATE_EMPTY("A00361","查询字典监测点状态为空"),
|
||||
LINE_TYPE_EMPTY("A00362","查询字典监测点类型状态为空"),
|
||||
POTENTIAL_TYPE_EMPTY("A00363","查询字典电压互感器类型为空"),
|
||||
Neutral_Mode_EMPTY("A00364","查询字典中性点接地方式为空"),
|
||||
MONITOR_TAG_EMPTY("A00365","查询字典监测点标签类型为空"),
|
||||
MONITORY_TYPE_EMPTY("A00366","查询字典监测对象类型为空"),
|
||||
TERMINAL_WIRING_EMPTY("A00367","查询字典监测终端接线方式为空"),
|
||||
MONITOR_TYPE_EMPTY("A00368","查询字典监测点类别为空"),
|
||||
ACTIVATED_STATE("A00369","必须存在一个已激活的系统类型"),
|
||||
ADVANCE_REASON("A00370","查询字典暂降原因为空"),
|
||||
EFFECT_STATUS_EMPTY("A00370","查询字典实施状态为空"),
|
||||
LINE_TYPE_VARIETY_EMPTY("A00360", "查询字典监测点类型数据为空"),
|
||||
LINE_STATE_EMPTY("A00361", "查询字典监测点状态为空"),
|
||||
LINE_TYPE_EMPTY("A00362", "查询字典监测点类型状态为空"),
|
||||
POTENTIAL_TYPE_EMPTY("A00363", "查询字典电压互感器类型为空"),
|
||||
Neutral_Mode_EMPTY("A00364", "查询字典中性点接地方式为空"),
|
||||
MONITOR_TAG_EMPTY("A00365", "查询字典监测点标签类型为空"),
|
||||
MONITORY_TYPE_EMPTY("A00366", "查询字典监测对象类型为空"),
|
||||
TERMINAL_WIRING_EMPTY("A00367", "查询字典监测终端接线方式为空"),
|
||||
MONITOR_TYPE_EMPTY("A00368", "查询字典监测点类别为空"),
|
||||
ACTIVATED_STATE("A00369", "必须存在一个已激活的系统类型"),
|
||||
ADVANCE_REASON("A00370", "查询字典暂降原因为空"),
|
||||
EFFECT_STATUS_EMPTY("A00370", "查询字典实施状态为空"),
|
||||
|
||||
EVENT_REPORT_REPEAT("A00361","暂态报告模板重复"),
|
||||
EVENT_REPORT_REPEAT("A00361", "暂态报告模板重复"),
|
||||
NOT_EXISTED("A00361", "您查询的该条记录不存在"),
|
||||
TIMER_NO_CLASS("A00361", "请检查定时任务是否添加"),
|
||||
|
||||
@@ -65,7 +65,9 @@ public enum SystemResponseEnum {
|
||||
DELETE_DATA("A0303", "导入旧日志文件异常:删除数据失败"),
|
||||
MULTIPLE_CLICKS_LOG_FILE_WRITER("A0304", "当前文件备份数据未结束,请勿多次点击"),
|
||||
MULTIPLE_CLICKS_RECOVER_LOG_FILE("A0303", "当前文件恢复数据未结束,请勿多次点击"),
|
||||
CODE_REPEAT("A0305","该层级下已存在相同的编码" );
|
||||
CODE_REPEAT("A0305", "该层级下已存在相同的编码"),
|
||||
CAN_NOT_DELETE_USED_DICT("A0306", "该字典在使用中,不能删除"),
|
||||
CAN_NOT_UPDATE_USED_DICT("A0307", "该字典在使用中,不能修改");
|
||||
|
||||
private final String code;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user