|
|
@@ -266,4 +266,27 @@
|
|
|
or la.LOGINIDS like '%' || #{searchcode} || '%' )
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="queryChildren" resultType="com.muchinfo.mtp3pojos.vo.reportform.TAAccountChildrenSelect">
|
|
|
+ select ta.accountid,
|
|
|
+ ua.userid || '/' || ua.accountname relatedname,
|
|
|
+ vlog.LOGINIDS as invloginids,
|
|
|
+ from TAAccount ta
|
|
|
+ inner join useraccount ua on ta.relateduserid = ua.userid
|
|
|
+ left join VIEW_USER_LOGINIDS vlog on vlog.USERID = ua.userid
|
|
|
+ where ta.tradestatus = 1
|
|
|
+ <if test="searchcode != null and searchcode != '' ">
|
|
|
+ and (ua.accountname like '%' || #{searchcode} || '%'
|
|
|
+ or ua.userid like '%' || #{searchcode} || '%'
|
|
|
+ or ta.accountid like '%' || #{searchcode} || '%')
|
|
|
+ </if>
|
|
|
+ <if test="usertype != null and usertype != '' ">
|
|
|
+ and ua.usertype = #{usertype}
|
|
|
+ </if>
|
|
|
+ <if test="relateduserid != null and relateduserid != 1 ">
|
|
|
+ START WITH ua.userid = #{relateduserid}
|
|
|
+ CONNECT BY PRIOR ua.userid = ua.parentuserid
|
|
|
+ </if>
|
|
|
+ order by ua.userid
|
|
|
+ </select>
|
|
|
</mapper>
|