| | |
| | | </where> |
| | | GROUP BY au.id |
| | | </select> |
| | | <select id="getNewIds1" resultType="java.lang.Long"> |
| | | SELECT |
| | | au.id AS user_id |
| | | FROM |
| | | t_app_user au |
| | | LEFT JOIN ( |
| | | SELECT |
| | | id, |
| | | user_id, |
| | | MAX(create_time) AS newest_create_time |
| | | FROM |
| | | t_user_change |
| | | WHERE |
| | | is_delete = 0 |
| | | GROUP BY user_id |
| | | ) uc_newest ON au.id = uc_newest.user_id |
| | | LEFT JOIN t_user_change_detail td on td.change_id = uc_newest.id |
| | | <where> |
| | | <if test="appUserQuery.majorId1 != null"> |
| | | AND td.major_id = #{appUserQuery.majorId1} |
| | | </if> |
| | | <if test="appUserQuery.titleId1 != null"> |
| | | AND td.title_id = #{appUserQuery.titleId1} |
| | | </if> |
| | | <if test="appUserQuery.regionId1 != null"> |
| | | AND td.region_id = #{appUserQuery.regionId1} |
| | | </if> |
| | | <if test="appUserQuery.levelId1 != null"> |
| | | AND td.level_id = #{appUserQuery.levelId1} |
| | | </if> |
| | | </where> |
| | | GROUP BY au.id |
| | | </select> |
| | | <select id="getLateIds" resultType="java.lang.Long"> |
| | | SELECT |
| | | au.id AS user_id |