会员购买完善
This commit is contained in:
@@ -27,6 +27,7 @@ import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -39,7 +40,7 @@ import java.math.BigDecimal;
|
||||
* @author Administrator
|
||||
* @since 2025-02-08
|
||||
*/
|
||||
@Service
|
||||
@DubboService
|
||||
public class AShopUserServiceImpl implements AShopUserService {
|
||||
@Resource
|
||||
private ShopUserService shopUserService;
|
||||
|
||||
@@ -29,9 +29,11 @@ import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -41,7 +43,7 @@ import java.util.List;
|
||||
* @author Administrator
|
||||
* @since 2025-02-08
|
||||
*/
|
||||
@Service
|
||||
@DubboService
|
||||
public class UShopUserServiceImpl implements UShopUserService {
|
||||
@Resource
|
||||
private ShopUserService shopUserService;
|
||||
@@ -180,19 +182,18 @@ public class UShopUserServiceImpl implements UShopUserService {
|
||||
BeanUtil.copyProperties(shopUserAddDTO, shopUser, "accountPoints", "amount");
|
||||
BeanUtil.copyProperties(shopUserAddDTO, userInfo);
|
||||
userInfoService.updateById(userInfo);
|
||||
|
||||
if ((shopUser.getIsVip() == null || shopUser.getIsVip() != 1) && shopUser.getId() != null) {
|
||||
if (StrUtil.isBlank(shopUser.getCode())) {
|
||||
shopUser.setCode(generateCode(shopId));
|
||||
}
|
||||
if (shopUser.getId() != null) {
|
||||
shopUser.setIsVip(1);
|
||||
if (StrUtil.isBlank(shopUser.getCode())) {
|
||||
shopUser.setCode(generateCode(shopId));
|
||||
}
|
||||
shopUser.setJoinTime(DateUtil.date().toLocalDateTime());
|
||||
shopUser.setUserId(null);
|
||||
shopUser.setSourceShopId(shopId);
|
||||
shopUser.setMainShopId(mainId);
|
||||
}
|
||||
shopUser.setJoinTime(shopUser.getJoinTime() == null ? DateUtil.date().toLocalDateTime() : shopUser.getJoinTime());
|
||||
|
||||
|
||||
memberConfigService.joinMember(shopId, userId, null);
|
||||
return shopUserService.saveOrUpdate(shopUser);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ import jakarta.annotation.Resource;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 服务层实现。
|
||||
*
|
||||
@@ -51,7 +53,6 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> i
|
||||
userInfoDTO.setAssetsSummary(assetsSummaryDTO);
|
||||
return userInfoDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateInfo(long shopId, long userId, UserInfoEditDTO userInfoEditDTO) {
|
||||
UserInfo userInfo = getById(userId);
|
||||
|
||||
Reference in New Issue
Block a user