Commit 1cb0f26d authored by 李健华's avatar 李健华

获取用户头像昵称

parent 1a5f0ea3
......@@ -408,4 +408,11 @@ public class UserCenterController {
return null == user ? null : user.getId();
}
@GetMapping("/attach/listLimit/{id}")
public JsonResult queryUserAttachListLimit(@PathVariable Long id) {
//默认羊小咩租户
List<UserAttached> userAttachedList = userCenterService.queryUserAttachListLimit(id);
return JsonResult.buildSuccessResultGeneric(userAttachedList);
}
}
......@@ -2,6 +2,7 @@ package cn.quantgroup.xyqb.repository;
import cn.quantgroup.xyqb.entity.UserAttached;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
......@@ -17,4 +18,7 @@ public interface IUserAttachedRepository extends JpaRepository<UserAttached, Lon
@Transactional
void deleteByUserId(Long userId);
@Query(value = "select * from user_attached where id>?1 limit 500" ,nativeQuery = true)
List<UserAttached> findALlAttached(Long id);
}
......@@ -40,4 +40,6 @@ public interface UserCenterService {
* @return
*/
UserAttached saveUserNick(long userId, String nick);
List<UserAttached> queryUserAttachListLimit(Long id);
}
......@@ -114,6 +114,11 @@ public class UserCenterServiceImpl implements UserCenterService {
return userAttached;
}
@Override
public List<UserAttached> queryUserAttachListLimit(Long id) {
return userAttachedRepository.findALlAttached(id);
}
/**
* 创建用户附加信息实体
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment