|
@@ -132,15 +132,13 @@ public class VciInfoServiceImpl extends ServiceImpl<VciInfoMapper, VciInfo> impl
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Result<List<UserVciVO>> getListByUserId(Integer userId) {
|
|
|
|
- //根据userId查询用户
|
|
|
|
- User user = userMapper.selectById(userId);
|
|
|
|
- if (BeanUtil.isEmpty(user)){
|
|
|
|
- throw new BadReqException("该用户不存在");
|
|
|
|
|
|
+ public Result<List<UserVciVO>> getUserList(Integer vciId) {
|
|
|
|
+ VciInfo vciInfo = this.getById(vciId);
|
|
|
|
+ if (BeanUtil.isEmpty(vciInfo)){
|
|
|
|
+ throw new BadReqException("该vci不存在");
|
|
}
|
|
}
|
|
-
|
|
|
|
List<UserVci> list = userVciService.lambdaQuery()
|
|
List<UserVci> list = userVciService.lambdaQuery()
|
|
- .eq(UserVci::getUserId, userId)
|
|
|
|
|
|
+ .eq(UserVci::getVciInfoId, vciId)
|
|
.list();
|
|
.list();
|
|
|
|
|
|
if (CollectionUtil.isEmpty(list)){
|
|
if (CollectionUtil.isEmpty(list)){
|
|
@@ -148,6 +146,8 @@ public class VciInfoServiceImpl extends ServiceImpl<VciInfoMapper, VciInfo> impl
|
|
}
|
|
}
|
|
List<UserVciVO> vos= new ArrayList<>();
|
|
List<UserVciVO> vos= new ArrayList<>();
|
|
for (UserVci userVci : list) {
|
|
for (UserVci userVci : list) {
|
|
|
|
+ Integer userId = userVci.getUserId();
|
|
|
|
+ User user = userMapper.selectById(userId);
|
|
UserVciVO userVciVO = BeanUtil.copyProperties(userVci, UserVciVO.class);
|
|
UserVciVO userVciVO = BeanUtil.copyProperties(userVci, UserVciVO.class);
|
|
userVciVO.setUsername(user.getUsername());
|
|
userVciVO.setUsername(user.getUsername());
|
|
vos.add(userVciVO);
|
|
vos.add(userVciVO);
|