发放传参
This commit is contained in:
@@ -63,6 +63,12 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
||||
return shopUser;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShopUser getUserInfo(Long shopId, Long userId) {
|
||||
Long mainShopId = shopInfoService.getMainIdByShopId(shopId);
|
||||
return getOne(QueryWrapper.create().eq(ShopUser::getUserId, userId).eq(ShopUser::getMainShopId, mainShopId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateInfo(ShopUser shopUser) {
|
||||
return super.updateById(shopUser);
|
||||
@@ -71,13 +77,9 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
||||
|
||||
@Override
|
||||
public ShopUser getShopUserInfo(Long shopId, long userId) {
|
||||
Long mainShopId = shopInfoService.getMainIdByShopId(shopId);
|
||||
ShopUser shopUser = queryChain().eq(ShopUser::getUserId, userId).and(q -> {
|
||||
q.eq(ShopUser::getMainShopId, mainShopId).or(q1 -> {
|
||||
q1.eq(ShopUser::getSourceShopId, shopId);
|
||||
});
|
||||
}).one();
|
||||
ShopUser shopUser = getUserInfo(shopId, userId);
|
||||
if (shopUser == null) {
|
||||
Long mainShopId = shopInfoService.getMainIdByShopId(shopId);
|
||||
shopUser = new ShopUser();
|
||||
UserInfo userInfo = userInfoService.getById(userId);
|
||||
BeanUtil.copyProperties(userInfo, shopUser);
|
||||
|
||||
Reference in New Issue
Block a user