This commit is contained in:
雷欧(林平凡)
2025-01-09 11:49:40 +08:00
parent 38ba262d9c
commit 67aa3e47bc
2 changed files with 10 additions and 5 deletions

View File

@@ -13,6 +13,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import static cn.van.business.util.WXUtil.getWxidFromJdid;
import static cn.van.business.util.WXUtil.jdidToWxidMap;
@@ -51,8 +52,10 @@ public class OrderUtil {
if (!isAutoFlush || !lastValidCode.equals(newValidCode)) {
// 当 isAutoFlush 为 false 或状态确实有变化时,进行消息发送
String content = getFormattedOrderInfo(orderRow, lastValidCode);
String wxId = jdidToWxidMap.get(orderRow.getUnionId());
wxUtil.sendTextMessage(wxId, content, 1, wxId);
String wxId = getWxidFromJdid(orderRow.getUnionId().toString());
if (Util.isNotEmpty(wxId)){
wxUtil.sendTextMessage(wxId, content, 1, wxId);
}
}
// 更新 Redis 状态值

View File

@@ -44,12 +44,14 @@ public class WXUtil {
}
// 初始化超级管理员
public void initSuperAdmins() {
SuperAdmin admin1 = new SuperAdmin("wxid_ytpc72mdoskt22", "", "2014264913","98e21c89ae5610240ec3f5f575f86a59","3dcb6b23a1104639ac433fd07adb6dfb");
public void initSuperAdmins() {
SuperAdmin admin1 = new SuperAdmin("wxid_ytpc72mdoskt22", "", "2014264913",
"98e21c89ae5610240ec3f5f575f86a59","3dcb6b23a1104639ac433fd07adb6dfb");
super_admins.put(admin1.getWxid(), admin1);
jdidToWxidMap.put(admin1.getUnionId(), admin1.getWxid());
SuperAdmin admin2 = new SuperAdmin("wxid_yneqf1implxu12", "", "","","");
SuperAdmin admin2 = new SuperAdmin("wxid_yneqf1implxu12", "", ""
,"","");
super_admins.put(admin2.getWxid(), admin2);
jdidToWxidMap.put(admin2.getUnionId(), admin2.getWxid());