自动抓评论
This commit is contained in:
@@ -1771,7 +1771,7 @@ public class JDUtil {
|
||||
}
|
||||
|
||||
//getProductTypeMap 从redis中获取PRODUCT_TYPE_MAP_PREFIX
|
||||
public void getProductTypeMap() {
|
||||
public HashMap<String, String> getProductTypeMap() {
|
||||
Map<Object, Object> rawMap = redisTemplate.opsForHash().entries(PRODUCT_TYPE_MAP_PREFIX);
|
||||
|
||||
if (!rawMap.isEmpty()) {
|
||||
@@ -1781,9 +1781,11 @@ public class JDUtil {
|
||||
}
|
||||
// 排序
|
||||
productTypeMap = productTypeMap.entrySet().stream().sorted(Map.Entry.comparingByKey()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
|
||||
return productTypeMap;
|
||||
} else {
|
||||
logger.warn("Redis 中未找到键为 {} 的 Hash 数据", PRODUCT_TYPE_MAP_PREFIX);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void addProductTypeMap(String key, String value) {
|
||||
@@ -1819,6 +1821,7 @@ public class JDUtil {
|
||||
* 生成评论内容
|
||||
*/
|
||||
private synchronized void generateComment(String fromWxid, String productType) {
|
||||
|
||||
//wxUtil.sendTextMessage(fromWxid, "已接收到评论生成指令,等候过程请勿重复输入", 1, fromWxid, true);
|
||||
int allCommentCount = 0;
|
||||
int usedCommentCount = 0;
|
||||
|
||||
Reference in New Issue
Block a user