| | |
| | | import com.stylefeng.guns.modular.system.model.TNotices; |
| | | import com.stylefeng.guns.modular.system.model.TSystemNotice; |
| | | import com.stylefeng.guns.modular.system.model.TUser; |
| | | import com.stylefeng.guns.modular.system.util.JpushUtil; |
| | | import com.stylefeng.guns.modular.system.util.task.base.AbstractJob; |
| | | import org.quartz.JobDataMap; |
| | | import org.quartz.JobExecutionContext; |
| | | import org.quartz.JobExecutionException; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 添加公告记录 |
| | |
| | | TNotices tNotices = tNoticesService.selectById(noticeId); |
| | | if (SinataUtil.isNotEmpty(tNotices)){ |
| | | if (tNotices.getIsUser() == 2){ |
| | | List<TUser> tUsers = tUserService.selectList(new EntityWrapper<TUser>().eq("state",1)); |
| | | List<TUser> tUsers = tUserService.selectList(new EntityWrapper<TUser>().eq("state", 1).ne("flag", 3)); |
| | | //发送公告给用户 |
| | | for (TUser user : tUsers){ |
| | | TSystemNotice notice = new TSystemNotice(); |
| | |
| | | } |
| | | } |
| | | if (tNotices.getIsDriver() == 2){ |
| | | List<TDriver> tDrivers = tDriverService.selectList(new EntityWrapper<TDriver>().eq("authState",2)); |
| | | List<TDriver> tDrivers = tDriverService.selectList(new EntityWrapper<TDriver>().eq("authState", 2).ne("flag", 3)); |
| | | //发送公告给用户 |
| | | for (TDriver driver : tDrivers){ |
| | | TSystemNotice notice = new TSystemNotice(); |
| | |
| | | map.put("id", record.getId()); //对象ID |
| | | JpushUtil.SendPushWithCustomForTransmission(String.valueOf(userInfo.getId()),"【超级过客】提醒您,您有一条新的公告消息。","通知消息",map);*/ |
| | | |
| | | if (tNotices.getIsBroadcast() == 1){ |
| | | //增加极光推送 |
| | | JpushUtil.SendPushWithCustomForSh("DRIVER"+driver.getId().toString(),tNotices.getTitle(),"通知消息",null); |
| | | } |
| | | |
| | | // if (tNotices.getIsBroadcast() == 1){ |
| | | // //增加极光推送 |
| | | // JpushUtil.SendPushWithCustomForSh("DRIVER"+driver.getId().toString(),tNotices.getTitle(),"通知消息",null); |
| | | // } |
| | | |
| | | } |
| | | } |
| | | } |