| | |
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | | import org.yeshi.utils.BigDecimalUtil;
|
| | | import org.yeshi.utils.HttpUtil;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.goods.ShareGoodsTextTemplateMapper;
|
| | |
| | | String shortLink, boolean hasCoupon) {
|
| | |
|
| | | if (!hasCoupon) {
|
| | | return template.replace("{标题}", goods.getTitle()).replace("{商品原价}", goods.getZkPrice().toString())
|
| | | return template.replace("{标题}", goods.getTitle()).replace("{商品原价}", BigDecimalUtil.getWithNoZera(goods.getZkPrice()).toString())
|
| | | .replace("{月销量}", TaoBaoUtil.getSaleCount(goods.getBiz30day())).replace("{短链}", shortLink)
|
| | | .replace("{淘口令}", "").replace("{店铺类型}", goods.getUserType() == 1 ? "天猫价"
|
| | | : "淘宝价");
|
| | | } else {
|
| | | return template.replace("{标题}", goods.getTitle()).replace("{商品原价}", goods.getZkPrice().toString())
|
| | | return template.replace("{标题}", goods.getTitle()).replace("{商品原价}", BigDecimalUtil.getWithNoZera( goods.getZkPrice()).toString())
|
| | | .replace("{月销量}", TaoBaoUtil.getSaleCount(goods.getBiz30day())).replace("{领券短链}", shortLink)
|
| | | .replace("{淘口令}", token).replace("{优惠券面额}", goods.getCouponAmount().toString())
|
| | | .replace("{优惠券价}", TaoBaoUtil.getAfterUseCouplePrice(goods).toString())
|
| | | .replace("{淘口令}", token).replace("{优惠券面额}", BigDecimalUtil.getWithNoZera(goods.getCouponAmount()).toString())
|
| | | .replace("{优惠券价}", BigDecimalUtil.getWithNoZera( TaoBaoUtil.getAfterUseCouplePrice(goods)).toString())
|
| | | .replace("{店铺类型}", goods.getUserType() == 1 ? "天猫价" : "淘宝价");
|
| | | }
|
| | | }
|