清理推送多余代码
This commit is contained in:
parent
b102d00d4d
commit
332c3ff11b
@ -99,8 +99,6 @@ public class UniCloudPushServiceImpl implements UniCloudPushService {
|
||||
payload
|
||||
);
|
||||
|
||||
log.debug("[推送服务] 构建请求体成功, 请求体: {}", requestBody);
|
||||
|
||||
// 2. 执行HTTP请求
|
||||
ResponseEntity<String> response = restTemplate.exchange(
|
||||
pushMessageUrl,
|
||||
@ -126,11 +124,6 @@ public class UniCloudPushServiceImpl implements UniCloudPushService {
|
||||
private HttpHeaders buildHeaders() {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.setContentType(MediaType.APPLICATION_JSON);
|
||||
// headers.add("Cookie", "aliyungf_tc=3a871d6048f74707aa0ac71c13f654c4d0fba0471c40625f4c120b6aca248dcf; acw_tc=ac11000117529234975193385ec4f96c1ae4ef16d52f0cde7fce5a0a95eb92"); // 新增:应用标识
|
||||
// headers.add("Host", "fc-mp-39e3d50a-2d2b-415a-9664-2e48974bcfbd.next.bspapp.com"); // 新增:请求唯一标识
|
||||
// headers.add("Authorization", "Basic ZWxhc3RpYzpQQjI1NkZFTjBPaDY0cFZV");
|
||||
// headers.add("User-Agent", "Apifox/1.0.0 (https://apifox.com)");
|
||||
|
||||
return headers;
|
||||
|
||||
// HttpHeaders headers = new HttpHeaders();
|
||||
@ -165,14 +158,6 @@ public class UniCloudPushServiceImpl implements UniCloudPushService {
|
||||
request.put("payload", payload);
|
||||
}
|
||||
|
||||
// 设置平台和有效期
|
||||
// JSONArray platforms = new JSONArray();
|
||||
// platforms.add("web");
|
||||
// platforms.add("app-ios");
|
||||
// platforms.add("app-android");
|
||||
// platforms.add("mp-weixin");
|
||||
// request.put("platform", platforms)
|
||||
|
||||
request.put("settings", new JSONObject().set("ttl", DEFAULT_TTL));
|
||||
|
||||
log.debug("[推送服务] 请求参数: {}", request);
|
||||
|
||||
@ -117,7 +117,7 @@ public class PushMessageServiceImpl implements PushMessageService {
|
||||
}
|
||||
|
||||
List<AccountUserBindGeTui> accountUserBindGeTuiList = accountService.selectAccountUserBindGeTuiListByUserId(userId);
|
||||
|
||||
log.debug("[电子合同推送] 用户绑定的列表:{}", accountUserBindGeTuiList);
|
||||
// 检查返回的列表是否为空或包含无效数据
|
||||
if (accountUserBindGeTuiList == null || accountUserBindGeTuiList.isEmpty()) {
|
||||
log.info("未找到与用户ID相关的设备绑定信息:{}", userId);
|
||||
@ -167,6 +167,7 @@ public class PushMessageServiceImpl implements PushMessageService {
|
||||
public void noticeMerchantEmployeeOrderAction(Integer storeId, String orderId, String title, String content, JSONObject payload) {
|
||||
try {
|
||||
List<String> cidList = shopStoreEmployeeService.selectEmployeeGeTuiCidByStoreId(storeId, orderId, null);
|
||||
log.debug("[订单推送] cid 列表:{}", cidList);
|
||||
// 获取 商家的 cid
|
||||
uniCloudPushService.sendPushMessageBatch(cidList, title, content, payload);
|
||||
} catch (Exception e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user