1
This commit is contained in:
@@ -130,6 +130,7 @@ public class JDProductService {
|
||||
itemMap.put("spuid", String.valueOf(productInfo.getData()[0].getSpuid()));
|
||||
itemMap.put("commission", String.valueOf(productInfo.getData()[0].getCommissionInfo().getCommission()));
|
||||
itemMap.put("commissionShare", String.valueOf(productInfo.getData()[0].getCommissionInfo().getCommissionShare()));
|
||||
itemMap.put("price", String.valueOf(productInfo.getData()[0].getPriceInfo().getPrice()));
|
||||
|
||||
couponInfo.append("店铺: ").append(itemMap.get("shopName")).append("\n").append("标题: ").append(replaceAll).append("\n").append("自营 POP: ").append(itemMap.get("owner").equals("g") ? " 自营 " : " POP ").append("\n").append("佣金比例: ").append(itemMap.get("commissionShare")).append("\n").append("佣金: ").append(itemMap.get("commission")).append("\n");
|
||||
|
||||
@@ -214,7 +215,7 @@ public class JDProductService {
|
||||
*/
|
||||
public synchronized JSONArray generatePromotionContentAsJsonArray(String message) {
|
||||
JSONArray resultArray = new JSONArray();
|
||||
|
||||
|
||||
// 提取方案中的所有 u.jd.com 链接
|
||||
List<String> urls = extractUJDUrls(message);
|
||||
if (urls.isEmpty()) {
|
||||
@@ -231,7 +232,7 @@ public class JDProductService {
|
||||
try {
|
||||
// 新建格式好日期
|
||||
format = dateFormat.format(new Date());
|
||||
|
||||
|
||||
// 查询商品信息
|
||||
GoodsQueryResult productInfo = queryProductInfoByUJDUrl(url);
|
||||
if (productInfo == null || productInfo.getCode() != 200) {
|
||||
@@ -254,7 +255,7 @@ public class JDProductService {
|
||||
// 创建商品对象
|
||||
JSONObject productObj = new JSONObject();
|
||||
productObj.put("url", url);
|
||||
|
||||
|
||||
// 商品基本信息
|
||||
productObj.put("materialUrl", productInfo.getData()[0].getMaterialUrl());
|
||||
productObj.put("oriItemId", productInfo.getData()[0].getOriItemId());
|
||||
@@ -279,7 +280,7 @@ public class JDProductService {
|
||||
|
||||
// 文案信息
|
||||
JSONArray wenanArray = new JSONArray();
|
||||
|
||||
|
||||
String title = "";
|
||||
try {
|
||||
if (!message.equals(url)) {
|
||||
@@ -319,7 +320,7 @@ public class JDProductService {
|
||||
wenanArray.add(wenan4);
|
||||
|
||||
productObj.put("wenan", wenanArray);
|
||||
|
||||
|
||||
// 添加通用文案
|
||||
JSONObject commonWenan = new JSONObject();
|
||||
commonWenan.put("type", "通用文案");
|
||||
|
||||
Reference in New Issue
Block a user