| | |
| | | <!--根据手机号获取用户信息--> |
| | | <select id="getUserByPhone" resultType="org.springblade.modules.system.entity.User"> |
| | | select * from blade_user where is_deleted = 0 and status = 1 |
| | | and tenant_id = #{tenantId} and phone = #{phone} |
| | | and tenant_id = #{tenantId} and phone = #{phone} limit 1 |
| | | </select> |
| | | |
| | | <!--按天查询 day 天未登录的人员ids集合信息--> |
| | |
| | | </choose> |
| | | </update> |
| | | |
| | | <!--判断是否报名--> |
| | | <select id="getUserIsApply" resultType="org.springblade.modules.system.entity.User"> |
| | | select bu.* from blade_user bu |
| | | left join blade_role br on br.id = bu.role_id |
| | | where bu.is_deleted = 0 and bu.status = 1 and bu.id = #{id} |
| | | and br.role_alias = '保安' |
| | | </select> |
| | | |
| | | <!--自定义查询详情信息--> |
| | | <select id="getUserDetailById" resultType="org.springblade.modules.system.vo.UserVO"> |
| | | select bu.* from blade_user bu |
| | | where bu.is_deleted = 0 |
| | | and bu.id = #{id} |
| | | </select> |
| | | |
| | | <!--查询未关联的保安员--> |
| | | <select id="getNotGlList" resultType="org.springblade.modules.system.entity.User"> |
| | | select bu.* from blade_user bu |
| | | left join blade_user_detail bud on bu.id = bud.user_id and bud.is_deleted = 0 |
| | | where bu.is_deleted = 0 |
| | | and bu.role_id = '1412226235153731586' |
| | | and bud.id is null |
| | | </select> |
| | | |
| | | |
| | | </mapper> |