Administrator
2018-12-18 d146e7bca73c7605af6b718b5df0b757e0034f0e
fanli/src/main/java/com/yeshi/fanli/service/impl/activity/ActivityServiceImpl.java
@@ -8,6 +8,7 @@
import javax.annotation.Resource;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.cache.annotation.Cacheable;
@@ -230,21 +231,40 @@
         throw new ActivityException(1, "商品下架");
      }
      
      String revenue = "";
      String fontColor1 = "#000000";
      String fontColor2 = "#E5005C";
      JSONArray array = new JSONArray();
      JSONObject contentJson1 = new JSONObject();
      contentJson1.put("color", fontColor1);
      contentJson1.put("content", "预估分享奖金:");
      String revenue = "¥0";
      String totalGetMoney = activity.getTotalGetMoney();
      if (totalGetMoney != null && totalGetMoney.trim().length() > 0) {
         revenue = totalGetMoney.replace("预计分享奖金", listGoodsBrief.size()+"个商品预估分享奖金");
         String[] split = totalGetMoney.split(":");
         if (split != null) {
            revenue = split[1];
         }
      }
      JSONObject contentJson2 = new JSONObject();
      contentJson2.put("color", fontColor2);
      contentJson2.put("content", revenue);
      array.add(contentJson1);
      array.add(contentJson2);
      
      JSONObject data = new JSONObject();
      
      Map<String,Object> map = userShareGoodsRecordService.save(uid, ShareSourceTypeEnum.activity, title, listGoodsBrief);
      
      data.put("title", title);
      data.put("revenue", revenue);
      data.put("revenue", array);
      data.put("shareId", map.get("shareId"));
      data.put("shareImg", map.get("loadResult"));
      data.put("notifyDesc", configService.get("goods_share_notify"));
      data.put("notifyDesc", configService.get("goods_share_multiple_notify"));
      return data;