|
|
@@ -100,7 +100,11 @@ public class GroupRelationController {
|
|
|
@PutMapping("/update/set/account")
|
|
|
public Result<String> setAccount(@RequestBody GroupsRelation relation) {
|
|
|
long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
- GroupsRelation re = relationMapper.selectOne(Wrappers.lambdaQuery(GroupsRelation.class).eq(GroupsRelation::getId, relation.getId()).eq(GroupsRelation::getUserId, userId).last(" limit 1"));
|
|
|
+ List<Long> userIds = userService.getRelationUserIdList(userId, null);
|
|
|
+ GroupsRelation re = relationMapper.selectOne(Wrappers.lambdaQuery(GroupsRelation.class)
|
|
|
+ .eq(GroupsRelation::getId, relation.getId())
|
|
|
+ .in(GroupsRelation::getUserId, userIds)
|
|
|
+ .last(" limit 1"));
|
|
|
if (re == null) {
|
|
|
throw new BusinessRuntimeException("该车票不存在,请联系客服.");
|
|
|
}
|