ny
昨天 b6f169fe43a2b13f351aefc152374fc7f0bc8cb7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package jnpf.message.util.unipush;
 
import jnpf.config.ConfigValueUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
 
import java.util.List;
 
 
@Component
@Slf4j
public class UinPush {
    @Autowired
    private ConfigValueUtil configValueUtil;
 
    public void sendUniPush(List<String> cidList, String title, String content, String type, String text){
        if(cidList !=null && cidList.size()>0 ) {
            String cid = StringUtils.join(cidList,",");
            String url = configValueUtil.getAppPushUrl() + "?clientId=" + cid + "&title=" + title + "&content=" + content + "&text=" + text + "&create=true";
            cn.hutool.http.HttpUtil.get(url);
        }
    }
 
}