Commit 69926ce2 authored by hongguangwu's avatar hongguangwu

1.5.8-hgw-权限-角色-账号

parent 2517a433
...@@ -20,10 +20,8 @@ import com.baomidou.mybatisplus.annotation.IdType; ...@@ -20,10 +20,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
...@@ -36,9 +34,8 @@ import javax.validation.constraints.NotBlank; ...@@ -36,9 +34,8 @@ import javax.validation.constraints.NotBlank;
*/ */
@Data @Data
@TableName("sys_role_menu_res") @TableName("sys_role_menu_res")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "新权限-角色-菜单-关联表") @Schema(description = "新权限-角色-菜单-关联表")
public class SysRoleMenuRes extends BaseEntity { public class SysRoleMenuRes {
/** /**
* 主键 * 主键
......
...@@ -20,10 +20,8 @@ import com.baomidou.mybatisplus.annotation.IdType; ...@@ -20,10 +20,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
...@@ -36,9 +34,8 @@ import javax.validation.constraints.NotBlank; ...@@ -36,9 +34,8 @@ import javax.validation.constraints.NotBlank;
*/ */
@Data @Data
@TableName("sys_user_role_res") @TableName("sys_user_role_res")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "新权限-账号-角色关联表") @Schema(description = "新权限-账号-角色关联表")
public class SysUserRoleRes extends BaseEntity { public class SysUserRoleRes {
/** /**
* 主键 * 主键
......
...@@ -111,6 +111,9 @@ public class SysRoleInfoServiceImpl extends ServiceImpl<SysRoleInfoMapper, SysRo ...@@ -111,6 +111,9 @@ public class SysRoleInfoServiceImpl extends ServiceImpl<SysRoleInfoMapper, SysRo
return R.failed("名称已存在"); return R.failed("名称已存在");
} }
this.saveOrUpdate(role); this.saveOrUpdate(role);
for (SysRoleMenuRes res : resList) {
res.setRoleId(role.getFdId());
}
sysRoleMenuResService.saveBatch(resList); sysRoleMenuResService.saveBatch(resList);
return R.ok("保存成功"); return R.ok("保存成功");
} }
......
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