| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.scheduling.annotation.Async;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.controller.admin.PushController;
|
| | |
| | | @Resource
|
| | | private DeviceTokenHWService deviceTokenHWService;
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushGoods(Long uid, Long auctionId, String title, String content) throws PushException {
|
| | | public void pushGoods(Long uid, Long auctionId, String title, String content, String versions)
|
| | | throws PushException {
|
| | | if (1 > 0)
|
| | | return;
|
| | | String gid = auctionId + "";
|
| | | JSONObject json = new JSONObject();
|
| | | json.put("url", "");
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushUrl(Long uid, String url, String title, String content) throws PushException {
|
| | | public void pushUrl(Long uid, String url, String title, String content, String versions) throws PushException {
|
| | | if (1 > 0)
|
| | | return;
|
| | | JSONObject json = new JSONObject();
|
| | | json.put("url", url);
|
| | | json.put("type", "url");
|
| | |
| | | }
|
| | | }
|
| | | try {
|
| | | HWPushUtil.pushWeb(deviceTokens, title, content, url);
|
| | | HWPushUtil.pushUrl(deviceTokens, title, content, url);
|
| | | } catch (Exception e) {
|
| | | PushLogHelper.hwError(e);
|
| | | }
|
| | |
| | | for (DeviceTokenHW dt : hwDeviceList)
|
| | | deviceList.add(dt.getDeviceToken());
|
| | | try {
|
| | | HWPushUtil.pushWeb(deviceList, title, content, url);
|
| | | HWPushUtil.pushUrl(deviceList, title, content, url);
|
| | | } catch (Exception e) {
|
| | | PushLogHelper.hwError(e);
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushWEEXUrl(Long uid, String weexUrl, String title, String content) throws PushException {
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushZNX(Long uid, AccountMessage msg, SystemZnx systemZNX) throws PushException {
|
| | |
|
| | | public void pushZNX(Long uid, AccountMessage msg, SystemZnx systemZNX, String versions) throws PushException {
|
| | | if (1 > 0)
|
| | | return;
|
| | | JSONObject contentJson = new JSONObject();
|
| | | contentJson.put("isOpen", 0);
|
| | | contentJson.put("createTime", java.lang.System.currentTimeMillis());
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushWEEX(Long uid, String title, String content, String weexUrl, String versions) throws PushException {
|
| | | // TODO 推送weex页面
|
| | |
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushBaiChuanUrl(Long uid, String title, String content, String url, String versions)
|
| | | throws PushException {
|
| | | // TODO 推送淘客百川链接
|
| | |
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushWelfareCenter(Long uid, String title, String content, String versions) throws PushException {
|
| | | // TODO Auto-generated method stub
|
| | |
|
| | | }
|
| | |
|
| | | }
|