充值修改

This commit is contained in:
张松
2025-09-27 14:38:29 +08:00
parent 3c9e8b93a7
commit ac8d11bea7
2 changed files with 11 additions and 20 deletions

View File

@@ -153,13 +153,7 @@ public class UShopUserServiceImpl implements UShopUserService {
Long mainId = shopInfoService.getMainIdByShopId(shopId);
// 当前用户信息
UserInfo userInfo = userInfoService.getById(userId);
ShopUser shopUser = shopUserService.getOne(new QueryWrapper().eq(ShopUser::getSourceShopId, shopId).eq(ShopUser::getUserId, userInfo.getId()));
if (shopUser == null) {
shopUser = new ShopUser();
shopUser.setUserId(userId);
shopUser.setSourceShopId(shopId);
shopUser.setMainShopId(mainId);
}
ShopUser shopUser = shopUserService.getShopUserInfo(shopId, userId);
// 查询系统添加的会员
UserInfo oriInfo = userInfoService.getOne(new QueryWrapper().eq(UserInfo::getPhone, shopUserAddDTO.getPhone()));

View File

@@ -75,19 +75,16 @@ public class MemberOrderServiceImpl extends ServiceImpl<MemberOrderMapper, Membe
userInfo.setBirthDay(orderDTO.getBirthDay());
}
ShopUser shopUser = shopUserService.getOne(new QueryWrapper().eq(ShopUser::getUserId, orderDTO.getUserId()).eq(ShopUser::getSourceShopId, orderDTO.getShopId()));
if (shopUser == null) {
uShopUserService.join(orderDTO.getShopId(), orderDTO.getUserId(), new ShopUserAddDTO()
.setPhone(userInfo.getPhone())
.setSex(userInfo.getSex())
.setHeadImg(userInfo.getHeadImg())
.setAmount(BigDecimal.ZERO)
.setBirthDay(userInfo.getBirthDay())
.setIsVip(0)
.setAccountPoints(0)
.setNickName(userInfo.getNickName())
);
}
uShopUserService.join(orderDTO.getShopId(), orderDTO.getUserId(), new ShopUserAddDTO()
.setPhone(userInfo.getPhone())
.setSex(userInfo.getSex())
.setHeadImg(userInfo.getHeadImg())
.setAmount(BigDecimal.ZERO)
.setBirthDay(userInfo.getBirthDay())
.setIsVip(0)
.setAccountPoints(0)
.setNickName(userInfo.getNickName())
);
if ("PAY".equals(memberConfigVO.getOpenType())){