rev:个人信息修改

This commit is contained in:
2023-08-15 21:07:21 +08:00
parent 02d39afbd5
commit 6a8a9c6e40
4 changed files with 14 additions and 9 deletions

View File

@@ -43,7 +43,7 @@
dtl.*
FROM
sch_base_task task
LEFT JOIN st_ivt_structattr sa ON (sa.struct_code = task.point_code2 OR sa.struct_code = task.point_code1)
LEFT JOIN st_ivt_structattr sa ON (sa.struct_code = task.point_code3 OR sa.struct_code = task.point_code1)
LEFT JOIN st_ivt_checkdtl_bcp dtl ON dtl.struct_id = sa.struct_id
LEFT JOIN st_ivt_checkmst_bcp mst ON mst.check_id = dtl.check_id
<where>

View File

@@ -17,6 +17,7 @@ package org.nl.wms.system_manage.controller.user;
import cn.dev33.satoken.secure.SaSecureUtil;
import cn.dev33.satoken.stp.StpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -82,12 +83,12 @@ public class UserController {
@Log("修改用户:个人中心")
//("修改用户:个人中心")
// @PutMapping(value = "center")
@PutMapping(value = "center")
public ResponseEntity<Object> center(@RequestBody SysUser resources){
if(!resources.getUser_id().equals(StpUtil.getLoginIdAsLong())){
if(!resources.getUser_id().equals(StpUtil.getLoginIdAsString())){
throw new BadRequestException("不能修改他人资料");
}
userService.saveOrUpdate(resources);
userService.update(JSON.parseObject(JSON.toJSONString(resources)));
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}