| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | |
| | | 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"));
|