| | |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import com.stylefeng.guns.modular.system.warpper.MerchantCouponListWarpper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Autowired |
| | | private ChinaMobileUtil chinaMobileUtil; |
| | | |
| | | |
| | | @Autowired |
| | | private PushUtil pushUtil; |
| | | |
| | | |
| | | @Autowired |
| | | private ISystemNoticeService systemNoticeService; |
| | | |
| | | |
| | | @Autowired |
| | | private IOrderLogisticsSpreadService orderLogisticsSpreadService; |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | |
| | | @Resource |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | @Autowired |
| | | private ICompanyService companyService; |
| | | |
| | | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | |
| | | |
| | | @Autowired |
| | | private ALiSendSms aLiSendSms; |
| | | |
| | | |
| | | @Resource |
| | | private UserInfoMapper userInfoMapper; |
| | | |
| | |
| | | orderLogistics.setSnatchOrderTime(new Date()); |
| | | |
| | | //调用高德创建轨迹 |
| | | String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | String track = gdFalconUtil.createTrack(s); |
| | | orderLogistics.setTrackId(track); |
| | | // String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | // String track = gdFalconUtil.createTrack(s); |
| | | // orderLogistics.setTrackId(track); |
| | | |
| | | //调用移动的小号接口 |
| | | Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderLogistics.getRecipientPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | if(String.valueOf(map.get("code")).equals("200")){ |
| | | orderLogistics.setTelX(map.get("telX")); |
| | | orderLogistics.setBindId(map.get("bindId")); |
| | | } |
| | | UserInfo userInfo = userInfoMapper.selectById(orderLogistics.getUserId()); |
| | | // Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderLogistics.getRecipientPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | // if(String.valueOf(map.get("code")).equals("200")){ |
| | | // orderLogistics.setTelX(map.get("telX")); |
| | | // orderLogistics.setBindId(map.get("bindId")); |
| | | // } |
| | | // UserInfo userInfo = userInfoMapper.selectById(orderLogistics.getUserId()); |
| | | |
| | | Map<String, String> map1 = chinaMobileUtil.midAxbBindSend(userInfo.getPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | System.out.println("二次绑定信息:"+map1); |
| | | if(String.valueOf(map1.get("code")).equals("200")){ |
| | | orderLogistics.setTelXOne(map1.get("telX")); |
| | | orderLogistics.setBindIdOne(map1.get("bindId")); |
| | | } |
| | | // Map<String, String> map1 = chinaMobileUtil.midAxbBindSend(userInfo.getPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | // System.out.println("二次绑定信息:"+map1); |
| | | // if(String.valueOf(map1.get("code")).equals("200")){ |
| | | // orderLogistics.setTelXOne(map1.get("telX")); |
| | | // orderLogistics.setBindIdOne(map1.get("bindId")); |
| | | // } |
| | | |
| | | this.updateById(orderLogistics); |
| | | |
| | |
| | | } |
| | | merchantActivityService.updateBatchById(merchantActivities); |
| | | } |
| | | String value = redisUtil.getValue("merchantVoucher"); |
| | | String value = (String) redisTemplate.opsForValue().get("merchantVoucher"); |
| | | JSONObject jsonObject = JSON.parseObject(value); |
| | | if(null == jsonObject){ |
| | | jsonObject = new JSONObject(); |
| | | } |
| | | jsonObject.put(userInfo.getPhone(), listWarppers); |
| | | redisUtil.setStrValue("merchantVoucher", jsonObject.toJSONString()); |
| | | redisTemplate.opsForValue().set("merchantVoucher", jsonObject.toJSONString()); |
| | | } |
| | | |
| | | break; |
| | |
| | | orderLogistics.setArriveTime(date); |
| | | orderLogistics.setStartServiceTime(date); |
| | | orderLogistics.setBoardingTime(date); |
| | | |
| | | String value = redisUtil.getValue("DRIVER" + uid); |
| | | |
| | | String value = (String) redisTemplate.opsForValue().get("DRIVER" + uid); |
| | | if(ToolUtil.isNotEmpty(value)){ |
| | | String[] split = value.split(","); |
| | | Map<String, String> geocode1 = gdMapGeocodingUtil.geocode(split[0], split[1]); |
| | |
| | | } |
| | | |
| | | //调用高德创建轨迹 |
| | | String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | String track = gdFalconUtil.createTrack(s); |
| | | orderLogistics.setTrackId(track); |
| | | // String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | // String track = gdFalconUtil.createTrack(s); |
| | | // orderLogistics.setTrackId(track); |
| | | |
| | | //调用移动的小号接口 TODO 车载端使用真实号码 |
| | | // Map<String, String> geocode = gdMapGeocodingUtil.geocode(orderTaxi.getStartLon().toString(), orderTaxi.getStartLat().toString()); |