yujian
2020-05-09 7e7db2fa55a9a3af46d4fd8ede0dee147f101d64
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserGoodsStorageServiceImpl.java
@@ -20,8 +20,10 @@
import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
import com.yeshi.fanli.dto.share.ShareGoodsRecordDTO;
import com.yeshi.fanli.entity.bus.user.UserGoodsStorage;
import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
import com.yeshi.fanli.entity.goods.CommonGoods;
import com.yeshi.fanli.entity.jd.JDGoods;
import com.yeshi.fanli.entity.system.ConfigKeyEnum;
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
import com.yeshi.fanli.exception.goods.CommonGoodsException;
import com.yeshi.fanli.exception.share.UserShareGoodsRecordException;
@@ -217,7 +219,7 @@
   }
   @Override
   @Transactional
   @Transactional(rollbackFor=Exception.class)
   public void addCommonGoods(Long uid, Set<Long> ids) throws UserGoodsStorageException {
      if (uid == null) {
@@ -289,7 +291,7 @@
         }
      }
      BigDecimal rate = manageService.getFanLiRate();
      BigDecimal rate = manageService.getFanLiRate(UserLevelEnum.daRen);
      Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
            .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
@@ -372,7 +374,7 @@
      BigDecimal totalMoney = new BigDecimal(0.00);
      List<TaoBaoGoodsBrief> listGoodsBrief = new ArrayList<TaoBaoGoodsBrief>();
      BigDecimal rate = hongBaoManageService.getShareRate();
      BigDecimal rate = hongBaoManageService.getShareRate(UserLevelEnum.daRen);
      for (UserGoodsStorage userGoodsStorage : listResult) {
         CommonGoods commonGoods = userGoodsStorage.getCommonGoods();
         TaoBaoGoodsBrief goodsBrief = TaoBaoUtil.convert(commonGoods);
@@ -391,7 +393,7 @@
      data.put("revenue", listGoodsBrief.size() + "个商品预估分享奖金:¥" + totalMoney);
      data.put("shareId", shareRecord.getRedisKey());
      data.put("shareImg", uploadResult);
      data.put("notifyDesc", configService.get("goods_share_multiple_notify"));
      data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareMultipleNotify.getKey()));
      return data;
   }
@@ -419,7 +421,7 @@
      List<CommonGoods> listCommonGoods = new ArrayList<CommonGoods>();
      Integer goodsType = null;
      BigDecimal rate = hongBaoManageService.getShareRate();
      BigDecimal rate = hongBaoManageService.getShareRate(UserLevelEnum.daRen);
      for (UserGoodsStorage userGoodsStorage : listResult) {
         CommonGoods commonGoods = userGoodsStorage.getCommonGoods();
         BigDecimal money = CommonGoodsUtil.getCommission(commonGoods, rate);
@@ -444,12 +446,12 @@
      // 提示语不同
      if (goodsType == Constant.SOURCE_TYPE_JD) {
         // 京东
         data.put("notifyDesc", configService.get("goods_share_notify_jd"));
         data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareNotifyJD.getKey()));
      } else if (goodsType == Constant.SOURCE_TYPE_PDD) {
         // 拼多多
         data.put("notifyDesc", configService.get("goods_share_notify_pdd"));
         data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareNotifyPDD.getKey()));
      } else {
         data.put("notifyDesc", configService.get("goods_share_multiple_notify"));
         data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareMultipleNotify.getKey()));
      }
      return data;
   }