|
|
@@ -420,7 +420,11 @@
|
|
|
from user a left join admin b on a.aid=b.id
|
|
|
left join organization_identity d on a.id = d.uid left join district_glossory dg1 on d.location_province = dg1.id
|
|
|
left join district_glossory dg2 on d.location_city = dg2.id left join district_glossory dg3 on d.location_area = dg3.id
|
|
|
- <if test="power != 0">
|
|
|
+ <if test="power == 0">
|
|
|
+ left join (select aid,uid,max(lock_time) last_sign_time from user_lock_release where aid= #{aid,jdbcType=VARCHAR} group by uid) t0 on a.id=t0.uid
|
|
|
+ left join (select uid,aid,max(create_time) last_follow_time from user_follow where aid= #{aid,jdbcType=VARCHAR} group by uid) t1 on a.id=t1.uid
|
|
|
+ </if>
|
|
|
+ <if test="power == 1 or power==2">
|
|
|
left join (select aid,uid,max(lock_time) last_sign_time from user_lock_release where aid in
|
|
|
<foreach item="item" collection="alist" separator="," open="(" close=")" index="">
|
|
|
#{item}
|
|
|
@@ -432,26 +436,20 @@
|
|
|
</foreach>
|
|
|
group by aid,uid)t1 on a.id=t1.uid and a.aid=t1.aid
|
|
|
</if>
|
|
|
- <if test="power == 0">
|
|
|
- left join (select aid,uid,max(lock_time) last_sign_time from user_lock_release where aid= #{aid,jdbcType=VARCHAR} group by uid) t0 on a.id=t0.uid
|
|
|
- left join (select uid,aid,max(create_time) last_follow_time from user_follow where aid= #{aid,jdbcType=VARCHAR} group by uid) t1 on a.id=t1.uid
|
|
|
+ <if test="power == 3">
|
|
|
+ left join (select aid,uid,max(lock_time) last_sign_time from user_lock_release group by aid,uid)t0 on a.id=t0.uid
|
|
|
+ left join (select uid,aid,max(create_time) last_follow_time from user_follow group by aid,uid)t1 on a.id=t1.uid
|
|
|
</if>
|
|
|
where a.type= 1 and a.share_type=0 and source !=0
|
|
|
<if test="power ==0">
|
|
|
and a.aid = #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- <if test="power ==1">
|
|
|
+ <if test="power ==1 or power ==2">
|
|
|
and a.aid in
|
|
|
<foreach item="item" collection="alist" separator="," open="(" close=")" index="">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
- <if test="power ==2">
|
|
|
- and a.aid in
|
|
|
- <foreach item="item" collection="alist" separator="," open="(" close=")" index="">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
<if test="name != null and name != ''">
|
|
|
and a.identify_name like concat('%',#{name},'%')
|
|
|
</if>
|
|
|
@@ -495,18 +493,13 @@
|
|
|
<if test="power ==0">
|
|
|
and a.aid = #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- <if test="power ==1">
|
|
|
+ <if test="power ==1 or power ==2">
|
|
|
and a.aid in
|
|
|
<foreach item="item" collection="alist" separator="," open="(" close=")" index="">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
- <if test="power ==2">
|
|
|
- and a.aid in
|
|
|
- <foreach item="item" collection="alist" separator="," open="(" close=")" index="">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
+
|
|
|
<if test="name != null and name != ''">
|
|
|
and a.identify_name like concat('%',#{name},'%')
|
|
|
</if>
|