| | |
| | | import com.aliyun.sdk.service.push20160801.models.*; |
| | | import com.aliyun.sdk.service.push20160801.*; |
| | | import com.google.gson.Gson; |
| | | import com.xiaopeng.common.core.constant.AliPushTypeConstant; |
| | | import com.xiaopeng.common.core.enums.NotificationTypeEnum; |
| | | import darabonba.core.client.ClientOverrideConfiguration; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | if(deviceType == 2){ |
| | | channelIds = iosChannelId; |
| | | } |
| | | |
| | | String content = body; |
| | | if (pushType.equals(AliPushTypeConstant.NOTICE)) { |
| | | JSONObject jsonObject = JSONObject.parseObject(body); |
| | | content = jsonObject.getString("content"); |
| | | } |
| | | PushRequest pushRequest = PushRequest.builder() |
| | | .appKey(appKeys) |
| | | .pushType(pushType) |
| | |
| | | .target(TARGET) |
| | | .targetValue(account) |
| | | .title(title) |
| | | .body(body) |
| | | .body(content) |
| | | .androidExtParameters(body) |
| | | .androidNotificationChannel(channelIds) |
| | | .build(); |
| | |
| | | .target(TARGET) |
| | | .targetValue(account) |
| | | .title(title) |
| | | .body(body) |
| | | .body(content) |
| | | .iOSExtParameters(body) |
| | | .androidNotificationChannel(channelIds) |
| | | .build(); |