Commit bc93298c authored by liqin's avatar liqin 💬

Merge branch 'master' of http://111.203.232.171:8888/lee/chnmuseum-party into master

parents 2b7f1725 0eb73f41
......@@ -114,7 +114,9 @@ public class SystemOperationLogService extends ServiceImpl<SysLogMapper, SysLog>
TOperationLog operationLog = new TOperationLog();
operationLog.setCreateTime(LocalDateTime.now());
operationLog.setUserId(user.getId());
operationLog.setArea(user.getAreaName());
if (user.getAreaName()!=null) {
operationLog.setArea(user.getAreaName());
}
operationLog.setOperationType(methodLog.operType().getMsg());
operationLogService.save(operationLog);
return object;
......
......@@ -58,7 +58,6 @@ public class TOperationLog implements Serializable {
@ApiModelProperty("运维区域")
@TableField("area")
@NotBlank(message = "运维区域不能为空", groups = {Add.class, Update.class})
private String area;
@ApiModelProperty("操作内容")
......
......@@ -17,6 +17,7 @@ import cn.wisenergy.chnmuseum.party.service.TUserRoleService;
import cn.wisenergy.chnmuseum.party.service.TUserService;
import cn.wisenergy.chnmuseum.party.service.impl.AuditServiceImpl;
import cn.wisenergy.chnmuseum.party.service.impl.TBoxOperationServiceImpl;
import cn.wisenergy.chnmuseum.party.service.impl.TOrganServiceImpl;
import cn.wisenergy.chnmuseum.party.web.controller.base.BaseController;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
......@@ -55,6 +56,9 @@ public class TUserController extends BaseController {
@Resource
private TUserService userService;
@Resource
private TOrganServiceImpl organService;
@Resource
private TUserRoleService tUserRoleService;
......@@ -92,6 +96,9 @@ public class TUserController extends BaseController {
if (user1.getRoleList().size()>0&&!user1.getRoleList().contains("1")) {
//设置用户数据权限
user.setOrgCode(user1.getOrgCode());
if (user1.getRoleList().contains("3")){
user.setOrgCode(null);
}
}
if ("2".equals(type)) {
List<String> roleList = user1.getRoleList();
......@@ -236,6 +243,8 @@ public class TUserController extends BaseController {
return resultMap;
}
}
TOrgan byId = organService.getById(user.getOrgId());
user.setAreaId(byId.getAreaId());
byte[] passwordSalt = SecureRandomSaltService.generateSalt();
byte[] passwordHash = SHA256PasswordEncryptionService
......@@ -648,6 +657,8 @@ public class TUserController extends BaseController {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(resultMap);
}
}
TOrgan byId = organService.getById(user.getOrgId());
user.setAreaId(byId.getAreaId());
byte[] passwordSalt = SecureRandomSaltService.generateSalt();
byte[] passwordHash = SHA256PasswordEncryptionService
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment