| | |
| | | <select id="listPage" resultType="com.ruoyi.basic.vo.CustomerVo"> |
| | | select |
| | | c.*, |
| | | u.user_name usage_user_name, |
| | | <choose> |
| | | <when test="isAdmin"> |
| | | u.nick_name usage_user_name, |
| | | </when> |
| | | <otherwise> |
| | | CASE WHEN c.usage_user = #{loginUserId} OR c.create_user = #{loginUserId} THEN u.nick_name ELSE '' END as usage_user_name, |
| | | </otherwise> |
| | | </choose> |
| | | ( |
| | | select group_concat(u2.user_name separator ', ') |
| | | select group_concat(u2.nick_name separator ', ') |
| | | from customer_user cu |
| | | left join sys_user u2 on cu.user_id = u2.user_id |
| | | where cu.customer_id = c.id |
| | |
| | | <select id="list" resultType="com.ruoyi.basic.vo.CustomerVo"> |
| | | select |
| | | c.*, |
| | | u.user_name usage_user_name, |
| | | <choose> |
| | | <when test="isAdmin"> |
| | | u.nick_name usage_user_name, |
| | | </when> |
| | | <otherwise> |
| | | CASE WHEN c.usage_user = #{loginUserId} OR c.create_user = #{loginUserId} THEN u.nick_name ELSE '' END as usage_user_name, |
| | | </otherwise> |
| | | </choose> |
| | | ( |
| | | select group_concat(u2.user_name separator ', ') |
| | | select group_concat(u2.nick_name separator ', ') |
| | | from customer_user cu |
| | | left join sys_user u2 on cu.user_id = u2.user_id |
| | | where cu.customer_id = c.id |