6 changed files with 2 additions and 115 deletions
@ -1,44 +0,0 @@ |
|||
package com.bx.implatform.config; |
|||
|
|||
import com.getui.push.v2.sdk.ApiHelper; |
|||
import com.getui.push.v2.sdk.GtApiConfiguration; |
|||
import com.getui.push.v2.sdk.api.PushApi; |
|||
import lombok.Data; |
|||
import org.springframework.beans.factory.annotation.Value; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @author: 谢绍许 |
|||
* @date: 2024-07-06 |
|||
* @version: 1.0 |
|||
*/ |
|||
@Data |
|||
@Component |
|||
public class UniPushConfig { |
|||
|
|||
@Value("${notify.uniPush.appId}") |
|||
private String appId; |
|||
@Value("${notify.uniPush.appKey}") |
|||
private String appKey; |
|||
@Value("${notify.uniPush.masterSecret}") |
|||
private String masterSecret; |
|||
|
|||
@Bean |
|||
public GtApiConfiguration uniPushConfiguration(){ |
|||
GtApiConfiguration apiConfiguration = new GtApiConfiguration(); |
|||
apiConfiguration.setAppId(appId); |
|||
apiConfiguration.setAppKey(appKey); |
|||
apiConfiguration.setMasterSecret(masterSecret); |
|||
return apiConfiguration; |
|||
} |
|||
|
|||
@Bean |
|||
public PushApi uniPushApi(GtApiConfiguration configuration){ |
|||
// 实例化ApiHelper对象,用于创建接口对象
|
|||
ApiHelper apiHelper = ApiHelper.build(configuration); |
|||
// 创建对象,建议复用。目前有PushApi、StatisticApi、UserApi
|
|||
PushApi pushApi = apiHelper.creatApi(PushApi.class); |
|||
return pushApi; |
|||
} |
|||
} |
|||
@ -1,43 +0,0 @@ |
|||
package com.bx.implatform.session; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 离线通知session |
|||
* @author: blue |
|||
* @date: 2024-07-06 |
|||
* @version: 1.0 |
|||
*/ |
|||
@Data |
|||
public class NotifySession { |
|||
/** |
|||
* 接收方客户端id |
|||
*/ |
|||
private String cid; |
|||
|
|||
/** |
|||
* 通知id |
|||
*/ |
|||
private Integer notifyId; |
|||
|
|||
/** |
|||
* 发送方用户名 |
|||
*/ |
|||
private String sendNickName; |
|||
|
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String title; |
|||
|
|||
/** |
|||
* 显示图标 |
|||
*/ |
|||
private String logo; |
|||
|
|||
/** |
|||
* 消息数量 |
|||
*/ |
|||
private Integer count; |
|||
|
|||
} |
|||
Loading…
Reference in new issue