liuxm
2024-04-25 6d5a7893cf2813f387f350f136ae104c8708faf1
修改用户,角色查询参数
8个文件已修改
41 ■■■■■ 已修改文件
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoBa/BaRole.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoBa/BaUser.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/BaRoleMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/BaUserMapper.xml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/log/QueryVo.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/QueryVo.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/user/QueryVo.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/user/UserCtrl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoBa/BaRole.java
@@ -60,9 +60,9 @@
    /**
     * 创建时间
     */
    @TableField(value = "create_dt", fill = FieldFill.INSERT)
    @TableField(value = "dt", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date createDt;
    public Date dt;
    /**
     * 前端web界面提交的角色所属权限的id,其是一个字符串数组
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoBa/BaUser.java
@@ -83,9 +83,9 @@
    /**
     * 创建时间
     */
    @TableField(value = "create_dt", fill = FieldFill.INSERT)
    @TableField(value = "dt", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date createDt;
    public Date dt;
    //////////////////////////////////////
    // 以下不是数据库实体属性
pms-parent/pms-global/src/main/resources/mapper/BaRoleMapper.xml
@@ -8,7 +8,7 @@
    <result column="name" property="name" />
    <result column="disabled" property="disabled" />
    <result column="deleted" property="deleted" />
    <result column="create_dt" property="createDt" />
    <result column="dt" property="dt" />
  </resultMap>
  <resultMap id="partResultMap" type="com.dy.pmsGlobal.pojoBa.BaRole">
    <result column="id" property="id" />
@@ -21,12 +21,12 @@
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, `name`, disabled, deleted,create_dt
    id, `name`, disabled, deleted,dt
  </sql>
  <sql id="Part_Column_List">
    <!--@mbg.generated-->
    id, `name`, disabled,create_dt
    id, `name`, disabled,dt
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="someResultMap">
@@ -147,6 +147,12 @@
      <if test="name != null and name != ''">
        r.name like concat('%', #{name}, '%') and
      </if>
      <if test="disable != null and disable != ''">
        r.disable =#{disabled,jdbcType=BOOLEAN} and
      </if>
      <if test="dt != null and dt != ''">
        DATE_FORMAT(r.dt, '%Y-%m-%d') = #{dt,jdbcType=TIMESTAMP} and
      </if>
    </trim>
    order by id DESC
    <trim prefix="limit " >
pms-parent/pms-global/src/main/resources/mapper/BaUserMapper.xml
@@ -11,7 +11,7 @@
    <result column="supper_admin" property="supperAdmin" />
    <result column="disabled" property="disabled" typeHandler="com.dy.common.mybatis.BooleanTypeHandler" />
    <result column="deleted" property="deleted" typeHandler="com.dy.common.mybatis.BooleanTypeHandler" />
    <result column="create_dt" property="createDt" />
    <result column="dt" property="dt" />
  </resultMap>
  <resultMap id="partResultMap" type="com.dy.pmsGlobal.pojoBa.BaUser">
    <!--@mbg.generated-->
@@ -37,10 +37,10 @@
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, `name`, phone, `password`, supper_admin, disabled, deleted,create_dt
    id, `name`, phone, `password`, supper_admin, disabled, deleted,dt
  </sql>
  <sql id="part_Column_List">
    ${alias}.id, ${alias}.name, ${alias}.phone, ${alias}.password, ${alias}.disabled,${alias}.create_dt
    ${alias}.id, ${alias}.name, ${alias}.phone, ${alias}.password, ${alias}.disabled,${alias}.dt
  </sql>
  <sql id="Login_Column_List">
    id, name, phone, supper_admin
@@ -99,10 +99,13 @@
        bu.name like concat('%', #{name}, '%') and
      </if>
      <if test="phone != null and phone !=''">
        bu.phone = #{phone,jdbcType=VARCHAR}
        bu.phone = #{phone,jdbcType=VARCHAR} and
      </if>
      <if test="roleId != null">
        ur.role_id=#{roleId,jdbcType=BIGINT}
        ur.role_id=#{roleId,jdbcType=BIGINT} and
      </if>
      <if test="disabled != null">
        bu.disabled=#{disabled,jdbcType=BOOLEAN}
      </if>
    </trim>
    order by id DESC
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/log/QueryVo.java
@@ -10,5 +10,5 @@
@AllArgsConstructor
@Builder
public class QueryVo extends QueryConditionVo {
    public String name;
    public String userName;
}
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/QueryVo.java
@@ -11,4 +11,6 @@
@Builder
public class QueryVo extends QueryConditionVo {
    public String name;
    public boolean disable;
    public String dt;
}
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/user/QueryVo.java
@@ -16,5 +16,7 @@
    public String phone;
    public Long roleId;
    public Long disabled;
}
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/user/UserCtrl.java
@@ -207,7 +207,7 @@
                }
            }
        } catch (Exception e) {
            log.error("保存用户异常", e);
            log.error("修改密码异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {