This commit is contained in:
雷欧(林平凡)
2025-05-23 15:59:00 +08:00
parent 20c87f5f51
commit 5ee53a5d00

View File

@@ -1607,6 +1607,17 @@ public class JDUtil {
wxUtil.sendTextMessage(fromWxid, "添加型号格式错误,请输入正确的格式:添加型号-型号名称-型号SKU", 1, fromWxid, false);
}
return;
}else if (
order.startsWith("删除型号")
){
String replace = order.replace("删除型号-", "");
String[] split = replace.split("-");
if (split.length == 1) {
delProductTypeMap(split[0]);
wxUtil.sendTextMessage(fromWxid, "删除型号成功", 1, fromWxid, false);
} else {
wxUtil.sendTextMessage(fromWxid, "删除型号格式错误,请输入正确的格式:删除型号-型号名称", 1, fromWxid, false);
}
}
try {
StringBuilder productTypeStr = new StringBuilder();
@@ -1644,6 +1655,9 @@ public class JDUtil {
public void addProductTypeMap(String key, String value) {
redisTemplate.opsForHash().put(PRODUCT_TYPE_MAP_PREFIX, key, value);
}
public void delProductTypeMap(String key) {
redisTemplate.opsForHash().delete(PRODUCT_TYPE_MAP_PREFIX, key);
}
/**