|
|
@@ -31,43 +31,4 @@
|
|
|
<include refid="where_statement"/>
|
|
|
</select>
|
|
|
|
|
|
- <select id="queryUserNotInStrategy" parameterType="AccountsStrategy" resultType="UserInfo">
|
|
|
- select
|
|
|
- *
|
|
|
- from mxk_userinfo u
|
|
|
- where u.instid = #{instId}
|
|
|
- and not exists(
|
|
|
- select 1 from mxk_accounts ac
|
|
|
- where ac.appid = #{appId}
|
|
|
- and ac.instid = #{instId}
|
|
|
- and ac.userid = u.id
|
|
|
- and ac.createtype='automatic'
|
|
|
- )
|
|
|
- <if test="filters != null and filters != ''">
|
|
|
- and (${filters})
|
|
|
- </if>
|
|
|
- <if test="orgIdsList != null and orgIdsList != ''">
|
|
|
- and u.departmentid in( ${orgIdsList})
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <delete id="deleteByStrategy" parameterType="AccountsStrategy" >
|
|
|
- delete from mxk_accounts ac
|
|
|
- where ac.instid = #{instId}
|
|
|
- and ac.createtype = 'automatic'
|
|
|
- and ac.appid = #{appId}
|
|
|
- and ac.strategyid = #{id}
|
|
|
- and not exists(
|
|
|
- select 1
|
|
|
- from mxk_userinfo u
|
|
|
- where instid = #{instId}
|
|
|
- and u.id=ac.userid
|
|
|
- <if test="filters != null and filters != ''">
|
|
|
- and (${filters})
|
|
|
- </if>
|
|
|
- <if test="orgIdsList != null and orgIdsList != ''">
|
|
|
- and u.departmentid in ( ${orgIdsList})
|
|
|
- </if>
|
|
|
- )
|
|
|
- </delete>
|
|
|
</mapper>
|