| | |
| | | from ba_user |
| | | where supperAdmin!=1 and deleted!=1 |
| | | <trim prefix="and" suffixOverrides="and"> |
| | | <if test="name != null"> |
| | | <if test="name != null and name != ''"> |
| | | name like concat('%', #{name}, '%') and |
| | | </if> |
| | | <if test="phone != null"> |
| | | <if test="phone != null and phone !=''"> |
| | | phone = #{phone,jdbcType=VARCHAR} |
| | | </if> |
| | | </trim> |
| | |
| | | left join ba_block bb on bu.blockId = bb.id |
| | | where bu.supperAdmin!=1 and bu.deleted!=1 |
| | | <trim prefix="and" suffixOverrides="and"> |
| | | <if test="name != null"> |
| | | <if test="name != null and name != ''"> |
| | | bu.name like concat('%', #{name}, '%') and |
| | | </if> |
| | | <if test="phone != null"> |
| | | <if test="phone != null and phone !=''"> |
| | | bu.phone = #{phone,jdbcType=VARCHAR} |
| | | </if> |
| | | </trim> |
| | |
| | | update ba_user set deleted = 1 |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <!--根据用户编号获取用户信息--> |
| | | <select id="getUserInfos" resultType="com.dy.pipIrrGlobal.voBa.VoUserInfo"> |
| | | SELECT |
| | | user.id AS userId, |
| | | user.`name` AS userName, |
| | | rol.id AS roleId, |
| | | rol.`name` AS roleName, |
| | | per.permissions |
| | | FROM ba_user user |
| | | INNER JOIN ba_user_role use_rol ON user.id = use_rol.userId |
| | | INNER JOIN ba_role rol ON rol.id = use_rol.roleId |
| | | INNER JOIN ba_role_permissions per ON per.roleId = rol.id |
| | | <where> |
| | | <if test = "userId != null and userId > 0"> |
| | | AND user.id = ${userId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |