| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | | import org.yeshi.utils.BigDecimalUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private ConfigTaoLiJinService configTaoLiJinService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | | @Override
|
| | | public void saveCommonTemplate(Long uid, String template) throws ShareGoodsTextTemplateException {
|
| | |
| | | template = ""; // 老板分享
|
| | | }
|
| | | }
|
| | | SystemEnum system=userInfoService.getUserSystem(uid);
|
| | | if (StringUtil.isNullOrEmpty(template)) {
|
| | | template = configService.get(ConfigKeyEnum.shareCommentTextTB.getKey());
|
| | | template = configService.getValue(ConfigKeyEnum.shareCommentTextTB.getKey(),system);
|
| | | }
|
| | |
|
| | | return template;
|
| | |
| | | }
|
| | | }
|
| | | if (StringUtil.isNullOrEmpty(template)) {
|
| | | template = configService.get(ConfigKeyEnum.shareCommentTextJD.getKey());
|
| | | SystemEnum system=userInfoService.getUserSystem(uid);
|
| | | template = configService.getValue(ConfigKeyEnum.shareCommentTextJD.getKey(),system);
|
| | | }
|
| | | return template;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | if (StringUtil.isNullOrEmpty(template)) {
|
| | | template = configService.get(ConfigKeyEnum.shareCommentTextPDD.getKey());
|
| | | SystemEnum system=userInfoService.getUserSystem(uid);
|
| | | template = configService.getValue(ConfigKeyEnum.shareCommentTextPDD.getKey(),system);
|
| | | }
|
| | |
|
| | | return template;
|
| | |
| | | template = objct.getShareVIPTextTemplate();
|
| | | }
|
| | | if (StringUtil.isNullOrEmpty(template)) {
|
| | | template = configService.get(ConfigKeyEnum.shareCommentTextVIP.getKey());
|
| | | SystemEnum system=userInfoService.getUserSystem(uid);
|
| | | template = configService.getValue(ConfigKeyEnum.shareCommentTextVIP.getKey(),system);
|
| | | }
|
| | |
|
| | | return template;
|
| | |
| | | template = objct.getShareSuNingTextTemplate();
|
| | | }
|
| | | if (StringUtil.isNullOrEmpty(template)) {
|
| | | template = configService.get(ConfigKeyEnum.shareCommentTextSuNing.getKey());
|
| | | SystemEnum system=userInfoService.getUserSystem(uid);
|
| | | template = configService.getValue(ConfigKeyEnum.shareCommentTextSuNing.getKey(),system);
|
| | | }
|
| | |
|
| | | return template;
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public String getRecommendText(boolean coupon, String title, String sales, String couponAmount, String description) {
|
| | | String template = configService.get(ConfigKeyEnum.quickShareGoodsText.getKey());
|
| | | public String getRecommendText(boolean coupon, String title, String sales, String couponAmount, String description, SystemEnum system) {
|
| | | String template = configService.getValue(ConfigKeyEnum.quickShareGoodsText.getKey(),system);
|
| | | String recommendText = template.replace("[商品标题]", title);
|
| | | if (!coupon) {
|
| | | recommendText = recommendText.replace("推荐理由:[推荐语]", "");
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public String getCommentTextByTaoToken(boolean coupon, String taoToken, String zkPrice, String quanPrice) {
|
| | | String quickCommentText = configService.get(ConfigKeyEnum.quickShareTBCommentText.getKey());
|
| | | public String getCommentTextByTaoToken(boolean coupon, String taoToken, String zkPrice, String quanPrice, SystemEnum system) {
|
| | | String quickCommentText = configService.getValue(ConfigKeyEnum.quickShareTBCommentText.getKey(),system);
|
| | | String commentText = quickCommentText.replace("[原价]", zkPrice);
|
| | | commentText = commentText.replace("[淘口令]", TaoBaoUtil.filterTaoToken(taoToken));
|
| | | if (!coupon) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public String getCommentTextByLink(boolean coupon, String link, String zkPrice, String quanPrice, ConfigKeyEnum keyEnum) {
|
| | | String quickCommentText = configService.get(keyEnum.getKey());
|
| | | public String getCommentTextByLink(boolean coupon, String link, String zkPrice, String quanPrice, ConfigKeyEnum keyEnum, SystemEnum system) {
|
| | | String quickCommentText = configService.getValue(keyEnum.getKey(),system);
|
| | | String commentText = quickCommentText.replace("[原价]", zkPrice);
|
| | | commentText = commentText.replace("[链接]", link);
|
| | | if (!coupon) {
|