1.修改创建租户修改租户权限时的字段
2.主播列表增加 updateTime 字段 3.新增批量修改已分配给员工的主播给其他员工
This commit is contained in:
@@ -73,4 +73,7 @@ public class TenantSaveReqVO {
|
||||
@Schema(description = "是否允许登录爬虫客户端", example = "0不允许,1允许")
|
||||
private Byte bigBrother;
|
||||
|
||||
@Schema(description = "能否登录 AI 聊天工具", example = "0不允许,1允许")
|
||||
private Byte aiChat;
|
||||
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ public class UserController {
|
||||
@PutMapping("update-client-role")
|
||||
@Operation(summary = "修改用户客户端使用权限")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:update-client')")
|
||||
public CommonResult<Boolean> updateUserWithClientRole(@Valid @RequestBody UserSaveReqVO reqVO) {
|
||||
public CommonResult<Boolean> updateUserWithClientRole(@Valid @RequestBody UserClientSaveReqVO reqVO) {
|
||||
userService.updateUserWithClientRole(reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.user.vo.user;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.iocoder.yudao.framework.common.validation.Mobile;
|
||||
import cn.iocoder.yudao.module.system.framework.operatelog.core.DeptParseFunction;
|
||||
import cn.iocoder.yudao.module.system.framework.operatelog.core.PostParseFunction;
|
||||
import cn.iocoder.yudao.module.system.framework.operatelog.core.SexParseFunction;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.mzt.logapi.starter.annotation.DiffLogField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.Set;
|
||||
|
||||
@Schema(description = "管理后台 - 用户创建客户端用户/修改 Request VO")
|
||||
@Data
|
||||
public class UserClientSaveReqVO {
|
||||
|
||||
@Schema(description = "用户编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
|
||||
@Schema(description = "是否允许登录主播爬虫客户端", example = "0不允许,1允许")
|
||||
private Byte crawl;
|
||||
|
||||
@Schema(description = "是否允许登录大哥爬虫客户端", example = "0不允许,1允许")
|
||||
private Byte bigBrother;
|
||||
|
||||
@Schema(description = "租户 Id", example = "1")
|
||||
private Long tenantId;
|
||||
|
||||
@Schema(description = "能否登录 AI 聊天工具", example = "0不允许,1允许")
|
||||
private Byte aiChat;
|
||||
}
|
||||
@@ -78,5 +78,6 @@ public class UserRespVO{
|
||||
@Schema(description = "爬取大哥")
|
||||
private Byte bigBrother;
|
||||
|
||||
|
||||
@Schema(description = "爬取大哥")
|
||||
private Byte aiChat;
|
||||
}
|
||||
|
||||
@@ -85,4 +85,7 @@ public class UserSaveReqVO {
|
||||
|
||||
@Schema(description = "租户 Id", example = "1")
|
||||
private Long tenantId;
|
||||
|
||||
@Schema(description = "能否登录 AI 聊天工具", example = "0不允许,1允许")
|
||||
private Byte aiChat;
|
||||
}
|
||||
|
||||
@@ -97,8 +97,12 @@ public class AdminUserDO extends TenantBaseDO {
|
||||
/**
|
||||
* 是否允许登录
|
||||
*/
|
||||
@Schema(description = "是否允许登录爬虫客户端", example = "0不允许,1允许")
|
||||
private Byte crawl;
|
||||
|
||||
@Schema(description = "是否允许登录爬虫客户端", example = "0不允许,1允许")
|
||||
private Byte bigBrother;
|
||||
|
||||
@Schema(description = "是否允许登录AI客户端", example = "0不允许,1允许")
|
||||
private Byte aiChat;
|
||||
}
|
||||
|
||||
@@ -208,5 +208,5 @@ public interface AdminUserService {
|
||||
|
||||
List<UserRespVO> getTenantUserById(Long tenantId);
|
||||
|
||||
void updateUserWithClientRole(@Valid UserSaveReqVO reqVO);
|
||||
void updateUserWithClientRole(@Valid UserClientSaveReqVO reqVO);
|
||||
}
|
||||
|
||||
@@ -546,20 +546,10 @@ public class AdminUserServiceImpl implements AdminUserService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUserWithClientRole(UserSaveReqVO reqVO) {
|
||||
reqVO.setPassword(null); // 特殊:此处不更新密码
|
||||
// 1. 校验正确性
|
||||
AdminUserDO oldUser = validateUserForCreateOrUpdate(reqVO.getId(), reqVO.getUsername(),reqVO.getTenantId());
|
||||
|
||||
public void updateUserWithClientRole(UserClientSaveReqVO reqVO) {
|
||||
// 2.1 更新用户
|
||||
AdminUserDO updateObj = BeanUtils.toBean(reqVO, AdminUserDO.class);
|
||||
userMapper.updateById(updateObj);
|
||||
// 2.2 更新岗位
|
||||
updateUserPost(reqVO, updateObj);
|
||||
|
||||
// 3. 记录操作日志上下文
|
||||
LogRecordContext.putVariable(DiffParseFunction.OLD_OBJECT, BeanUtils.toBean(oldUser, UserSaveReqVO.class));
|
||||
LogRecordContext.putVariable("user", oldUser);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user