💬 修改角色字段roleName为roleCode
This commit is contained in:
parent
04e4a15136
commit
7652b505f7
|
@ -19,9 +19,9 @@ public class RoleDto {
|
||||||
@Schema(name = "id", title = "主键ID")
|
@Schema(name = "id", title = "主键ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(name = "roleName", title = "角色名称")
|
@Schema(name = "roleCode", title = "角色码")
|
||||||
@NotBlank(message = "角色名称不能为空")
|
@NotBlank(message = "角色码不能为空")
|
||||||
private String roleName;
|
private String roleCode;
|
||||||
|
|
||||||
@Schema(name = "description", title = "角色描述")
|
@Schema(name = "description", title = "角色描述")
|
||||||
@NotBlank(message = "角色描述不能为空")
|
@NotBlank(message = "角色描述不能为空")
|
||||||
|
|
|
@ -14,8 +14,8 @@ import lombok.experimental.Accessors;
|
||||||
@Schema(name = "Role对象", title = "系统角色表", description = "系统角色表的实体类对象")
|
@Schema(name = "Role对象", title = "系统角色表", description = "系统角色表的实体类对象")
|
||||||
public class RoleEntity extends BaseEntity {
|
public class RoleEntity extends BaseEntity {
|
||||||
|
|
||||||
@Schema(name = "roleName", title = "角色名称")
|
@Schema(name = "roleCode", title = "角色码")
|
||||||
private String roleName;
|
private String roleCode;
|
||||||
|
|
||||||
@Schema(name = "description", title = "角色描述")
|
@Schema(name = "description", title = "角色描述")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
|
@ -21,8 +21,8 @@ public class RoleVo {
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(name = "roleName", title = "角色名称")
|
@Schema(name = "roleCode", title = "角色名称")
|
||||||
private String roleName;
|
private String roleCode;
|
||||||
|
|
||||||
@Schema(name = "description", title = "角色描述")
|
@Schema(name = "description", title = "角色描述")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<!-- 通用查询映射结果 -->
|
<!-- 通用查询映射结果 -->
|
||||||
<resultMap id="BaseResultMap" type="com.spring.step2.domain.entity.RoleEntity">
|
<resultMap id="BaseResultMap" type="com.spring.step2.domain.entity.RoleEntity">
|
||||||
<id column="id" property="id"/>
|
<id column="id" property="id"/>
|
||||||
<id column="role_name" property="roleName"/>
|
<id column="role_name" property="roleCode"/>
|
||||||
<id column="description" property="description"/>
|
<id column="description" property="description"/>
|
||||||
<id column="remark" property="remark"/>
|
<id column="remark" property="remark"/>
|
||||||
<id column="create_time" property="createTime"/>
|
<id column="create_time" property="createTime"/>
|
||||||
|
@ -30,8 +30,8 @@
|
||||||
<if test="dto.id != null and dto.id != ''">
|
<if test="dto.id != null and dto.id != ''">
|
||||||
and id like CONCAT('%',#{dto.id},'%')
|
and id like CONCAT('%',#{dto.id},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.roleName != null and dto.roleName != ''">
|
<if test="dto.roleCode != null and dto.roleCode != ''">
|
||||||
and role_name like CONCAT('%',#{dto.roleName},'%')
|
and role_code like CONCAT('%',#{dto.roleCode},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.description != null and dto.description != ''">
|
<if test="dto.description != null and dto.description != ''">
|
||||||
and description like CONCAT('%',#{dto.description},'%')
|
and description like CONCAT('%',#{dto.description},'%')
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
const DialogRole = {
|
const DialogRole = defineComponent({
|
||||||
name: "DialogRole",
|
name: "DialogRole",
|
||||||
template: `
|
template: `
|
||||||
<div class="modal fade" id="roleBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"
|
<div class="modal fade" id="roleBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"
|
||||||
aria-labelledby="roleBackdropLabel" aria-hidden="true" ref="modalRef">
|
aria-labelledby="roleBackdropLabel" ref="modalRef">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
|
||||||
|
@ -16,9 +16,9 @@ const DialogRole = {
|
||||||
<!-- 内容 -->
|
<!-- 内容 -->
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="dialogRoleName"><i class="fas fa-user-alt me-1"></i>角色名</label>
|
<label class="form-label" for="dialogRoleCode"><i class="fas fa-user-alt me-1"></i>角色名</label>
|
||||||
<input autocomplete="false" class="form-control" id="dialogRoleName" placeholder="请输入角色名"
|
<input autocomplete="false" class="form-control" id="dialogRoleCode" placeholder="请输入角色名"
|
||||||
type="text" v-model="form.roleName" required>
|
type="text" v-model="form.roleCode" required>
|
||||||
<div class="form-text">在这里输入你的角色名。</div>
|
<div class="form-text">在这里输入你的角色名。</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
|
@ -94,4 +94,4 @@ const DialogRole = {
|
||||||
this.modalInstance.dispose();
|
this.modalInstance.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
});
|
|
@ -44,9 +44,9 @@
|
||||||
<form @reset="onRest" @submit.prevent="onSearch">
|
<form @reset="onRest" @submit.prevent="onSearch">
|
||||||
<div class="row g-3 align-items-center">
|
<div class="row g-3 align-items-center">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<label class="form-label" for="roleName"><i class="fas fa-user-alt me-1"></i>角色名</label>
|
<label class="form-label" for="roleCode"><i class="fas fa-user-alt me-1"></i>角色名</label>
|
||||||
<input autocomplete="false" class="form-control" id="roleName" placeholder="请输入角色名"
|
<input autocomplete="false" class="form-control" id="roleCode" placeholder="请输入角色名"
|
||||||
type="text" v-model="searchForm.roleName">
|
type="text" v-model="searchForm.roleCode">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<label class="form-label" for="description"><i class="fas fa-text-width me-1"></i>描述</label>
|
<label class="form-label" for="description"><i class="fas fa-text-width me-1"></i>描述</label>
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr :key="role.id" v-for="(role,index) in dataList">
|
<tr :key="role.id" v-for="(role,index) in dataList">
|
||||||
<th scope="row">{{index + 1}}</th>
|
<th scope="row">{{index + 1}}</th>
|
||||||
<td>{{role.roleName}}</td>
|
<td>{{role.roleCode}}</td>
|
||||||
<td>{{role.description}}</td>
|
<td>{{role.description}}</td>
|
||||||
<td>{{role.remark}}</td>
|
<td>{{role.remark}}</td>
|
||||||
<td>{{formatDate(role.createTime)}}</td>
|
<td>{{formatDate(role.createTime)}}</td>
|
||||||
|
@ -142,7 +142,7 @@
|
||||||
return {
|
return {
|
||||||
// 查询表单
|
// 查询表单
|
||||||
searchForm: ref({
|
searchForm: ref({
|
||||||
roleName: undefined,
|
roleCode: undefined,
|
||||||
description: undefined,
|
description: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
|
@ -181,8 +181,9 @@
|
||||||
|
|
||||||
/* 重制表单 */
|
/* 重制表单 */
|
||||||
onRest() {
|
onRest() {
|
||||||
this.searchForm.roleName = undefined;
|
this.searchForm.roleCode = undefined;
|
||||||
this.searchForm.description = undefined;
|
this.searchForm.description = undefined;
|
||||||
|
this.searchForm.remark = undefined;
|
||||||
this.onSearch();
|
this.onSearch();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue