刘小明
2024-08-26 591e3b8a10ed15023f3ad9e5a72a887ef89b0bb2
pms-parent/pms-global/src/main/resources/mapper/BaPrivilegeMapper.xml
@@ -41,7 +41,7 @@
    inner join ba_user_role ur on rp.role_id = ur.role_id
    inner join ba_role r on ur.role_id = r.id
    where r.deleted != 1
    <if test="userId != null">
    <if test="userId != null and userId !=''">
      and ur.user_id = #{userId, jdbcType=BIGINT}
    </if>
  </select>
@@ -50,7 +50,7 @@
    select p.id
    from ba_privilege p
    inner join ba_role_privilege rp on p.id = rp.privilege_id
    <if test="roleId != null">
    <if test="roleId != null and roleId !=''">
      where rp.role_id = #{roleId, jdbcType=BIGINT}
    </if>
  </select>
@@ -59,7 +59,7 @@
<!--    select p.id,p.num,p.name,p.type-->
<!--    from ba_privilege p-->
<!--    inner join ba_role_privilege rp on p.id = rp.privilege_id-->
<!--    <if test="roleId != null">-->
<!--    <if test="roleId != null and roleId !=''">-->
<!--      where rp.role_id = #{roleId, jdbcType=BIGINT}-->
<!--    </if>-->
<!--  </select>-->
@@ -75,36 +75,36 @@
    <!--@mbg.generated-->
    insert into ba_privilege
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
      <if test="id != null and id !=''">
        id,
      </if>
      <if test="num != null">
      <if test="num != null and num !=''">
        num,
      </if>
      <if test="name != null">
      <if test="name != null and name !=''">
        `name`,
      </if>
      <if test="type != null">
      <if test="type != null and type !=''">
        `type`,
      </if>
      <if test="typeName != null">
      <if test="typeName!= null and typeName !=''">
        type_name,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
      <if test="id != null and id !=''">
        #{id},
      </if>
      <if test="num != null">
      <if test="num != null and num !=''">
        #{num},
      </if>
      <if test="name != null">
      <if test="name != null and name !=''">
        #{name},
      </if>
      <if test="type != null">
      <if test="type != null and type !=''">
        #{type},
      </if>
      <if test="typeName != null">
      <if test="typeName!= null and typeName !=''">
        #{typeName},
      </if>
    </trim>
@@ -113,16 +113,16 @@
    <!--@mbg.generated-->
    update ba_privilege
    <set>
      <if test="num != null">
      <if test="num != null and num !=''">
        num = #{num},
      </if>
      <if test="name != null">
      <if test="name != null and name !=''">
        `name` = #{name},
      </if>
      <if test="type != null">
      <if test="type != null and type !=''">
        `type` = #{type},
      </if>
      <if test="typeName != null">
      <if test="typeName!= null and typeName !=''">
        type_name = #{typeName},
      </if>
    </set>