1
This commit is contained in:
@@ -204,7 +204,7 @@ public class JDUtil {
|
||||
wxUtil.sendTextMessage(chatRoom_BY, chatRoomRemark + " " + date + "\n\n " + message, 1, chatRoom_BY, true);
|
||||
|
||||
// 2. 生成推广内容
|
||||
HashMap<String, List<String>> contentResult = generatePromotionContent(message, true);
|
||||
HashMap<String, List<String>> contentResult = generatePromotionContent(message, true,fromWxid);
|
||||
|
||||
|
||||
// 3. 发送文本内容
|
||||
@@ -1050,7 +1050,7 @@ public class JDUtil {
|
||||
cacheMap.remove("finalWenAn" + wxid);
|
||||
|
||||
// 2. 生成推广内容
|
||||
HashMap<String, List<String>> contentResult = generatePromotionContent(message, false);
|
||||
HashMap<String, List<String>> contentResult = generatePromotionContent(message, false, wxid);
|
||||
|
||||
if (withPic) {
|
||||
// 3. 发送文本内容
|
||||
@@ -1170,10 +1170,11 @@ public class JDUtil {
|
||||
/**
|
||||
* 生成转链和方案的方法
|
||||
*
|
||||
* @param message 方案内容,包含商品链接
|
||||
* @param message 方案内容,包含商品链接
|
||||
* @param fromWxid
|
||||
* @return 处理后的方案,附带商品信息
|
||||
*/
|
||||
public synchronized HashMap<String, List<String>> generatePromotionContent(String message, Boolean isCj) {
|
||||
public synchronized HashMap<String, List<String>> generatePromotionContent(String message, Boolean isCj, String wxid) {
|
||||
HashMap<String, List<String>> finallyMessage = new HashMap<>();
|
||||
List<String> textList = new ArrayList<>();
|
||||
List<String> imagesList = new ArrayList<>();
|
||||
@@ -1447,6 +1448,7 @@ public class JDUtil {
|
||||
XbMessage xbMessage = new XbMessage();
|
||||
xbMessage.setCreateDate(LocalDate.now());
|
||||
xbMessage.setTipOriginalMessage(message);
|
||||
xbMessage.setFromWxid(wxid);
|
||||
xbMessage = xbMessageRepository.save(xbMessage);
|
||||
xbMessageId = xbMessage.getId();
|
||||
}
|
||||
@@ -1472,10 +1474,10 @@ public class JDUtil {
|
||||
xbMessageItem.setCreateDate(LocalDate.now());
|
||||
xbMessageItem.setXbMessageId(String.valueOf(xbMessageId));
|
||||
xbMessageItem.setJsonQueryResult(JSONObject.toJSONString(productInfo.getData()[0]));
|
||||
xbMessageItem.setJsonCouponlist(JSONObject.toJSONString(productInfo.getData()[0].getCouponInfo().getCouponList()));
|
||||
xbMessageItem.setJsonShopinfo(JSONObject.toJSONString(productInfo.getData()[0].getShopInfo()));
|
||||
xbMessageItem.setJsonCategoryinfo(JSONObject.toJSONString(productInfo.getData()[0].getCategoryInfo()));
|
||||
xbMessageItem.setJsonImagelist(JSONObject.toJSONString(productInfo.getData()[0].getImageInfo().getImageList()));
|
||||
xbMessageItem.setJsonCouponList(JSONObject.toJSONString(productInfo.getData()[0].getCouponInfo().getCouponList()));
|
||||
xbMessageItem.setJsonShopInfo(JSONObject.toJSONString(productInfo.getData()[0].getShopInfo()));
|
||||
xbMessageItem.setJsonCategoryInfo(JSONObject.toJSONString(productInfo.getData()[0].getCategoryInfo()));
|
||||
xbMessageItem.setJsonImageList(JSONObject.toJSONString(productInfo.getData()[0].getImageInfo().getImageList()));
|
||||
xbMessageItem.setSpuid(String.valueOf(productInfo.getData()[0].getSpuid()));
|
||||
xbMessageItem.setSkuid(String.valueOf(productInfo.getData()[0].getSkuId()));
|
||||
xbMessageItem.setSkuName(productInfo.getData()[0].getSkuName());
|
||||
|
||||
Reference in New Issue
Block a user