| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.accept.AdminAcceptData;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.HttpUtil;
|
| | |
| | | * @throws Exception
|
| | | */
|
| | | @RequestMapping(value = "convertLink")
|
| | | public void convertLink(String callback, String url, PrintWriter out) {
|
| | | public void convertLink(AdminAcceptData acceptData,String callback, String url, PrintWriter out) {
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(url)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("转链数据不能为空"));
|
| | |
| | | * @throws Exception
|
| | | */
|
| | | @RequestMapping(value = "newPushUrlAll")
|
| | | public void newPushUrlAll(String callback, String url, String title, String content, String uids, |
| | | String arrayIOS, String arrayAndroid, PrintWriter out) {
|
| | | public void newPushUrlAll(AdminAcceptData acceptData, String callback, String url, String title, String content, String uids,
|
| | | String arrayIOS, String arrayAndroid, PrintWriter out) {
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(url) || StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请填写链接,标题与内容"));
|
| | |
| | |
|
| | | if (listuid == null) {
|
| | | // 全推
|
| | | pushService.pushUrl(null, title, content, url, listIOS, listAndroid);
|
| | | pushService.pushUrl(null, title, content, url, listIOS, listAndroid,acceptData.getSystem());
|
| | | } else {
|
| | | // 部分推送
|
| | | for (String str_uid: listuid) {
|
| | | if (str_uid != null && str_uid.trim().length() > 0) {
|
| | | pushService.pushUrl(Long.parseLong(str_uid), title, content, url, listIOS, listAndroid);
|
| | | pushService.pushUrl(Long.parseLong(str_uid), title, content, url, listIOS, listAndroid,acceptData.getSystem());
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | *
|
| | | * 方法说明: 站内信推送 -(新后台)
|
| | | *
|
| | | * @param uId
|
| | | * @param title
|
| | | * @param content
|
| | | * @throws Exception
|
| | | */
|
| | | @RequestMapping(value = "newPushFanZNX")
|
| | | public void newPushFanZNX(String callback, String uids, String title, String content, String arrayIOS, |
| | | public void newPushFanZNX(AdminAcceptData acceptData,String callback, String uids, String title, String content, String arrayIOS,
|
| | | String arrayAndroid, PrintWriter out) {
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) {
|
| | |
| | |
|
| | | if (listuid == null) {
|
| | | // 全推
|
| | | pushService.pushZNX(null, title, content, listIOS, listAndroid);
|
| | | pushService.pushZNX(null, title, content, listIOS, listAndroid,acceptData.getSystem());
|
| | | } else {
|
| | | // 部分推送
|
| | | for (String str_uid: listuid) {
|
| | | if (str_uid != null && str_uid.trim().length() > 0) {
|
| | | pushService.pushZNX(Long.parseLong(str_uid), title, content, listIOS, listAndroid);
|
| | | pushService.pushZNX(Long.parseLong(str_uid), title, content, listIOS, listAndroid,acceptData.getSystem());
|
| | |
|
| | | userSystemMsgService.addUserSystemMsg(Long.parseLong(str_uid), UserSystemMsgTypeEnum.question,
|
| | | title, content, UserSystemMsg.TIME_TAG_EMERGENT, null);
|
| | |
| | | *
|
| | | * 方法说明: 百川推送 -(新后台)
|
| | | *
|
| | | * @param uId
|
| | | * @param title
|
| | | * @param content
|
| | | * @throws Exception
|
| | | */
|
| | | @RequestMapping(value = "pushBaiChuan")
|
| | | public void pushBaiChuan(String callback, String uids, String title, String content, String url, String arrayIOS,
|
| | | public void pushBaiChuan(AdminAcceptData acceptData,String callback, String uids, String title, String content, String url, String arrayIOS,
|
| | | String arrayAndroid, PrintWriter out) {
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) {
|
| | |
| | |
|
| | | if (listuid == null) {
|
| | | // 全推
|
| | | pushService.pushBaiChuanUrl(null, title, content, url, listIOS, listAndroid);
|
| | | pushService.pushBaiChuanUrl(null, title, content, url, listIOS, listAndroid,acceptData.getSystem());
|
| | | } else {
|
| | | // 部分推送
|
| | | for (String str_uid: listuid) {
|
| | | if (str_uid != null && str_uid.trim().length() > 0) {
|
| | | pushService.pushBaiChuanUrl(Long.parseLong(str_uid), title, content, url, listIOS, listAndroid);
|
| | | pushService.pushBaiChuanUrl(Long.parseLong(str_uid), title, content, url, listIOS, listAndroid,acceptData.getSystem());
|
| | | }
|
| | | }
|
| | | }
|