|
|
@@ -382,7 +382,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
ucu.company_id,
|
|
|
ucu.project_id,
|
|
|
fs_user.integral,
|
|
|
- if(fs_user.pay_count>0,1,0) as isBuy
|
|
|
+ if(fs_user.pay_count>0,1,0) as isBuy,
|
|
|
+ case when fs_user.app_open_id is not null then 1 else 0 end as isAppUser
|
|
|
FROM
|
|
|
fs_user
|
|
|
left join fs_user_company_user ucu on ucu.user_id = fs_user.user_id
|
|
|
@@ -391,6 +392,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="userId != null">
|
|
|
AND fs_user.user_id = #{userId}
|
|
|
</if>
|
|
|
+ <choose>
|
|
|
+ <when test="isAppUser != null and isAppUser == 1">
|
|
|
+ AND fs_user.app_open_id is not null
|
|
|
+ </when>
|
|
|
+ <when test="isAppUser != null and isAppUser == 0">
|
|
|
+ AND fs_user.app_open_id is null
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
<if test="status != null">
|
|
|
AND ucu.status = #{status}
|
|
|
</if>
|
|
|
@@ -439,6 +448,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="companyId != null">
|
|
|
AND ucu.company_id = #{companyId}
|
|
|
</if>
|
|
|
+ <choose>
|
|
|
+ <when test="isAppUser != null and isAppUser == 1">
|
|
|
+ AND fs_user.app_open_id is not null
|
|
|
+ </when>
|
|
|
+ <when test="isAppUser != null and isAppUser == 0">
|
|
|
+ AND fs_user.app_open_id is null
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
<if test="companyUserId != null and companyUserId != '' ">
|
|
|
AND ucu.company_user_id = #{companyUserId}
|
|
|
</if>
|