|
@@ -86,7 +86,7 @@ public interface FsUserMapper
|
|
|
*/
|
|
*/
|
|
|
public int deleteFsUserByUserIds(Long[] userIds);
|
|
public int deleteFsUserByUserIds(Long[] userIds);
|
|
|
@Select({"<script> " +
|
|
@Select({"<script> " +
|
|
|
- "select f1.*,f2.nick_name tui_name,f2.phone tui_phone,CONCAT(cu.nick_name,'-',cu.user_name) as bindCompanyUserNickName FROM fs_user f1 LEFT JOIN fs_user f2 ON f1.tui_user_id =f2.user_id LEFT JOIN company_user cu ON cu.user_id = f1.bind_company_user_id "+
|
|
|
|
|
|
|
+ "select f1.*,f2.nick_name tui_name,f2.phone tui_phone,CONCAT_WS('-', cu.nick_name, cu.user_id) as bind_company_user_nick_name FROM fs_user f1 LEFT JOIN fs_user f2 ON f1.tui_user_id =f2.user_id LEFT JOIN company_user cu ON cu.user_id = f1.bind_company_user_id "+
|
|
|
" where f1.is_del=0 "+
|
|
" where f1.is_del=0 "+
|
|
|
" <if test=\"nickName != null and nickName != ''\"> and f1.nick_name like concat( #{nickName}, '%')</if>\n" +
|
|
" <if test=\"nickName != null and nickName != ''\"> and f1.nick_name like concat( #{nickName}, '%')</if>\n" +
|
|
|
" <if test=\"avatar != null and avatar != ''\"> and f1.avatar = #{avatar}</if>\n" +
|
|
" <if test=\"avatar != null and avatar != ''\"> and f1.avatar = #{avatar}</if>\n" +
|
|
@@ -95,6 +95,7 @@ public interface FsUserMapper
|
|
|
" <if test=\"isBuy != null \"> and f1.is_buy = #{isBuy}</if>\n" +
|
|
" <if test=\"isBuy != null \"> and f1.is_buy = #{isBuy}</if>\n" +
|
|
|
" <if test=\"userId != null \"> and f1.user_id = #{userId}</if>\n" +
|
|
" <if test=\"userId != null \"> and f1.user_id = #{userId}</if>\n" +
|
|
|
" <if test=\"bindCompanyUserId != null \"> and f1.bind_company_user_id=#{bindCompanyUserId}</if>\n" +
|
|
" <if test=\"bindCompanyUserId != null \"> and f1.bind_company_user_id=#{bindCompanyUserId}</if>\n" +
|
|
|
|
|
+ " <if test=\"hasBindCompanyUser != null and hasBindCompanyUser == 1\"> and f1.bind_company_user_id is not null</if>\n" +
|
|
|
" <if test=\"tuiUserId != null and tuiUserId != ''\"> and f1.tui_user_id = #{tuiUserId}</if>\n" +
|
|
" <if test=\"tuiUserId != null and tuiUserId != ''\"> and f1.tui_user_id = #{tuiUserId}</if>\n" +
|
|
|
" <if test=\"tuiTime != null \"> and f1.tui_time = #{tuiTime}</if>\n" +
|
|
" <if test=\"tuiTime != null \"> and f1.tui_time = #{tuiTime}</if>\n" +
|
|
|
" <if test=\"userCode != null and userCode != ''\"> and f1.user_code = #{userCode}</if>\n" +
|
|
" <if test=\"userCode != null and userCode != ''\"> and f1.user_code = #{userCode}</if>\n" +
|
|
@@ -105,8 +106,12 @@ public interface FsUserMapper
|
|
|
" <if test=\"eTime != null \"> and DATE(f1.create_time) <= DATE(#{eTime})</if>\n" +
|
|
" <if test=\"eTime != null \"> and DATE(f1.create_time) <= DATE(#{eTime})</if>\n" +
|
|
|
"order by f1.user_id desc"+
|
|
"order by f1.user_id desc"+
|
|
|
"</script>"})
|
|
"</script>"})
|
|
|
- @Results({
|
|
|
|
|
- @Result(property = "nickName", column = "nick_name")
|
|
|
|
|
|
|
+ @Results(id = "FsUserVOResult", value = {
|
|
|
|
|
+ @Result(property = "nickName", column = "nick_name"),
|
|
|
|
|
+ @Result(property = "tuiName", column = "tui_name"),
|
|
|
|
|
+ @Result(property = "tuiPhone", column = "tui_phone"),
|
|
|
|
|
+ @Result(property = "bindCompanyUserNickName", column = "bind_company_user_nick_name"),
|
|
|
|
|
+ @Result(property = "bindCompanyUserId", column = "bind_company_user_id")
|
|
|
})
|
|
})
|
|
|
List<FsUserVO> selectFsUserListVO(FsUserParam fsUser);
|
|
List<FsUserVO> selectFsUserListVO(FsUserParam fsUser);
|
|
|
|
|
|
|
@@ -155,11 +160,12 @@ public interface FsUserMapper
|
|
|
@Select("select * from fs_user where phone=#{phone} limit 1")
|
|
@Select("select * from fs_user where phone=#{phone} limit 1")
|
|
|
FsUser selectFsUserByPhoneLimitOne(String phone);
|
|
FsUser selectFsUserByPhoneLimitOne(String phone);
|
|
|
@Select({"<script> " +
|
|
@Select({"<script> " +
|
|
|
- "select distinct f1.*,f2.nick_name tui_name,f2.phone tui_phone,CONCAT(cu.nick_name,'-',cu.user_name) as bindCompanyUserNickName FROM company_user_user cuu LEFT JOIN fs_user f1 ON cuu.user_id =f1.user_id left JOIN fs_user f2 ON f1.tui_user_id =f2.user_id LEFT JOIN company_user cu ON cu.user_id = f1.bind_company_user_id"+
|
|
|
|
|
|
|
+ "select distinct f1.*,f2.nick_name tui_name,f2.phone tui_phone,CONCAT_WS('-', cu.nick_name, cu.user_id) as bind_company_user_nick_name FROM company_user_user cuu LEFT JOIN fs_user f1 ON cuu.user_id =f1.user_id left JOIN fs_user f2 ON f1.tui_user_id =f2.user_id LEFT JOIN company_user cu ON cu.user_id = f1.bind_company_user_id"+
|
|
|
" where f1.is_del=0 "+
|
|
" where f1.is_del=0 "+
|
|
|
" <if test=\"companyUserId != null \"> and cuu.company_user_id=#{companyUserId}</if>\n" +
|
|
" <if test=\"companyUserId != null \"> and cuu.company_user_id=#{companyUserId}</if>\n" +
|
|
|
" <if test=\"companyId != null \"> and cuu.company_id=#{companyId}</if>\n" +
|
|
" <if test=\"companyId != null \"> and cuu.company_id=#{companyId}</if>\n" +
|
|
|
" <if test=\"bindCompanyUserId != null \"> and f1.bind_company_user_id=#{bindCompanyUserId}</if>\n" +
|
|
" <if test=\"bindCompanyUserId != null \"> and f1.bind_company_user_id=#{bindCompanyUserId}</if>\n" +
|
|
|
|
|
+ " <if test=\"hasBindCompanyUser != null and hasBindCompanyUser == 1\"> and f1.bind_company_user_id is not null</if>\n" +
|
|
|
" <if test=\"nickName != null and nickName != ''\"> and f1.nick_name like concat( #{nickName}, '%')</if>\n" +
|
|
" <if test=\"nickName != null and nickName != ''\"> and f1.nick_name like concat( #{nickName}, '%')</if>\n" +
|
|
|
" <if test=\"avatar != null and avatar != ''\"> and f1.avatar = #{avatar}</if>\n" +
|
|
" <if test=\"avatar != null and avatar != ''\"> and f1.avatar = #{avatar}</if>\n" +
|
|
|
" <if test=\"phone != null and phone != ''\"> and f1.phone like concat('%', #{phone}, '%')</if>\n" +
|
|
" <if test=\"phone != null and phone != ''\"> and f1.phone like concat('%', #{phone}, '%')</if>\n" +
|