| | |
| | | import com.doumee.dao.business.dao.SmsEmailMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.impl.SmsEmailServiceImpl; |
| | | import com.doumee.service.business.third.EmayService; |
| | | import com.doumee.service.business.third.WmsService; |
| | |
| | | private CarsMapper carsMapper; |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | @Autowired |
| | | private SystemUserMapper systemUserMapper; |
| | | @Autowired |
| | | private PlatformJobMapper platformJobMapper; |
| | | @Autowired |
| | |
| | | |
| | | private void startEndNoticeToDriver(List<PlatformJob> jobList) { |
| | | for(PlatformJob job : jobList){ |
| | | //-----TODO-----------任康,发送司机公众号和 |
| | | //短信通知 |
| | | if(Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.WAIT_CONFIRM.getKey())){ |
| | | SmsEmailServiceImpl.sendPlatformJobSms(systemDictDataBiz, |
| | |
| | | ); |
| | | //查询司机信息 发送公众号通知 |
| | | if(Objects.nonNull(job.getDriverId())){ |
| | | Member member = memberMapper.selectOne(new QueryWrapper<Member>().lambda().eq(Member::getPhone,job.getDriverId())); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | //发送公众号通知 给提交人 |
| | | SystemUser driver = systemUserMapper.selectOne(new QueryWrapper<SystemUser>().lambda() |
| | | .eq(SystemUser::getDeleted, Constants.ZERO) |
| | | .eq(SystemUser::getType, Constants.ZERO) |
| | | .eq(SystemUser::getMobile,job.getDrivierPhone()) |
| | | .last(" limit 1 ")); |
| | | if(Objects.nonNull(driver) && StringUtils.isNotBlank(driver.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendWmsTemplateNotice( |
| | | wxPlatNotice.sendWmsTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,job, |
| | | WxPlatConstants.platformJobContent.platformJobNewJob, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | Arrays.asList(driver.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | |
| | | //公众号通知司机 任务取消 |
| | | PlatformJob job = platformJobMapper.selectById(jobId); |
| | | if(Objects.nonNull(job)){ |
| | | Member member = memberMapper.selectById(job.getDriverId()); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | |
| | | //发送公众号通知 给提交人 |
| | | SystemUser driver = systemUserMapper.selectOne(new QueryWrapper<SystemUser>().lambda() |
| | | .eq(SystemUser::getDeleted, Constants.ZERO) |
| | | .eq(SystemUser::getType, Constants.ZERO) |
| | | .eq(SystemUser::getMobile,job.getDrivierPhone()) |
| | | .last(" limit 1 ")); |
| | | if(Objects.nonNull(driver) && StringUtils.isNotBlank(driver.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendWmsCancelTemplateNotice( |
| | | wxPlatNotice.sendWmsCancelTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,job, |
| | | WxPlatConstants.platformJobContent.platformJobCancel, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | Arrays.asList(driver.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | |
| | | |
| | | //公众号通知司机 任务取消 |
| | | PlatformJob job = platformJobMapper.selectById(jobId); |
| | | if(Objects.nonNull(job)){ |
| | | Member member = memberMapper.selectById(job.getDriverId()); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | if(Objects.nonNull(job)){ //发送公众号通知 给提交人 |
| | | SystemUser driver = systemUserMapper.selectOne(new QueryWrapper<SystemUser>().lambda() |
| | | .eq(SystemUser::getDeleted, Constants.ZERO) |
| | | .eq(SystemUser::getType, Constants.ZERO) |
| | | .eq(SystemUser::getMobile,job.getDrivierPhone()) |
| | | .last(" limit 1 ")); |
| | | if(Objects.nonNull(driver) && StringUtils.isNotBlank(driver.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendWmsCancelTemplateNotice( |
| | | wxPlatNotice.sendWmsCancelTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,job, |
| | | WxPlatConstants.platformJobContent.platformJobCancel, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | Arrays.asList(driver.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |