Pu Zhibing
8 天以前 ed02b20b31e013159c55ab14b81772e41b36649c
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java
@@ -20,6 +20,7 @@
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;
@@ -47,28 +48,28 @@
    @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;
@@ -133,24 +134,24 @@
        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);
@@ -321,13 +322,13 @@
                        }
                        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;
@@ -483,8 +484,8 @@
        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]);
@@ -494,9 +495,9 @@
        }
        //调用高德创建轨迹
        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());