package com.yeshi.fanli.service.manger.goods.vipshop;
|
|
import com.yeshi.fanli.dto.vip.VIPConvertResultDTO;
|
import com.yeshi.fanli.entity.SystemPIDInfo;
|
import com.yeshi.fanli.util.vipshop.VipShopApiUtil;
|
import com.yeshi.fanli.util.vipshop.VipShopUtil;
|
import org.springframework.stereotype.Component;
|
|
@Component
|
public class VipShopConvertLinkManager {
|
|
|
public VIPConvertResultDTO convertGoods(String goodsId, Long uid, SystemPIDInfo.PidType pidType) {
|
String tag = null;
|
if (pidType == SystemPIDInfo.PidType.fanli)
|
tag = VipShopUtil.getBuyChanTag(uid);
|
else if (pidType == SystemPIDInfo.PidType.coupon) {
|
tag = VipShopUtil.getCouponChanTag();
|
} else if (pidType == SystemPIDInfo.PidType.share) {
|
tag = VipShopUtil.getShareChanTag(uid);
|
}
|
VIPConvertResultDTO convertUrl = VipShopApiUtil.convertLink(goodsId, tag);
|
return convertUrl;
|
}
|
|
|
}
|