| | |
| | | <!--根据用户编号获取用户信息--> |
| | | <select id="getUserInfoById" resultType="java.util.Map"> |
| | | SELECT |
| | | id AS userId, |
| | | name AS userName |
| | | FROM ba_user |
| | | us.id AS userId, |
| | | us.name AS userName, |
| | | us.phone, |
| | | IFNULL(us.blockId, 0) AS blockId, |
| | | IFNULL(blo.name, 0) AS blockName |
| | | FROM ba_user us |
| | | LEFT JOIN ba_block blo ON us.blockId = blo.id |
| | | <where> |
| | | AND disabled = 0 |
| | | AND deleted = 0 |
| | | AND us.disabled = 0 |
| | | AND us.deleted = 0 |
| | | <if test = "userId != null and userId > 0"> |
| | | AND ba_user.id = ${userId} |
| | | AND us.id = ${userId} |
| | | </if> |
| | | </where> |
| | | </select> |