店铺会员查询修改
This commit is contained in:
parent
ac8d11bea7
commit
8fc90285fe
|
|
@ -48,7 +48,11 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
||||||
@Override
|
@Override
|
||||||
public ShopUser getShopUserInfo(Long shopId, long userId) {
|
public ShopUser getShopUserInfo(Long shopId, long userId) {
|
||||||
Long mainShopId = shopInfoService.getMainIdByShopId(shopId);
|
Long mainShopId = shopInfoService.getMainIdByShopId(shopId);
|
||||||
ShopUser shopUser = queryChain().eq(ShopUser::getMainShopId, shopId).eq(ShopUser::getUserId, userId).one();
|
ShopUser shopUser = queryChain().eq(ShopUser::getUserId, userId).and(q -> {
|
||||||
|
q.eq(ShopUser::getMainShopId, mainShopId).or(q1 -> {
|
||||||
|
q1.eq(ShopUser::getSourceShopId, shopId);
|
||||||
|
});
|
||||||
|
}).one();
|
||||||
if (shopUser == null) {
|
if (shopUser == null) {
|
||||||
shopUser = new ShopUser();
|
shopUser = new ShopUser();
|
||||||
UserInfo userInfo = userInfoService.getById(userId);
|
UserInfo userInfo = userInfoService.getById(userId);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue