fix:修复修改密码报错问题
This commit is contained in:
@@ -308,7 +308,7 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
.device_code(device_code)
|
||||
.content(device_code + "当前mode值为:" + mode)
|
||||
.build();
|
||||
logDto.setLog_level(2);
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "当前mode值为:" + mode);
|
||||
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
||||
|
||||
@@ -726,7 +726,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
log.info("feedbackDie - 反馈管芯{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"feedbackDie", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(result2.body()),
|
||||
String.valueOf(param),
|
||||
String.valueOf(result2.body()), "反馈管芯抓取");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2;
|
||||
|
||||
@@ -92,6 +92,7 @@ public class LuceneLogDto {
|
||||
final String requestparam, final String responseparam, final String content) {
|
||||
super();
|
||||
this.log_level = log_level;
|
||||
this.method =method;
|
||||
this.requestparam = requestparam;
|
||||
this.responseparam = responseparam;
|
||||
this.content = content;
|
||||
|
||||
@@ -58,14 +58,14 @@ public class UserController {
|
||||
private ISysUserService userService;
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ResponseEntity<Object> query(UserQuery query, PageQuery page){
|
||||
return new ResponseEntity(TableDataInfo.build(userService.getUserDetail(query, page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("新增用户")
|
||||
|
||||
|
||||
@PostMapping
|
||||
// @SaCheckPermission("user:add")
|
||||
public ResponseEntity<Object> create(@RequestBody Map user){
|
||||
@@ -74,7 +74,7 @@ public class UserController {
|
||||
}
|
||||
|
||||
@Log("修改用户")
|
||||
|
||||
|
||||
@PutMapping
|
||||
// @SaCheckPermission("user:edit")
|
||||
public ResponseEntity<Object> update( @RequestBody Map resources) throws Exception {
|
||||
@@ -83,7 +83,7 @@ public class UserController {
|
||||
}
|
||||
|
||||
@Log("修改用户:个人中心")
|
||||
|
||||
|
||||
public ResponseEntity<Object> center(@RequestBody SysUser resources){
|
||||
if(!resources.getUser_id().equals(StpUtil.getLoginIdAsLong())){
|
||||
throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
@@ -93,24 +93,24 @@ public class UserController {
|
||||
}
|
||||
|
||||
@Log("删除用户")
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
userService.removeByIds(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping(value = "/updatePass")
|
||||
public ResponseEntity<Object> updatePass(@RequestBody JSONObject passVo) throws Exception {
|
||||
// 解密,得到字符密码
|
||||
String oldPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,passVo.getString("oldPass"));
|
||||
String newPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,passVo.getString("newPass"));
|
||||
SysUser user = userService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUsername, SecurityUtils.getCurrentNickName()));
|
||||
if (!SaSecureUtil.md5BySalt(user.getPassword(), "salt").equals(SaSecureUtil.md5BySalt(oldPass, "salt"))) {
|
||||
SysUser user = userService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUsername, SecurityUtils.getCurrentUsername()));
|
||||
if (!user.getPassword().equals(SaSecureUtil.md5BySalt(oldPass, "salt"))) {
|
||||
throw new BadRequestException(LangProcess.msg("login_pwdWrong_1"));
|
||||
}
|
||||
if (!SaSecureUtil.md5BySalt(user.getPassword(), "salt").equals(SaSecureUtil.md5BySalt(newPass, "salt"))) {
|
||||
if (user.getPassword().equals(SaSecureUtil.md5BySalt(newPass, "salt"))) {
|
||||
throw new BadRequestException(LangProcess.msg("login_pwdWrong_2"));
|
||||
}
|
||||
user.setPassword(SaSecureUtil.md5BySalt(newPass, "salt"));
|
||||
@@ -118,14 +118,14 @@ public class UserController {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping(value = "/updateAvatar")
|
||||
public ResponseEntity<Object> updateAvatar(@RequestParam MultipartFile avatar){
|
||||
return new ResponseEntity<>(userService.updateAvatar(avatar), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("修改邮箱")
|
||||
|
||||
|
||||
@PostMapping(value = "/updateEmail/{code}")
|
||||
public ResponseEntity<Object> updateEmail(@PathVariable String code,@RequestBody SysUser user) throws Exception {
|
||||
String password = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,user.getPassword());
|
||||
|
||||
@@ -14,13 +14,12 @@
|
||||
>
|
||||
<!-- <el-table-column type="selection" width="55"/>-->
|
||||
<!-- <el-table-column v-if="false" prop="id" label="id"/>-->
|
||||
<el-table-column prop="operate" label="操作" :min-width="flexWidth('operate',crud.data,操作)" />
|
||||
<!-- <el-table-column prop="trace_id" label="链路追踪" /> -->
|
||||
<el-table-column prop="method" label="方法" :min-width="flexWidth('method',crud.data,方法)" />
|
||||
<el-table-column prop="requestparam" label="请求参数" :show-overflow-tooltip="true" width="300px" />
|
||||
<el-table-column prop="responseparam" label="返回参数" :show-overflow-tooltip="true" width="300px" />
|
||||
<el-table-column prop="logTime" label="记录时间" :min-width="flexWidth('logTime',crud.data,记录时间)" />
|
||||
<el-table-column prop="content" label="内容详情" :show-overflow-tooltip="true" width="300px" />
|
||||
<el-table-column prop="method" label="方法" width="150px" />
|
||||
<el-table-column prop="requestparam" label="请求参数" class="text-wrapper" />
|
||||
<el-table-column prop="responseparam" label="返回参数" class="text-wrapper" />
|
||||
<el-table-column prop="logTime" label="记录时间" width="190px" />
|
||||
<el-table-column prop="content" label="内容详情" class="text-wrapper" />
|
||||
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
@@ -102,5 +101,8 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.text-wrapper {
|
||||
word-break: break-all;
|
||||
word-wrap: break-word
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -8,18 +8,14 @@
|
||||
<!-- style="width: 200px;"-->
|
||||
<!-- class="filter-item"-->
|
||||
<!-- />-->
|
||||
<el-select
|
||||
<el-input
|
||||
v-model="query.method"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
placeholder="请输入你要搜索的方法名"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
style="width: 200px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option v-for="item in methods" :key="item.id" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.requestparam"
|
||||
clearable
|
||||
|
||||
Reference in New Issue
Block a user