add:第一版测试版本功能优化。1.F机器人修改调度上报异常信息,后端存储异常信息和异常处理,增加异常信息和异常处理方法excel导入功能。2.添加密码校验、修改密码功能。
This commit is contained in:
@@ -37,7 +37,12 @@ public enum SettingCodeEnum {
|
||||
/**
|
||||
* 充电时是否可呼叫
|
||||
*/
|
||||
CAN_IT_BE_CALLED_WHILE_CHARGING("6", "can_it_be_called_while_charging", "充电时是否可呼叫");
|
||||
CAN_IT_BE_CALLED_WHILE_CHARGING("6", "can_it_be_called_while_charging", "充电时是否可呼叫"),
|
||||
|
||||
/**
|
||||
* 显示屏密码
|
||||
*/
|
||||
SCREEN_PASSWORD("7", "password", "显示屏密码");
|
||||
|
||||
private String code;
|
||||
private String name;
|
||||
|
||||
@@ -26,10 +26,10 @@ public class SettingAPIProvider implements SettingAPI {
|
||||
private SettingService settingService;
|
||||
|
||||
@Override
|
||||
public JSONObject querySttingParamIsActiveByCode(String setting_code) {
|
||||
public JSONObject querySettingParamByCode(String setting_code) {
|
||||
if (StrUtil.isBlank(setting_code)){
|
||||
log.info("设置编号不能为空");
|
||||
throw new BadRequestException("设置编号不能为空");
|
||||
return null;
|
||||
}
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("data",settingService.getOne(new LambdaQueryWrapper<>(Setting.class).eq(Setting::getSetting_code,setting_code)));
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.setting.modular.service.impl;
|
||||
|
||||
import cn.dev33.satoken.secure.SaSecureUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -20,6 +21,8 @@ import org.nl.setting.modular.enums.SettingCodeEnum;
|
||||
import org.nl.setting.modular.mapper.SettingMapper;
|
||||
import org.nl.setting.modular.param.UpdateSettingParam;
|
||||
import org.nl.setting.modular.service.SettingService;
|
||||
import org.nl.util.RsaUtils;
|
||||
import org.nl.util.URLConstant;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -66,6 +69,7 @@ public class SettingServiceImpl extends ServiceImpl<SettingMapper, Setting> impl
|
||||
switch (settingCodeEnum){
|
||||
case SCHEDULE_IP:
|
||||
log.info("修改调度IP");
|
||||
URLConstant.SCHEDULE_IP_PORT = setting_value;
|
||||
break;
|
||||
case DELIVERY_SPEED:
|
||||
log.info("修改配送速度");
|
||||
@@ -120,6 +124,11 @@ public class SettingServiceImpl extends ServiceImpl<SettingMapper, Setting> impl
|
||||
throw new BadRequestException("设置调度可接任务阈值失败");
|
||||
}
|
||||
break;
|
||||
case SCREEN_PASSWORD:
|
||||
log.info("修改显示屏密码");
|
||||
String newPassword = RsaUtils.decryptByPrivateKey(RsaUtils.privateKey,setting_value);
|
||||
setting_value = SaSecureUtil.md5BySalt(newPassword,"salt");
|
||||
break;
|
||||
}
|
||||
|
||||
settingMapper.update(new LambdaUpdateWrapper<>(Setting.class)
|
||||
|
||||
Reference in New Issue
Block a user