| | |
| | | <artifactId>spring-boot-starter-data-redis</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.redisson</groupId> |
| | | <artifactId>redisson-spring-boot-starter</artifactId> |
| | | <version>3.16.8</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.lettuce</groupId> |
| | | <artifactId>lettuce-core</artifactId> |
| | | </dependency> |
| | |
| | | <version>1.0.0</version> |
| | | <scope>system</scope> |
| | | <systemPath>${pom.basedir}/lib/openApiClient-1.0.0.jar</systemPath> |
| | | </dependency> |
| | | <!--单点登录sdk--> |
| | | <dependency> |
| | | <groupId>com.cas</groupId> |
| | | <artifactId>cas-client-oncon</artifactId> |
| | | <version>3.0.5</version> |
| | | <scope>system</scope> |
| | | <systemPath>${pom.basedir}/lib/cas-client-oncon-3.0.5.jar</systemPath> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.cas</groupId> |
| | | <artifactId>cas-client-oncon-core</artifactId> |
| | | <version>1.2.2</version> |
| | | <scope>system</scope> |
| | | <systemPath>${pom.basedir}/lib/cas-client-oncon-core-1.2.2.jar</systemPath> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>commons-httpclient</groupId> |
| | |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alipay.api.internal.util.file.IOUtils; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.config.properties.GunsProperties; |
| | |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.model.vo.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ALiSendSms; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.WeChatUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.NCOSSUtil; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.http.*; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.util.LinkedMultiValueMap; |
| | | import org.springframework.util.MultiValueMap; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpSession; |
| | | import java.io.ByteArrayInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static org.bouncycastle.cms.RecipientId.password; |
| | | |
| | | /** |
| | | * 司机控制器 |
| | |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/api/driver/queryPhone") |
| | | @ApiOperation(value = "获取客服电话", tags = {"司机端-个人中心"}, notes = "车队=franchisee,分公司=branch,平台=platform") |
| | | @ApiOperation(value = "获取客服电话(黔云通)", tags = {"司机端-个人中心"}, notes = "车队=franchisee,分公司=branch,平台=platform") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "当前行政区划代码", name = "code", required = true, dataType = "String"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil queryPhone(HttpServletRequest request){ |
| | | public ResultUtil queryPhone(String code, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = driverService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | Map<String, Object> map = driverService.queryPhone(uid); |
| | | Map<String, Object> map = driverService.queryPhone(uid, code); |
| | | return ResultUtil.success(map); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/base/driver/getDriverInfo") |
| | | public void getDriverInfo(String lsu, String ssologinid, String ticket, HttpSession session) { |
| | | try { |
| | | String onconParam = edu.yale.its.tp.cas.client.Util.getOnconParam(session); |
| | | onconParam = new String(Base64.getDecoder().decode(onconParam), "UTF-8"); |
| | | System.err.println("lsu: " + lsu + ",ticket: " + ticket + ",ssologinid: " + ssologinid); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | // @ResponseBody |
| | |
| | | import com.stylefeng.guns.modular.smallLogistics.model.OrderLogistics; |
| | | import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService; |
| | | import com.stylefeng.guns.modular.system.dao.DriverWorkMapper; |
| | | import com.stylefeng.guns.modular.system.model.DriverWork; |
| | | import com.stylefeng.guns.modular.system.model.Reassign; |
| | | import com.stylefeng.guns.modular.system.model.SysTimeoutMoney; |
| | | import com.stylefeng.guns.modular.system.model.TimeOutAppeal; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ChinaMobileUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushUtil; |
| | |
| | | |
| | | @Resource |
| | | private DriverWorkMapper driverWorkMapper; |
| | | |
| | | @Autowired |
| | | private ISysTimeoutMoneyService sysTimeoutMoneyService; |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private ISysTimeoutMoneyService sysTimeoutMoneyService; |
| | | |
| | | |
| | | /** |
| | | * 获取服务中页面订单详情 |
| | |
| | | Map<String, Object> map = orderService.queryOrderInfo(uid, orderId, orderType); |
| | | |
| | | if (orderType == 4 || orderType == 5){ |
| | | |
| | | SysTimeoutMoney sysTimeoutMoney = sysTimeoutMoneyService.selectOne(null); |
| | | OpenCity openCity = openCityService.openCity1(map.get("startLon").toString(), map.get("startLat").toString()); |
| | | SysTimeoutMoney sysTimeoutMoney = sysTimeoutMoneyService.selectOne(new EntityWrapper<SysTimeoutMoney>().eq("openCityId", openCity.getId())); |
| | | map.put("timeOutMoney",Double.parseDouble(map.get("timeOutMoney").toString())); |
| | | map.put("note","配送超过" + sysTimeoutMoney.getTimeOut() + "分钟扣订单的" + sysTimeoutMoney.getDeductMoney() + "%费用"); |
| | | |
| | |
| | | } |
| | | } |
| | | return ResultUtil.success(OrderInfoWarpper.getOrderInfoWarpper(map)); |
| | | //return ResultUtil.success(OrderInfoWarpper.getOrderInfoWarpper(map)); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | Map<String, Object> map = orderService.queryOrderInfo(uid, orderId, 7); |
| | | |
| | | if (orderType == 4 || orderType == 5){ |
| | | |
| | | SysTimeoutMoney sysTimeoutMoney = sysTimeoutMoneyService.selectOne(null); |
| | | OpenCity openCity = openCityService.openCity1(map.get("startLon").toString(), map.get("startLat").toString()); |
| | | SysTimeoutMoney sysTimeoutMoney = sysTimeoutMoneyService.selectOne(new EntityWrapper<SysTimeoutMoney>().eq("openCityId", openCity.getId())); |
| | | map.put("timeOutMoney",Double.parseDouble(map.get("timeOutMoney").toString())); |
| | | map.put("note","配送超过" + sysTimeoutMoney.getTimeOut() + "分钟扣订单的" + sysTimeoutMoney.getDeductMoney() + "%费用"); |
| | | |
| | |
| | | |
| | | @Resource |
| | | private UserInfoMapper userInfoMapper; |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | @Autowired |
| | | private DateUtil dateUtil; |
| | |
| | | map.put("orderNumber", orderCrossCity.getOrderNum()); |
| | | map.put("totalMoney", new BigDecimal(totalMoney).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | map.put("serverMoney", new BigDecimal(serverMoney).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | Phone phone = phoneMapper.queryInfo(orderCrossCity.getCompanyId(), 1); |
| | | OpenCity openCity = openCityService.openCity1(orderCrossCity.getStartLon().toString(), orderCrossCity.getStartLat().toString()); |
| | | Phone phone = phoneMapper.queryInfo(openCity.getId(), 1, 1); |
| | | map.put("emergencyCall", null != phone ? phone.getPhone() : "110"); |
| | | map.put("orders", JSON.toJSONString(order)); |
| | | |
| | |
| | | orderCrossCity.setIsReassign(1); |
| | | orderCrossCity.setLineShiftDriverId(orderCrossCityWarpper.getLineShiftDriverId()); |
| | | //调用高德创建轨迹 |
| | | String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | String track = gdFalconUtil.createTrack(s); |
| | | orderCrossCity.setTrackId(track); |
| | | // String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | // String track = gdFalconUtil.createTrack(s); |
| | | // orderCrossCity.setTrackId(track); |
| | | |
| | | //调用移动的小号接口 |
| | | Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderCrossCity.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | if(String.valueOf(map.get("code")).equals("200")){ |
| | | orderCrossCity.setTelX(map.get("telX")); |
| | | orderCrossCity.setBindId(map.get("bindId")); |
| | | } |
| | | // Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderCrossCity.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | // if(String.valueOf(map.get("code")).equals("200")){ |
| | | // orderCrossCity.setTelX(map.get("telX")); |
| | | // orderCrossCity.setBindId(map.get("bindId")); |
| | | // } |
| | | if(orderCrossCityWarpper.getTravelMode() == 2){//包车 |
| | | // orderCrossCity.setSeatNumber(lineShiftDriver.getLaveSeatNumber()); |
| | | // orderCrossCity.setPeopleNumber(lineShiftDriver.getLaveSeat()); |
| | |
| | | |
| | | |
| | | UserInfo userInfo = userInfoMapper.selectById(orderCrossCity.getUserId()); |
| | | SysIntegral query1 = sysIntegralMapper.query(orderCrossCity.getCompanyId()); |
| | | OpenCity openCity = openCityService.openCity1(orderCrossCity.getStartLon().toString(), orderCrossCity.getStartLat().toString()); |
| | | SysIntegral query1 = sysIntegralMapper.query(openCity.getId()); |
| | | userInfo.setIntegral(userInfo.getIntegral() + (query.getAmount().intValue() * query1.getIntegral()));//积分 |
| | | userInfoMapper.updateById(userInfo); |
| | | System.out.println("==============userInfo修改完毕==================="+userInfo); |
| | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.dao.UserInfoMapper; |
| | | import com.stylefeng.guns.modular.system.dao.UserMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class NewlyAddedController { |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | @Autowired |
| | | private IDriverService driverService; |
| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/newlyAdded/getShowModular") |
| | | @ApiOperation(value = "获取显示模块设置", tags = {"司机端-2.0新增"}, notes = "") |
| | | @ApiOperation(value = "获取显示模块设置(黔云通)", tags = {"司机端-2.0新增"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "当前经度", name = "lon", required = true, dataType = "String"), |
| | | @ApiImplicitParam(value = "当前纬度", name = "lon", required = true, dataType = "String"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<List<TbShowModular>> getShowModular(HttpServletRequest request){ |
| | | public ResultUtil<List<TbShowModular>> getShowModular(String lon, String lat, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = driverService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return ResultUtil.success(showModularService.selectList(null)); |
| | | OpenCity openCity = openCityService.openCity1(lon, lat); |
| | | return ResultUtil.success(showModularService.selectList(new EntityWrapper<TbShowModular>().eq("openCityId",openCity.getId()))); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | 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); |
| | | |
| | |
| | | } |
| | | |
| | | //调用高德创建轨迹 |
| | | 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()); |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public synchronized ResultUtil grabOrder(Integer orderId, Integer uid) throws Exception { |
| | | public ResultUtil grabOrder(Integer orderId, Integer uid) throws Exception { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(orderId); |
| | | if(null == orderPrivateCar){ |
| | | return ResultUtil.error("订单已被抢了"); |
| | |
| | | orderPrivateCar.setSnatchOrderTime(new Date()); |
| | | |
| | | //调用高德创建轨迹 |
| | | String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | String track = gdFalconUtil.createTrack(s); |
| | | orderPrivateCar.setTrackId(track); |
| | | // String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | // String track = gdFalconUtil.createTrack(s); |
| | | // orderPrivateCar.setTrackId(track); |
| | | |
| | | //调用移动的小号接口 |
| | | Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderPrivateCar.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | if(String.valueOf(map.get("code")).equals("200")){ |
| | | orderPrivateCar.setTelX(map.get("telX")); |
| | | orderPrivateCar.setBindId(map.get("bindId")); |
| | | } |
| | | // Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderPrivateCar.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | // if(String.valueOf(map.get("code")).equals("200")){ |
| | | // orderPrivateCar.setTelX(map.get("telX")); |
| | | // orderPrivateCar.setBindId(map.get("bindId")); |
| | | // } |
| | | |
| | | this.updateById(orderPrivateCar); |
| | | |
| | |
| | | |
| | | systemNoticeService.addSystemNotice(2, "您已成功抢得快车订单,请及时联系客户!", orderPrivateCar.getDriverId(), 1); |
| | | systemNoticeService.addSystemNotice(1, "您的订单已指派给" + driver.getName().substring(0, 1) + "师傅,请保持电话畅通!", orderPrivateCar.getUserId(), 1); |
| | | |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){ |
| | | |
| | | if(pushMinistryOfTransport){ |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | //上传数据 |
| | | pushMinistryOfTransportUtil.orderCreate(orderId); |
| | | pushMinistryOfTransportUtil.orderMatch(orderId); |
| | | } |
| | | } |
| | | }).start(); |
| | | }).start(); |
| | | } |
| | | |
| | | |
| | | return ResultUtil.success(orderPrivateCar.getId()); |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.stylefeng.guns.modular.system.model.OpenCity; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface OpenCityMapper extends BaseMapper<OpenCity> { |
| | | |
| | | |
| | | /** |
| | | * 获取开通城市列表(有效的) |
| | | * @return |
| | | */ |
| | | List<OpenCity> queryOpenCity(); |
| | | |
| | | |
| | | /** |
| | | * 获取开通城市 |
| | | * @param code |
| | | * @return |
| | | */ |
| | | List<OpenCity> queryByCode(@Param("code") String code); |
| | | } |
| | |
| | | * @param code |
| | | * @return |
| | | */ |
| | | List<Phone> queryPhones(@Param("province") String province, @Param("city") String city, @Param("code") String code); |
| | | List<Phone> queryPhones(@Param("openCityId") Integer openCityId); |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 获取电话 |
| | | * @param companyId |
| | | * @param openCityId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | Phone queryInfo(@Param("companyId") Integer companyId, @Param("type") Integer type); |
| | | Phone queryInfo(@Param("openCityId") Integer openCityId, @Param("type") Integer type, @Param("platform") Integer platform); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<PushOrder> querys(@Param("type") Integer type, @Param("pushType") Integer pushType, |
| | | @Param("companyId") Integer companyId); |
| | | @Param("openCityId") Integer openCityId); |
| | | } |
| | |
| | | |
| | | public interface SysIntegralMapper extends BaseMapper<SysIntegral> { |
| | | |
| | | SysIntegral query(@Param("companyId") Integer companyId); |
| | | SysIntegral query(@Param("openCityId") Integer openCityId); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 获取改派金额 |
| | | * @param companyId |
| | | * @param openCityId |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | Double queryMoney(@Param("companyId") Integer companyId) throws Exception; |
| | | Double queryMoney(@Param("openCityId") Integer openCityId) throws Exception; |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.OpenCityMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.OpenCity"> |
| | | <id column="id" property="id"/> |
| | | <result column="code" property="code"/> |
| | | <result column="lon" property="lon"/> |
| | | <result column="lat" property="lat"/> |
| | | <result column="isQualifications" property="isQualifications"/> |
| | | <result column="areaName" property="areaName"/> |
| | | <result column="cityName" property="cityName"/> |
| | | <result column="provinceName" property="provinceName"/> |
| | | |
| | | <result column="flag" property="flag"/> |
| | | <result column="insertTime" property="insertTime"/> |
| | | <result column="insertUser" property="insertUser"/> |
| | | <result column="updateTime" property="updateTime"/> |
| | | <result column="updateUser" property="updateUser"/> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | <select id="queryOpenCity" resultType="OpenCity"> |
| | | select |
| | | id as id, |
| | | code as code, |
| | | lon as lon, |
| | | lat as lat, |
| | | isQualifications as isQualifications, |
| | | areaName as areaName, |
| | | cityName as cityName, |
| | | provinceName as provinceName, |
| | | flag as flag, |
| | | insertTime as insertTime, |
| | | insertUser as insertUser, |
| | | updateTime as updateTime, |
| | | updateUser as updateUser |
| | | from t_open_city where flag = 1 |
| | | </select> |
| | | |
| | | |
| | | <select id="queryByCode" resultType="OpenCity"> |
| | | select |
| | | id as id, |
| | | code as code, |
| | | lon as lon, |
| | | lat as lat, |
| | | isQualifications as isQualifications, |
| | | areaName as areaName, |
| | | cityName as cityName, |
| | | provinceName as provinceName, |
| | | flag as flag, |
| | | insertTime as insertTime, |
| | | insertUser as insertUser, |
| | | updateTime as updateTime, |
| | | updateUser as updateUser |
| | | from t_open_city where flag = 1 and code = #{code} |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="platform" property="platform"/> |
| | | <result column="phone" property="phone" /> |
| | | <result column="companyId" property="companyId"/> |
| | | <result column="openCityId" property="openCityId"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | type as type, |
| | | platform as platform, |
| | | phone as phone, |
| | | companyId as companyId |
| | | from t_phone where companyId in ( |
| | | select companyId from t_company_city where state = 1 |
| | | <if test="null != province"> |
| | | and provinceCode = #{province} |
| | | </if> |
| | | <if test="null != city"> |
| | | and cityCode = #{city} |
| | | </if> |
| | | <if test="null != code"> |
| | | and areaCode = #{code} |
| | | </if> |
| | | ) |
| | | companyId as companyId, |
| | | openCityId as openCityId |
| | | from t_phone where openCityId = #{openCityId} |
| | | </select> |
| | | |
| | | |
| | |
| | | <if test="null != type"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | | <if test="null != platform"> |
| | | and platform = #{platform} |
| | | </if> |
| | | <if test="null != openCityId"> |
| | | and openCityId = #{openCityId} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.PushOrder"> |
| | | <id column="id" property="id"/> |
| | | <result column="companyId" property="companyId"/> |
| | | <result column="openCityId" property="openCityId"/> |
| | | <result column="pushDistance" property="pushDistance"/> |
| | | <result column="pushTime" property="pushTime"/> |
| | | <result column="driverProportion" property="driverProportion"/> |
| | |
| | | select |
| | | id as id, |
| | | companyId as companyId, |
| | | openCityId as openCityId, |
| | | pushDistance as pushDistance, |
| | | pushTime as pushTime, |
| | | driverProportion as driverProportion, |
| | | `type` as `type`, |
| | | pushType as pushType |
| | | from t_sys_push_order where companyId = #{companyId} |
| | | from t_sys_push_order where openCityId = #{openCityId} |
| | | <if test="null != type"> |
| | | and `type` = #{type} |
| | | </if> |
| | |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.SysIntegral"> |
| | | <id column="id" property="id" /> |
| | | <result column="companyId" property="companyId" /> |
| | | <result column="openCityId" property="openCityId" /> |
| | | <result column="integral" property="integral" /> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | <select id="query" resultType="SysIntegral"> |
| | | select * from t_sys_integral where companyId = #{companyId} |
| | | select * from t_sys_integral where openCityId = #{openCityId} |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="money" property="money"/> |
| | | <result column="isSpecialCar" property="isSpecialCar"/> |
| | | <result column="isTaxiCar" property="isTaxiCar"/> |
| | | <result column="openCityId" property="openCityId"/> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | <select id="queryMoney" resultType="double"> |
| | | select money from t_sys_reformist where companyId = #{companyId} |
| | | select money from t_sys_reformist where openCityId = #{openCityId} |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | /** |
| | | * 开通城市 |
| | | */ |
| | | @TableName("t_open_city") |
| | | public class OpenCity extends BaseBean { |
| | | /** |
| | | * 城市编号(行政编号) |
| | | */ |
| | | @TableField("code") |
| | | private String code; |
| | | /** |
| | | * 经度 |
| | | */ |
| | | @TableField("lon") |
| | | private Double lon; |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | @TableField("lat") |
| | | private Double lat; |
| | | /** |
| | | * 是否需要网约车资格(1:是,2:否) |
| | | */ |
| | | @TableField("isQualifications") |
| | | private Integer isQualifications; |
| | | /** |
| | | * 省名称 |
| | | */ |
| | | @TableField("areaName") |
| | | private String areaName; |
| | | /** |
| | | * 市名称 |
| | | */ |
| | | @TableField("cityName") |
| | | private String cityName; |
| | | /** |
| | | * 区县名称 |
| | | */ |
| | | @TableField("provinceName") |
| | | private String provinceName; |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public Integer getIsQualifications() { |
| | | return isQualifications; |
| | | } |
| | | |
| | | public void setIsQualifications(Integer isQualifications) { |
| | | this.isQualifications = isQualifications; |
| | | } |
| | | |
| | | public String getAreaName() { |
| | | return areaName; |
| | | } |
| | | |
| | | public void setAreaName(String areaName) { |
| | | this.areaName = areaName; |
| | | } |
| | | |
| | | public String getCityName() { |
| | | return cityName; |
| | | } |
| | | |
| | | public void setCityName(String cityName) { |
| | | this.cityName = cityName; |
| | | } |
| | | |
| | | public String getProvinceName() { |
| | | return provinceName; |
| | | } |
| | | |
| | | public void setProvinceName(String provinceName) { |
| | | this.provinceName = provinceName; |
| | | } |
| | | |
| | | public Double getLon() { |
| | | return lon; |
| | | } |
| | | |
| | | public void setLon(Double lon) { |
| | | this.lon = lon; |
| | | } |
| | | |
| | | public Double getLat() { |
| | | return lat; |
| | | } |
| | | |
| | | public void setLat(Double lat) { |
| | | this.lat = lat; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "OpenCity{" + |
| | | "code='" + code + '\'' + |
| | | ", lon=" + lon + |
| | | ", lat=" + lat + |
| | | ", isQualifications=" + isQualifications + |
| | | ", areaName='" + areaName + '\'' + |
| | | ", cityName='" + cityName + '\'' + |
| | | ", provinceName='" + provinceName + '\'' + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | */ |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | |
| | | public Integer getOpenCityId() { |
| | | return openCityId; |
| | | } |
| | | |
| | | public void setOpenCityId(Integer openCityId) { |
| | | this.openCityId = openCityId; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "Phone{" + |
| | |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | /** |
| | | * 推单距离(公里) |
| | | */ |
| | | @TableField("pushDistance") |
| | |
| | | */ |
| | | @TableName("t_sys_integral") |
| | | public class SysIntegral { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | private Integer id; |
| | | /** |
| | | * 企业id |
| | | */ |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | /** |
| | | * 积分 |
| | | */ |
| | | @TableField("integral") |
| | | private Integer integral; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Integer getIntegral() { |
| | | return integral; |
| | | } |
| | | |
| | | public void setIntegral(Integer integral) { |
| | | this.integral = integral; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "SysIntegral{" + |
| | | "id=" + id + |
| | | ", companyId=" + companyId + |
| | | ", integral=" + integral + |
| | | '}'; |
| | | } |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | private Integer id; |
| | | /** |
| | | * 企业id |
| | | */ |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | /** |
| | | * 积分 |
| | | */ |
| | | @TableField("integral") |
| | | private Integer integral; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Integer getOpenCityId() { |
| | | return openCityId; |
| | | } |
| | | |
| | | public void setOpenCityId(Integer openCityId) { |
| | | this.openCityId = openCityId; |
| | | } |
| | | |
| | | public Integer getIntegral() { |
| | | return integral; |
| | | } |
| | | |
| | | public void setIntegral(Integer integral) { |
| | | this.integral = integral; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "SysIntegral{" + |
| | | "id=" + id + |
| | | ", companyId=" + companyId + |
| | | ", integral=" + integral + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | /** |
| | | * 金额 |
| | | */ |
| | | @TableField("money") |
| | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | |
| | | public Integer getOpenCityId() { |
| | | return openCityId; |
| | | } |
| | | |
| | | public void setOpenCityId(Integer openCityId) { |
| | | this.openCityId = openCityId; |
| | | } |
| | | |
| | | public Double getMoney() { |
| | | return money; |
| | | } |
| | |
| | | */ |
| | | @TableField("deductMoney") |
| | | private Double deductMoney; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | |
| | | public void setDeductMoney(Double deductMoney) { |
| | | this.deductMoney = deductMoney; |
| | | } |
| | | |
| | | |
| | | public Integer getOpenCityId() { |
| | | return openCityId; |
| | | } |
| | | |
| | | public void setOpenCityId(Integer openCityId) { |
| | | this.openCityId = openCityId; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | |
| | | */ |
| | | @ApiModelProperty("用户是否显示(1=是,2=否)") |
| | | private Integer userShow; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | |
| | | |
| | | public Integer getId() { |
| | |
| | | public void setUserShow(Integer userShow) { |
| | | this.userShow = userShow; |
| | | } |
| | | |
| | | |
| | | public Integer getOpenCityId() { |
| | | return openCityId; |
| | | } |
| | | |
| | | public void setOpenCityId(Integer openCityId) { |
| | | this.openCityId = openCityId; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | Map<String, Object> queryPhone(Integer uid) throws Exception; |
| | | Map<String, Object> queryPhone(Integer uid, String code) throws Exception; |
| | | |
| | | |
| | | /** |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.stylefeng.guns.modular.system.model.OpenCity; |
| | | import com.stylefeng.guns.modular.system.warpper.BaseWarpper; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface IOpenCityService extends IService<OpenCity> { |
| | | |
| | | |
| | | /** |
| | | * 获取开通城市列表 |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | List<BaseWarpper> queryOpenCity() throws Exception; |
| | | |
| | | |
| | | /** |
| | | * 判断是否是开通城市 |
| | | * @param code |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | boolean openCity(String code) throws Exception; |
| | | |
| | | |
| | | OpenCity openCity1(String code) throws Exception; |
| | | |
| | | |
| | | OpenCity openCity1(String lon, String lat) throws Exception; |
| | | } |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | List<PushOrder> querys(Integer type, Integer pushType, Integer companyId) throws Exception; |
| | | List<PushOrder> querys(Integer type, Integer pushType, Integer openCityId) throws Exception; |
| | | } |
| | |
| | | |
| | | @Autowired |
| | | private ICompanyCityService companyCityService; |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | @Autowired |
| | | private GDFalconUtil gdFalconUtil; |
| | |
| | | private CarServiceMapper carServiceMapper; |
| | | |
| | | @Autowired |
| | | private PushUtil pushUtil; |
| | | |
| | | @Autowired |
| | | private IOrderLogisticsService orderLogisticsService; |
| | | |
| | | @Value("${pushMinistryOfTransport}") |
| | |
| | | |
| | | private String salt = "SA;d5#"; |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private OrderPrivateCarMapper orderPrivateCarMapper; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private OrderCrossCityMapper orderCrossCityMapper; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private OrderTaxiMapper orderTaxiMapper; |
| | | |
| | | @Autowired |
| | |
| | | */ |
| | | @Override |
| | | public Map<String, Object> queryPhone(String code) throws Exception { |
| | | Company query = companyCityService.query(code); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(null == query){ |
| | | map.put("phone", ""); |
| | | }else{ |
| | | Phone phone = phoneMapper.queryInfo(query.getId(), 2); |
| | | map.put("phone", null != phone ? phone.getPhone() : ""); |
| | | } |
| | | OpenCity openCity = openCityService.openCity1(code); |
| | | Phone phone = phoneMapper.queryInfo(openCity.getId(), 2, 2); |
| | | map.put("phone", null != phone ? phone.getPhone() : ""); |
| | | return map; |
| | | } |
| | | |
| | |
| | | loginWarpper.setRongYunToken(token1.getToken()); |
| | | |
| | | //创建高德猎鹰的终端数据 |
| | | String tid = gdFalconUtil.createTerminal(phone); |
| | | loginWarpper.setServerId(gdFalconUtil.getServerId()); |
| | | loginWarpper.setTerminalId(tid); |
| | | // String tid = gdFalconUtil.createTerminal(phone); |
| | | // loginWarpper.setServerId(gdFalconUtil.getServerId()); |
| | | // loginWarpper.setTerminalId(tid); |
| | | return ResultUtil.success(loginWarpper); |
| | | } |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public Map<String, Object> queryPhone(Integer uid) throws Exception { |
| | | public Map<String, Object> queryPhone(Integer uid, String code) throws Exception { |
| | | Driver driver = this.selectById(uid); |
| | | Company company = companyMapper.selectById(driver.getFranchiseeId() != null && driver.getFranchiseeId() != 0 ? driver.getFranchiseeId() : ( |
| | | driver.getCompanyId() != null && driver.getCompanyId() != 0 ? driver.getCompanyId() : 1)); |
| | | OpenCity openCity = openCityService.openCity1(code); |
| | | Company company = companyMapper.selectById(driver.getCompanyId()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(company.getType() == 3){//加盟商 |
| | | Phone phone = phoneMapper.queryInfo(company.getId(), 2); |
| | | map.put("branch", ""); |
| | | Phone phone = phoneMapper.queryInfo(openCity.getId(), 2, 2); |
| | | map.put("franchisee", null != phone ? phone.getPhone() : ""); |
| | | company = companyMapper.selectById(company.getSuperiorId()); |
| | | if(null != company){ |
| | | phone = phoneMapper.queryInfo(company.getId(), 2); |
| | | map.put("branch", null != phone ? phone.getPhone() : ""); |
| | | }else{ |
| | | map.put("branch", ""); |
| | | } |
| | | company = companyMapper.selectById(company.getSuperiorId()); |
| | | if(null != company){ |
| | | phone = phoneMapper.queryInfo(company.getId(), 2); |
| | | map.put("platform", null != phone ? phone.getPhone() : ""); |
| | | }else{ |
| | | map.put("platform", ""); |
| | | } |
| | | phone = phoneMapper.queryInfo(openCity.getId(), 2, 1); |
| | | map.put("platform",null != phone ? phone.getPhone() : ""); |
| | | return map; |
| | | } |
| | | if(company.getType() == 2){//分公司 |
| | | map.put("franchisee", ""); |
| | | Phone phone = phoneMapper.queryInfo(company.getId(), 2); |
| | | Phone phone = phoneMapper.queryInfo(openCity.getId(), 2, 2); |
| | | map.put("branch", null != phone ? phone.getPhone() : ""); |
| | | company = companyMapper.selectById(company.getSuperiorId()); |
| | | if(null != company){ |
| | | phone = phoneMapper.queryInfo(company.getId(), 2); |
| | | map.put("platform",null != phone ? phone.getPhone() : ""); |
| | | }else{ |
| | | map.put("platform", ""); |
| | | } |
| | | phone = phoneMapper.queryInfo(openCity.getId(), 2, 1); |
| | | map.put("platform",null != phone ? phone.getPhone() : ""); |
| | | return map; |
| | | } |
| | | if(company.getType() == 1){//平台 |
| | | map.put("franchisee", ""); |
| | | map.put("branch", ""); |
| | | Phone phone = phoneMapper.queryInfo(company.getId(), 2); |
| | | Phone phone = phoneMapper.queryInfo(company.getId(), 2, 1); |
| | | map.put("platform", null != phone ? phone.getPhone() : ""); |
| | | return map; |
| | | } |
| | |
| | | loginWarpper.setAppid(UUIDUtil.getRandomCode()); |
| | | |
| | | //创建高德猎鹰的终端数据 |
| | | String tid = gdFalconUtil.createTerminal(driver.getPhone()); |
| | | loginWarpper.setServerId(gdFalconUtil.getServerId()); |
| | | loginWarpper.setTerminalId(tid); |
| | | // String tid = gdFalconUtil.createTerminal(driver.getPhone()); |
| | | // loginWarpper.setServerId(gdFalconUtil.getServerId()); |
| | | // loginWarpper.setTerminalId(tid); |
| | | return ResultUtil.success(loginWarpper); |
| | | } |
| | | |
| | |
| | | loginWarpper.setAppid(UUIDUtil.getRandomCode()); |
| | | |
| | | //创建高德猎鹰的终端数据 |
| | | String tid = gdFalconUtil.createTerminal(driver.getPhone()); |
| | | loginWarpper.setServerId(gdFalconUtil.getServerId()); |
| | | loginWarpper.setTerminalId(tid); |
| | | // String tid = gdFalconUtil.createTerminal(driver.getPhone()); |
| | | // loginWarpper.setServerId(gdFalconUtil.getServerId()); |
| | | // loginWarpper.setTerminalId(tid); |
| | | return ResultUtil.success(loginWarpper); |
| | | } |
| | | |
| | |
| | | loginWarpper.setAppid(UUIDUtil.getRandomCode()); |
| | | |
| | | //创建高德猎鹰的终端数据 |
| | | String tid = gdFalconUtil.createTerminal(driver.getPhone()); |
| | | loginWarpper.setServerId(gdFalconUtil.getServerId()); |
| | | loginWarpper.setTerminalId(tid); |
| | | // String tid = gdFalconUtil.createTerminal(driver.getPhone()); |
| | | // loginWarpper.setServerId(gdFalconUtil.getServerId()); |
| | | // loginWarpper.setTerminalId(tid); |
| | | return ResultUtil.success(loginWarpper); |
| | | } |
| | | |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.OpenCityMapper; |
| | | import com.stylefeng.guns.modular.system.model.OpenCity; |
| | | import com.stylefeng.guns.modular.system.service.IOpenCityService; |
| | | import com.stylefeng.guns.modular.system.util.GDMapGeocodingUtil; |
| | | import com.stylefeng.guns.modular.system.warpper.BaseWarpper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | @Service |
| | | public class OpenCityServiceImpl extends ServiceImpl<OpenCityMapper, OpenCity> implements IOpenCityService { |
| | | |
| | | @Resource |
| | | private OpenCityMapper openCityMapper; |
| | | |
| | | @Autowired |
| | | private GDMapGeocodingUtil gdMapGeocodingUtil; |
| | | |
| | | |
| | | /** |
| | | * 获取开通城市列表 |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public List<BaseWarpper> queryOpenCity() throws Exception { |
| | | List<OpenCity> openCities = openCityMapper.queryOpenCity(); |
| | | List<BaseWarpper> list = new ArrayList<>(); |
| | | for(OpenCity c : openCities){ |
| | | BaseWarpper baseWarpper = new BaseWarpper(); |
| | | baseWarpper.setId(c.getId()); |
| | | baseWarpper.setName(ToolUtil.isEmpty(c.getProvinceName()) ? |
| | | (ToolUtil.isEmpty(c.getCityName()) ? (ToolUtil.isEmpty(c.getAreaName()) ? "" : c.getAreaName()) : c.getCityName()) : c.getProvinceName()); |
| | | baseWarpper.setLon(null != c.getLon() ? c.getLon() : 0); |
| | | baseWarpper.setLat(null != c.getLat() ? c.getLat() : 0); |
| | | baseWarpper.setContent(c.getCode()); |
| | | baseWarpper.setName(baseWarpper.getName().replaceAll("市辖区", "")); |
| | | list.add(baseWarpper); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 判断是否是开通城市 |
| | | * @param code |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public boolean openCity(String code) throws Exception { |
| | | String province = code.substring(0, 2) + "0000"; |
| | | String city = code.substring(0, 4) + "00"; |
| | | List<OpenCity> openCities = openCityMapper.queryByCode(code); |
| | | if(openCities.size() == 0){ |
| | | openCities = openCityMapper.queryByCode(city); |
| | | } |
| | | if(openCities.size() == 0){ |
| | | openCities = openCityMapper.queryByCode(province); |
| | | } |
| | | if(openCities.size() == 0){ |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public OpenCity openCity1(String code) throws Exception { |
| | | String province = code.substring(0, 2) + "0000"; |
| | | String city = code.substring(0, 4) + "00"; |
| | | List<OpenCity> openCities = openCityMapper.queryByCode(code); |
| | | if(openCities.size() == 0){ |
| | | openCities = openCityMapper.queryByCode(city); |
| | | } |
| | | if(openCities.size() == 0){ |
| | | openCities = openCityMapper.queryByCode(province); |
| | | } |
| | | if(openCities.size() == 0){ |
| | | return null; |
| | | } |
| | | return openCities.get(0); |
| | | } |
| | | |
| | | @Override |
| | | public OpenCity openCity1(String lon, String lat) throws Exception { |
| | | Map<String, String> geocode = gdMapGeocodingUtil.geocode(lon, lat); |
| | | String districtCode = geocode.get("districtCode"); |
| | | return openCity1(districtCode); |
| | | } |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.system.model.OrderPosition; |
| | | import com.stylefeng.guns.modular.system.service.IAdditionalFeeService; |
| | | import com.stylefeng.guns.modular.system.service.IDriverService; |
| | | import com.stylefeng.guns.modular.system.service.IOpenCityService; |
| | | import com.stylefeng.guns.modular.system.service.IOrderService; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import com.stylefeng.guns.modular.system.warpper.BaseWarpper; |
| | | import com.stylefeng.guns.modular.system.warpper.OrderListWarpper; |
| | | import com.stylefeng.guns.modular.taxi.model.OrderTaxi; |
| | | import com.stylefeng.guns.modular.taxi.service.IOrderTaxiService; |
| | | import org.redisson.api.RLock; |
| | | import org.redisson.api.RedissonClient; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | |
| | | |
| | | @Autowired |
| | | private IAdditionalFeeService additionalFeeService; |
| | | |
| | | @Autowired |
| | | private RedissonClient redissonClient; |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public synchronized ResultUtil grabOrder(Integer orderId, Integer orderType, Integer uid) throws Exception { |
| | | public ResultUtil grabOrder(Integer orderId, Integer orderType, Integer uid) throws Exception { |
| | | //专车和出租是批量下单,所以这里需要将两种类型的抢单操作通过一个锁来一起控制 |
| | | if(1 == orderType || 2 == orderType){ |
| | | RLock lock = redissonClient.getLock("grabOrder:" + orderId); |
| | | if(!lock.tryLock()){ |
| | | return ResultUtil.error("抢单失败,请稍后重试"); |
| | | } |
| | | try { |
| | | if(1 == orderType){ |
| | | return orderPrivateCarService.grabOrder(orderId, uid); |
| | | } |
| | | if(2 == orderType){ |
| | | return orderTaxiService.grabOrder(orderId, uid); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | }finally { |
| | | lock.unlock(); |
| | | } |
| | | } |
| | | switch (orderType){ |
| | | case 1://专车 |
| | | return orderPrivateCarService.grabOrder(orderId, uid); |
| | | case 2://出租 |
| | | return orderTaxiService.grabOrder(orderId, uid); |
| | | case 3://城际 |
| | | return ResultUtil.success();//不作任何操作,跨城默认选择的司机 |
| | | case 4://同城小件 |
| | |
| | | */ |
| | | @Override |
| | | public Double queryReassignMoney(Integer orderId, Integer orderType) throws Exception { |
| | | Integer companyId = null; |
| | | Integer openCityId = null; |
| | | switch (orderType){ |
| | | case 1://专车 |
| | | companyId = orderPrivateCarService.selectById(orderId).getCompanyId(); |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId); |
| | | openCityId = openCityService.openCity1(orderPrivateCar.getStartLon().toString(), orderPrivateCar.getStartLat().toString()).getId(); |
| | | break; |
| | | case 2://出租 |
| | | companyId = orderTaxiService.selectById(orderId).getCompanyId(); |
| | | OrderTaxi orderTaxi = orderTaxiService.selectById(orderId); |
| | | openCityId = openCityService.openCity1(orderTaxi.getStartLon().toString(), orderTaxi.getStartLat().toString()).getId(); |
| | | break; |
| | | case 3://城际 |
| | | companyId = orderCrossCityService.selectById(orderId).getCompanyId(); |
| | | OrderCrossCity orderCrossCity = orderCrossCityService.selectById(orderId); |
| | | openCityId = openCityService.openCity1(orderCrossCity.getStartLon().toString(), orderCrossCity.getStartLat().toString()).getId(); |
| | | break; |
| | | case 4://同城小件 |
| | | companyId = orderLogisticsService.selectById(orderId).getCompanyId(); |
| | | OrderLogistics orderLogistics = orderLogisticsService.selectById(orderId); |
| | | openCityId = openCityService.openCity1(orderLogistics.getStartLon().toString(), orderLogistics.getStartLat().toString()).getId(); |
| | | break; |
| | | case 5://跨城小件 |
| | | companyId = orderLogisticsService.selectById(orderId).getCompanyId(); |
| | | OrderLogistics orderLogistics1 = orderLogisticsService.selectById(orderId); |
| | | openCityId = openCityService.openCity1(orderLogistics1.getStartLon().toString(), orderLogistics1.getStartLat().toString()).getId(); |
| | | |
| | | break; |
| | | case 6: |
| | | break; |
| | | } |
| | | return sysReformistMapper.queryMoney(companyId); |
| | | return sysReformistMapper.queryMoney(openCityId); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | //调用移动的小号接口 |
| | | Driver driver = driverService.selectById(orderPrivateCar.getDriverId()); |
| | | Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderPrivateCar.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | if(String.valueOf(map.get("code")).equals("200")){ |
| | | orderPrivateCar.setTelX(map.get("telX")); |
| | | orderPrivateCar.setBindId(map.get("bindId")); |
| | | } |
| | | // Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderPrivateCar.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | // if(String.valueOf(map.get("code")).equals("200")){ |
| | | // orderPrivateCar.setTelX(map.get("telX")); |
| | | // orderPrivateCar.setBindId(map.get("bindId")); |
| | | // } |
| | | orderPrivateCarService.updateById(orderPrivateCar); |
| | | } |
| | | break; |
| | |
| | | } |
| | | //调用移动的小号接口 |
| | | Driver driver = driverService.selectById(orderTaxi.getDriverId()); |
| | | Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderTaxi.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | if(String.valueOf(map.get("code")).equals("200")){ |
| | | orderTaxi.setTelX(map.get("telX")); |
| | | orderTaxi.setBindId(map.get("bindId")); |
| | | } |
| | | // Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderTaxi.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | // if(String.valueOf(map.get("code")).equals("200")){ |
| | | // orderTaxi.setTelX(map.get("telX")); |
| | | // orderTaxi.setBindId(map.get("bindId")); |
| | | // } |
| | | orderTaxiService.updateById(orderTaxi); |
| | | } |
| | | break; |
| | |
| | | } |
| | | //调用移动的小号接口 |
| | | Driver driver = driverService.selectById(orderCrossCity.getDriverId()); |
| | | Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderCrossCity.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | if(String.valueOf(map.get("code")).equals("200")){ |
| | | orderCrossCity.setTelX(map.get("telX")); |
| | | orderCrossCity.setBindId(map.get("bindId")); |
| | | } |
| | | // Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderCrossCity.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | // if(String.valueOf(map.get("code")).equals("200")){ |
| | | // orderCrossCity.setTelX(map.get("telX")); |
| | | // orderCrossCity.setBindId(map.get("bindId")); |
| | | // } |
| | | orderCrossCityService.updateById(orderCrossCity); |
| | | } |
| | | break; |
| | |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.dao.PhoneMapper; |
| | | import com.stylefeng.guns.modular.system.model.OpenCity; |
| | | import com.stylefeng.guns.modular.system.model.Phone; |
| | | import com.stylefeng.guns.modular.system.service.IOpenCityService; |
| | | import com.stylefeng.guns.modular.system.service.IPhoneService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Resource |
| | | private PhoneMapper phoneMapper; |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | /** |
| | | * 获取所有系统电话 |
| | |
| | | */ |
| | | @Override |
| | | public List<Phone> queryPhones(String code) throws Exception { |
| | | String province = code.substring(0, 2) + "0000"; |
| | | String city = code.substring(0, 4) + "00"; |
| | | |
| | | List<Phone> list = phoneMapper.queryPhones(province, city, code); |
| | | if(list.size() == 0){ |
| | | list = phoneMapper.queryPhones(province, city, null); |
| | | } |
| | | if(list.size() == 0){ |
| | | list = phoneMapper.queryPhones(province, null, null); |
| | | } |
| | | OpenCity openCity = openCityService.openCity1(code); |
| | | List<Phone> list = phoneMapper.queryPhones(openCity.getId()); |
| | | return list; |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public Map<String, Object> queryCustomerPhone(String code) throws Exception { |
| | | String province = code.substring(0, 2) + "0000"; |
| | | String city = code.substring(0, 4) + "00"; |
| | | |
| | | OpenCity openCity = openCityService.openCity1(code); |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //平台电话 |
| | | Phone query = phoneMapper.query(2, 1, null, null, null); |
| | | Phone query = phoneMapper.queryInfo(openCity.getId(), 2, 1); |
| | | map.put("platform", null != query ? query.getPhone() : ""); |
| | | |
| | | //公司 |
| | | query = phoneMapper.query(2, null, province, city, code); |
| | | if(query == null){ |
| | | query = phoneMapper.query(2, null, province, city, null); |
| | | } |
| | | if(query == null){ |
| | | query = phoneMapper.query(2, null, province, null, null); |
| | | } |
| | | query = phoneMapper.queryInfo(openCity.getId(), 2, 2); |
| | | map.put("company", null != query ? query.getPhone() : ""); |
| | | |
| | | //调度电话 |
| | | query = phoneMapper.query(3, null, province, city, code); |
| | | if(query == null){ |
| | | query = phoneMapper.query(3, null, province, city, null); |
| | | } |
| | | if(query == null){ |
| | | query = phoneMapper.query(3, null, province, null, null); |
| | | } |
| | | query = phoneMapper.queryInfo(openCity.getId(), 3, null); |
| | | map.put("scheduling", null != query ? query.getPhone() : ""); |
| | | return map; |
| | | } |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public List<PushOrder> querys(Integer type, Integer pushType, Integer companyId) throws Exception { |
| | | return pushOrderMapper.querys(type, pushType, companyId); |
| | | public List<PushOrder> querys(Integer type, Integer pushType, Integer openCityId) throws Exception { |
| | | return pushOrderMapper.querys(type, pushType, openCityId); |
| | | } |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import com.stylefeng.guns.modular.taxi.model.OrderTaxi; |
| | | import com.stylefeng.guns.modular.taxi.service.IOrderTaxiService; |
| | | import com.stylefeng.guns.modular.taxi.service.impl.OrderTaxiServiceImpl; |
| | | import org.apache.commons.lang.time.DateFormatUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | |
| | | @Autowired |
| | | private IPushOrderService pushOrderService; |
| | | |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | @Autowired |
| | | private PushUtil pushUtil; |
| | |
| | | if (ToolUtil.isNotEmpty(vehicle)) { |
| | | integers = JSON.parseArray(vehicle).toJavaList(Integer.class); |
| | | } |
| | | Company query = companyCityService.query(String.valueOf(orderTaxi.getStartLon()), String.valueOf(orderTaxi.getStartLat()));//获取起点所属分公司 |
| | | List<PushOrder> querys = pushOrderService.querys(null, 2, query.getId());//获取需要推送的次数 |
| | | OpenCity openCity = openCityService.openCity1(orderTaxi.getStartLon().toString(), orderTaxi.getStartLat().toString()); |
| | | List<PushOrder> querys = pushOrderService.querys(null, 2, openCity.getId());//获取需要推送的次数 |
| | | for (int i = 1; i <=6; i++) { |
| | | PushOrder pushOrder = pushOrderService.querys(i, 2, query.getId()).get(0); |
| | | int finalI = i; |
| | | PushOrder pushOrder = querys.stream().filter(s -> s.getType() == (finalI <= 3 ? finalI : 3)).findFirst().orElse(null); |
| | | System.out.println("pushOrder:" + pushOrder); |
| | | //获取空闲司机 |
| | | List<Driver> list = driverService.queryIdleDriver(2, orderTaxi.getStartLon(), orderTaxi.getStartLat(), pushOrder.getPushDistance(), null);//所有附近空闲司机 |
| | |
| | | if(ToolUtil.isNotEmpty(vehicle)){ |
| | | integers = JSON.parseArray(vehicle).toJavaList(Integer.class); |
| | | } |
| | | Company query = companyCityService.query(String.valueOf(orderPrivateCar.getStartLon()), String.valueOf(orderPrivateCar.getStartLat()));//获取起点所属分公司 |
| | | List<PushOrder> querys = pushOrderService.querys(null, 1, query.getId());//获取需要推送的次数 |
| | | OpenCity openCity = openCityService.openCity1(orderPrivateCar.getStartLon().toString(), orderPrivateCar.getStartLat().toString()); |
| | | List<PushOrder> querys = pushOrderService.querys(null, 1, openCity.getId());//获取需要推送的次数 |
| | | for(int i = 1; i <= 6; i++){ |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(id); |
| | | if (null == orderPrivateCar || orderPrivateCar.getState() > 1) { |
| | | break; |
| | | } |
| | | PushOrder pushOrder = pushOrderService.querys(i, 1, query.getId()).get(0); |
| | | int finalI = i; |
| | | PushOrder pushOrder = querys.stream().filter(s -> s.getType() == (finalI <= 3 ? finalI : 3)).findFirst().orElse(null); |
| | | System.out.println("pushOrder:"+pushOrder); |
| | | int i2 = pushOrder.getPushTime() / 10; |
| | | if(i2==0){ |
| | |
| | | */ |
| | | public class SM4Util { |
| | | private static final String ALGORITHM_NAME = "SM4"; |
| | | |
| | | |
| | | private static final String ALGORITHM_MODE = "SM4/ECB/PKCS5Padding"; |
| | | |
| | | |
| | | |
| | | |
| | | static { |
| | | Security.addProvider(new BouncyCastleProvider()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 生成 SM4 密钥 |
| | | * @return 密钥的 Base64 编码字符串 |
| | |
| | | SecretKey secretKey = kg.generateKey(); |
| | | return Base64.getEncoder().encodeToString(secretKey.getEncoded()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * SM4 加密 |
| | | * @param plainText 明文 |
| | |
| | | byte[] encryptedBytes = cipher.doFinal(plainText.getBytes(StandardCharsets.UTF_8)); |
| | | return Base64.getEncoder().encodeToString(encryptedBytes); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * SM4 解密 |
| | | * @param cipherText 密文的 Base64 编码字符串 |
| | |
| | | byte[] decryptedBytes = cipher.doFinal(cipherBytes); |
| | | return new String(decryptedBytes, StandardCharsets.UTF_8); |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | try { |
| | | // 生成密钥 |
| | | String key = generateKey(); |
| | | System.out.println("生成的密钥: " + key); |
| | | |
| | | |
| | | // 明文 |
| | | String plainText = "Hello, SM4!"; |
| | | System.out.println("明文: " + plainText); |
| | | |
| | | |
| | | // 加密 |
| | | String cipherText = encrypt(plainText, key); |
| | | System.out.println("密文: " + cipherText); |
| | | |
| | | |
| | | // 解密 |
| | | String decryptedText = decrypt(cipherText, key); |
| | | System.out.println("解密后的明文: " + decryptedText); |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public synchronized ResultUtil grabOrder(Integer orderId, Integer uid) throws Exception { |
| | | public ResultUtil grabOrder(Integer orderId, Integer uid) throws Exception { |
| | | OrderPrivateCar orderPrivateCar1 = orderPrivateCarService.selectById(orderId); |
| | | if(null != orderPrivateCar1 && orderPrivateCar1.getType() == 3 && orderPrivateCar1.getState() != 1&& orderPrivateCar1.getState() != 11){ |
| | | return ResultUtil.error("订单已被抢了"); |
| | |
| | | orderTaxi.setSnatchOrderTime(new Date()); |
| | | |
| | | //调用高德创建轨迹 |
| | | String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | String track = gdFalconUtil.createTrack(s); |
| | | orderTaxi.setTrackId(track); |
| | | |
| | | //调用移动的小号接口 |
| | | Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderTaxi.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | if(String.valueOf(map.get("code")).equals("200")){ |
| | | orderTaxi.setTelX(map.get("telX")); |
| | | orderTaxi.setBindId(map.get("bindId")); |
| | | } |
| | | // String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | // String track = gdFalconUtil.createTrack(s); |
| | | // orderTaxi.setTrackId(track); |
| | | // |
| | | // //调用移动的小号接口 |
| | | // Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderTaxi.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | // if(String.valueOf(map.get("code")).equals("200")){ |
| | | // orderTaxi.setTelX(map.get("telX")); |
| | | // orderTaxi.setBindId(map.get("bindId")); |
| | | // } |
| | | |
| | | this.updateById(orderTaxi); |
| | | |
| | |
| | | } |
| | | |
| | | //调用高德创建轨迹 |
| | | String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | String track = gdFalconUtil.createTrack(s); |
| | | orderTaxi.setTrackId(track); |
| | | // String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | // String track = gdFalconUtil.createTrack(s); |
| | | // orderTaxi.setTrackId(track); |
| | | |
| | | //调用移动的小号接口 TODO 车载端使用真实号码 |
| | | // Map<String, String> geocode = gdMapGeocodingUtil.geocode(orderTaxi.getStartLon().toString(), orderTaxi.getStartLat().toString()); |
| | |
| | | appletsAppSecret: 5610fc6126255ca5f7bd9fa4330338b6 # |
| | | mchId: 111 #微信支付分配的商户号 |
| | | key: 111 #key为商户平台设置的密钥key: |
| | | url: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={0}&secret={1} |
| | | |
| | | --- |
| | | |
| | |
| | | server: |
| | | port: 8007 |
| | | |
| | | guns: |
| | | swagger-open: true #是否开启swagger (true/false) |
| | | kaptcha-open: false #是否开启登录时验证码 (true/false) |
| | | file-upload-path: d:/tmp #文件上传目录(不配置的话为java.io.tmpdir目录) |
| | | picture-server-address: http://192.168.0.43/resources/ #图片服务器地址 |
| | | spring-session-open: false #是否开启spring session,如果是多机环境需要开启(true/false) |
| | | session-invalidate-time: 1800 #session失效时间(只在单机环境下生效,多机环境在SpringSessionConfig类中配置) 单位:秒 |
| | | session-validation-interval: 900 #多久检测一次失效的session(只在单机环境下生效) 单位:秒 |
| | | |
| | | spring: |
| | | application: |
| | | name: driver-server |
| | | profiles: |
| | | active: dev |
| | | mvc: |
| | | static-path-pattern: /static/** |
| | | view: |
| | | prefix: /WEB-INF/view |
| | | devtools: |
| | | restart: |
| | | enabled: false |
| | | additional-paths: src/main/java |
| | | exclude: static/**,WEB-INF/view/** |
| | | servlet: |
| | | multipart: |
| | | max-request-size: 100MB |
| | | max-file-size: 100MB |
| | | redis: |
| | | host: 172.21.35.151 |
| | | port: 6512 |
| | | password: SC_cache@20#25 |
| | | database: 0 |
| | | timeout: 1000 |
| | | cluster: |
| | | nodes: 172.21.35.151:6512,172.21.35.152:6512,172.21.35.153:6512,172.21.35.151:6513,172.21.35.152:6513,172.21.35.153:6513 |
| | | |
| | | mybatis-plus: |
| | | typeAliasesPackage: com.stylefeng.guns.modular |
| | | global-config: |
| | | id-type: 0 #0:数据库ID自增 1:用户输入id 2:全局唯一id(IdWorker) 3:全局唯一ID(uuid) |
| | | db-column-underline: false |
| | | configuration: |
| | | configuration.map-underscore-to-camel-case: true #是否开启自动驼峰命名规则(camel case)映射 |
| | | log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl #输出Sql,如需打印Sql注释该配置 |
| | | |
| | | |
| | | eureka: |
| | | client: |
| | | service-url: #注册中心地址 |
| | | defaultZone: http://sinata:sinata@127.0.0.1:8000/eureka #启用身份验证的方式连接 |
| | | register-with-eureka: true #在注册中心进行注册 |
| | | fetch-registry: true #从Eureka中获取注册信息。 |
| | | |
| | | --- |
| | | |
| | | spring: |
| | | datasource: |
| | | url: jdbc:mysql://172.21.35.140:8066/traffic_scdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: traffic_scusr |
| | | password: QYT_sc@20#25 |
| | | db-name: traffic_scdb #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | | |
| | | --- |
| | | spring: |
| | | data: |
| | | mongodb: |
| | | uri: mongodb://qyt_jtcx:qyt_jtcx2025@172.21.35.195:27017,172.21.35.196:27017/traveling_track |
| | | |
| | | --- |
| | | |
| | | wx: |
| | | grantType: authorization_code #填authorization_code |
| | | appid: 111 #应用唯一标识,在微信开放平台提交应用审核通过后获得 |
| | | appSecret: 111 #应用密钥AppSecret,在微信开放平台提交应用审核通过后获得 |
| | | appletsAppid: wxcc3c9058e2b294db #小程序APPid |
| | | appletsAppSecret: 5610fc6126255ca5f7bd9fa4330338b6 # |
| | | mchId: 111 #微信支付分配的商户号 |
| | | key: 111 #key为商户平台设置的密钥key: |
| | | |
| | | --- |
| | | |
| | | alipay: |
| | | appid: 111 #应用程序唯一标识 |
| | | appPrivateKey: 111 #开发者应用私钥 |
| | | alipayPublicKey: 1 #应用公钥 |
| | | alipay_public_key: 111 #支付宝公钥 |
| | | |
| | | --- |
| | | |
| | | juhe: #聚合数据 |
| | | appKey: 111 # |
| | | |
| | | |
| | | --- |
| | | |
| | | jiguang: |
| | | appKey-driver: 111 #极光推送应用唯一标识 |
| | | masterSecret-driver: 111 #用于服务器端 API 调用时与 AppKey 配合使用达到鉴权的目的 |
| | | appKey-dispatch: 111 #极光推送应用唯一标识 |
| | | masterSecret-dispatch: 111 #用于服务器端 API 调用时与 AppKey 配合使用达到鉴权的目的 |
| | | |
| | | |
| | | --- |
| | | |
| | | #支付回调地址 |
| | | #正式环境 |
| | | callbackPath: https://traffic.qytzt.cn/driver |
| | | |
| | | --- |
| | | #交通部推送数据功能开关 |
| | | pushMinistryOfTransport: false |
| | | |
| | | active: "@spring.active@" |