|
@@ -48,13 +48,14 @@ public class UserPracticeServiceImpl extends ServiceImpl<UserPracticeMapper, Use
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<UserPractice> getRecentPractice() {
|
|
|
+ public List<UserPractice> getRecentPractice(String repositoryId) {
|
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
|
|
|
Page<UserPractice> page = new Page<UserPractice>(1, 5);
|
|
|
|
|
|
LambdaQueryWrapper<UserPractice> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.eq(UserPractice::getUserId, user.getId()).orderByDesc(UserPractice::getCommitTime);
|
|
|
+ wrapper.eq(UserPractice::getUserId, user.getId()).eq(UserPractice::getRepositoryId, repositoryId)
|
|
|
+ .orderByDesc(UserPractice::getCommitTime);
|
|
|
IPage<UserPractice> pageList = page(page, wrapper);
|
|
|
return pageList.getRecords();
|
|
|
}
|