| | |
| | | @Component |
| | | public class JGPushUtil { |
| | | |
| | | @Value("${jiguang.open}") |
| | | private Boolean open; |
| | | |
| | | @Value("${jiguang.appKey-driver}") |
| | | private String appKeyDriver; |
| | | |
| | |
| | | * @param content |
| | | */ |
| | | public void push(Integer type, String content, String...tags){ |
| | | if(!open){ |
| | | return; |
| | | } |
| | | String masterSecret = (type == 1 ? masterSecretDriver : masterSecretDispatch); |
| | | String appKey = (type == 1 ? appKeyDriver : appKeyDispatch); |
| | | JPushClient jpushClient = new JPushClient(masterSecret, appKey, null, ClientConfig.getInstance()); |
| | |
| | | |
| | | |
| | | public void push(Integer type, String content, String title, Map<String, String> map, String...tags){ |
| | | if(!open){ |
| | | return; |
| | | } |
| | | String masterSecret = (type == 1 ? masterSecretDriver : masterSecretDispatch); |
| | | String appKey = (type == 1 ? appKeyDriver : appKeyDispatch); |
| | | JPushClient jpushClient = new JPushClient(masterSecret, appKey, null, ClientConfig.getInstance()); |