| | |
| | | 提现冻结金额额度 <input type="number" min="0" id="withdrawFrozenAmount" value="${item.withdrawFrozenAmount}"/> 元 |
| | | </div> |
| | | <div class="form-group"> |
| | | <span style="color: red;">注意:司机提现时,系统自动验证待提现余额是都大于冻结金额,若大于则司机可提现金额为余额-冻结金额,若下雨则直接提示不能提现</span> |
| | | <span style="color: red;">注意:司机提现时,系统自动验证待提现余额是都大于冻结金额,若大于则司机可提现金额为余额-冻结金额,若小于则直接提示不能提现</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | |
| | | <artifactId>guns-admin</artifactId> |
| | | <artifactId>user</artifactId> |
| | | <name>guns-admin</name> |
| | | <version>0.0.1</version> |
| | | <description>guns 的spring boot版本</description> |
| | | |
| | | <packaging>jar</packaging> |
| | |
| | | // 查询当前活动的限制数量 |
| | | UserCouponRecord userCouponRecords1 = userCouponRecordService.selectById(id); |
| | | |
| | | List<UserCouponRecord> userCouponRecords = userCouponRecordService.selectList(new EntityWrapper<UserCouponRecord>().eq("couponId", userCouponRecords1.getCouponId())); |
| | | |
| | | // 获取活动限制数量 |
| | | TActivityGeneralization tActivityGeneralization = activityGeneralizationService.selectById(userCouponRecords.get(0).getCouponActivityId()); |
| | | if (tActivityGeneralization == null) { |
| | | throw new RuntimeException("未能找到对应的活动信息"); |
| | | } |
| | | TActivityGeneralization tActivityGeneralization = activityGeneralizationService.selectById(userCouponRecords1.getCouponActivityId()); |
| | | if (null != tActivityGeneralization && tActivityGeneralization.getStartTime().getTime() <= System.currentTimeMillis() && tActivityGeneralization.getEndTime().getTime() > System.currentTimeMillis()) { |
| | | |
| | | List<UserCouponRecord> userCouponRecords = userCouponRecordService.selectList(new EntityWrapper<UserCouponRecord>() |
| | | .eq("userId", uid).eq("couponId", userCouponRecords1.getCouponId())); |
| | | int limitQuantity = tActivityGeneralization.getMonthUseCount(); // 假设limitQuantity字段代表限制数量 |
| | | |
| | | // 判断当月的优惠券是否超过限制 |
| | |
| | | if (usedThisMonth >= limitQuantity) { |
| | | return ResultUtil.error("本月使用数量已经超出限制"); |
| | | // 这里可以添加更多的逻辑处理,比如抛出异常、记录日志等 |
| | | } else { |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | } |
| | | return ResultUtil.success(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/queryNoticesInfo") |
| | | @ApiOperation(value = "获取系统消息和公告详情", tags = {"用户端-首页"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "数据类型(1=公告,2=系统消息)", name = "type", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "数据id", name = "id", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<Map<String, Object>> queryNoticesInfo(Integer type, Integer id){ |
| | | Map<String, Object> map = systemNoticeService.queryNoticesInfo(type, id); |
| | | return ResultUtil.success(map); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 阅读操作 |
| | | * @param id |
| | |
| | | SysCouponRecord sysCouponRecord = sysCouponRecordService.selectById(tActivityGeneralization.getCouponId()); |
| | | |
| | | int i1 = userCouponRecordService.selectCount(new EntityWrapper<UserCouponRecord>().eq("activityType", 5).eq("couponActivityId", acId).groupBy("userId")); |
| | | if (tActivityGeneralization.getParticipateCount()<=i1){ |
| | | if (null != tActivityGeneralization.getParticipateCount() && tActivityGeneralization.getParticipateCount()<=i1){ |
| | | return ResultUtil.error("当前参与人数已满"); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<UserInfoWarpper> queryUserInfo(HttpServletRequest request){ |
| | | public ResultUtil<UserInfoWarpper> queryUserInfo(String code, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = userInfoService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | Map<String, Object> map = userInfoService.queryUserInfo(uid); |
| | | Map<String, Object> map = userInfoService.queryUserInfo(code, uid); |
| | | return ResultUtil.success(UserInfoWarpper.getUserInfoWarpper(map)); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | state as state, |
| | | oldState as oldState, |
| | | remark as remark, |
| | | peopleNumber as num |
| | | peopleNumber as num, |
| | | carId |
| | | from t_order_cross_city where userId = #{uid} order by insertTime desc limit #{pageNum}, #{size} |
| | | </select> |
| | | |
| | |
| | | |
| | | <select id="queryInvoiceOrder" resultType="map"> |
| | | select |
| | | id as id, |
| | | id as orderId, |
| | | DATE_FORMAT(travelTime, '%Y-%m-%d %H:%i') as time, |
| | | startAddress as startAddress, |
| | | endAddress as endAddress, |
| | |
| | | public OrderServerWarpper queryOrderServer(Integer orderId, Integer uid) throws Exception { |
| | | OrderCrossCity orderCrossCity = this.selectById(orderId); |
| | | //计算预计距离和剩余时间 |
| | | String value = redisUtil.getValue("DRIVER" + String.valueOf(orderCrossCity.getDriverId())); |
| | | String value = redisUtil.getValue("DRIVER" + orderCrossCity.getDriverId()); |
| | | if(null == value || "".equals(value)){ |
| | | System.err.println("司机没有上传位置信息"); |
| | | |
| | |
| | | } |
| | | try { |
| | | if(orderType == 1){//专车 |
| | | Thread.sleep(1000); |
| | | System.err.println("====="+orderId); |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarMapper.selectById(orderId); |
| | | System.err.println("====="+orderPrivateCar); |
| | | OrderPrivateCarServiceImpl.orderIds.add(orderPrivateCar.getId());//添加记录,防止调用接口重复提醒无人接单 |
| | | Company query = companyCityService.query(String.valueOf(orderPrivateCar.getStartLon()), String.valueOf(orderPrivateCar.getStartLat()));//获取起点所属分公司 |
| | | List<PushOrder> querys = pushOrderService.querys(null, 1, query.getId());//获取需要推送的次数 |
| | | for(int i = 1; i <= querys.size(); i++){ |
| | | //订单被抢后的处理 |
| | | Integer state = orderPrivateCarMapper.selectById(orderId).getState(); |
| | | if(state != 1){ |
| | | //关闭其他推送线程 |
| | | Set<String> keySet = threadMap.keySet(); |
| | | for(String key : keySet){ |
| | | if(!key.equals(orderId + "_1")){ |
| | | Thread thread1 = threadMap.get(key);//中断线程 |
| | | if(null != thread1){ |
| | | thread1.interrupt(); |
| | | } |
| | | threadMap.remove(key); |
| | | } |
| | | } |
| | | //删除其他无效数据 |
| | | for(Map<String, Integer> map : datas){ |
| | | Integer orderType = map.get("orderType"); |
| | | Integer orderId1 = map.get("orderId"); |
| | | if(orderType == 1 && orderId != orderPrivateCar.getId()){ |
| | | orderPrivateCarMapper.deleteById(orderId1); |
| | | } |
| | | if(orderType == 2){ |
| | | orderTaxiMapper.deleteById(orderId1); |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | |
| | | //开始进行推送的处理 |
| | | PushOrder pushOrder = pushOrderService.querys(i, 1, query.getId()).get(0); |
| | | //获取空闲司机 |
| | | List<Driver> list = driverService.queryIdleDriver(1, orderPrivateCar.getServerCarModelId(), orderPrivateCar.getStartLon(), orderPrivateCar.getStartLat(), pushOrder.getPushDistance(), null);//所有附近空闲司机 |
| | | if(list.size() > 0){ |
| | | double driverProportion = pushOrder.getDriverProportion() / 100;//推送占比计算成小数 |
| | | int lastIndex = Double.valueOf(list.size() * driverProportion).intValue();//计算占比转成整数(下标截取) |
| | | list = list.subList(0, lastIndex);//获取空闲司机中占比数据 |
| | | for(Driver driver : list){//开始进行推送 |
| | | boolean bo = false; |
| | | for(Integer integer : integers){ |
| | | if(integer.compareTo(driver.getId()) == 0){ |
| | | bo = true; |
| | | break; |
| | | } |
| | | } |
| | | if(bo){ |
| | | continue; |
| | | } |
| | | pushUtil.pushOrderState(2, driver.getId(), orderPrivateCar.getId(), 1, orderPrivateCar.getState(), pushOrder.getPushTime()); |
| | | } |
| | | } |
| | | |
| | | //所有推送完后的处理 |
| | | Boolean b = pushEndMap.get(orderPrivateCar.getCrossCityOrderId()); |
| | | if(i == querys.size() && state == 1 && (null != b && !b.booleanValue())){ |
| | | pushUtil.pushEndPush(1, orderPrivateCar.getUserId(), orderPrivateCar.getId(), 1); |
| | | OrderPrivateCarServiceImpl.orderIds.remove(orderPrivateCar.getId()); |
| | | pushEndMap.put(orderPrivateCar.getCrossCityOrderId(), Boolean.TRUE);//推送后添加标识 |
| | | break; |
| | | } |
| | | Thread.sleep(pushOrder.getPushTime() * 1000);//设置等待时间 |
| | | //推单操作 |
| | | if(orderPrivateCar.getState() == 1){ |
| | | Integer id = orderPrivateCar.getId(); |
| | | redisUtil.addListRight("push_order_ids", id.toString()); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | <select id="queryInvoiceOrder" resultType="map"> |
| | | select |
| | | id as id, |
| | | id as orderId, |
| | | DATE_FORMAT(travelTime, '%Y-%m-%d %H:%i') as time, |
| | | startAddress as startAddress, |
| | | endAddress as endAddress, |
| | |
| | | driverId as driverId, |
| | | (1) as orderType, |
| | | state as state, |
| | | oldState as oldState |
| | | oldState as oldState, |
| | | carId |
| | | from t_order_private_car where userId = #{uid} order by insertTime desc limit #{pageNum}, #{size} |
| | | </select> |
| | | |
| | | |
| | | <select id="queryInvoiceOrder" resultType="map"> |
| | | select |
| | | id as id, |
| | | id as orderId, |
| | | DATE_FORMAT(travelTime, '%Y-%m-%d %H:%i') as time, |
| | | startAddress as startAddress, |
| | | endAddress as endAddress, |
| | |
| | | |
| | | //推单操作 |
| | | if(orderPrivateCar.getState() == 1){ |
| | | this.pushOrder(orderPrivateCar); |
| | | Integer id = orderPrivateCar.getId(); |
| | | redisUtil.addListRight("push_order_ids", id.toString()); |
| | | } |
| | | |
| | | //添加消息 |
| | |
| | | if(orderPrivateCar.getState() != 1){ |
| | | return ResultUtil.error("订单已被司机接单,不能重复推送"); |
| | | } |
| | | //处理摆渡订单的继续推单操作 |
| | | if(orderPrivateCar.getType() == 2){ |
| | | OrderCrossCityServiceImpl.pushEndMap.put(orderPrivateCar.getCrossCityOrderId(), false);//还原标识数据 |
| | | List<OrderPrivateCar> list = this.selectList(new EntityWrapper<OrderPrivateCar>().eq("type", 2).eq("crossCityOrderId", orderPrivateCar.getCrossCityOrderId()).eq("place", orderPrivateCar.getPlace())); |
| | | List<Map<String, Integer>> orders = new ArrayList<>(); |
| | | for(OrderPrivateCar orderPrivateCar1 : list){ |
| | | if(orderPrivateCar1.getState() != 1){ |
| | | return ResultUtil.error("订单已被司机接单,推单取消"); |
| | | } |
| | | Map<String, Integer> map = new HashMap<>(); |
| | | map.put("orderType", 1); |
| | | map.put("orderId", orderPrivateCar1.getId()); |
| | | orders.add(map); |
| | | } |
| | | // List<OrderTaxi> list1 = orderTaxiService.selectList(new EntityWrapper<OrderTaxi>().eq("type", 2).eq("crossCityOrderId", orderPrivateCar.getCrossCityOrderId()).eq("place", orderPrivateCar.getPlace())); |
| | | // for(OrderTaxi orderTaxi : list1){ |
| | | // if(orderTaxi.getState() != 1){ |
| | | // return ResultUtil.error("订单已被司机接单,推单取消"); |
| | | // } |
| | | // Map<String, Integer> map = new HashMap<>(); |
| | | // map.put("orderType", 2); |
| | | // map.put("orderId", orderTaxi.getId()); |
| | | // orders.add(map); |
| | | // } |
| | | //开始重新推单 |
| | | orderCrossCityService.pushOrder(orders); |
| | | |
| | | }else{ |
| | | this.pushOrder(orderPrivateCar); |
| | | } |
| | | //继续将订单添加到推送列表中 |
| | | redisUtil.addListLeft("push_order_ids", id.toString()); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | |
| | | public boolean pushOrder1(Integer id){ |
| | | try { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(id); |
| | | if(1 != orderPrivateCar.getState()){ |
| | | return true; |
| | | } |
| | | long time = System.currentTimeMillis() - orderPrivateCar.getInsertTime().getTime(); |
| | | Company query = companyCityService.query(String.valueOf(orderPrivateCar.getStartLon()), String.valueOf(orderPrivateCar.getStartLat()));//获取起点所属分公司 |
| | | List<Driver> drivers = driverMapper.queryIdleDriver_(1, orderPrivateCar.getServerCarModelId(), query.getId()); |
| | | System.err.println("当前获取的司机:"+drivers); |
| | | List<PushOrder> querys = pushOrderService.querys(null, 1, query.getId());//获取需要推送的次数 |
| | | long pushTime = 0; |
| | | if(null != querys && querys.size() > 0){ |
| | | pushTime = querys.stream().mapToInt(PushOrder::getPushTime).sum() * 1000; |
| | | } |
| | | if(time >= pushTime){ |
| | | pushUtil.pushEndPush(1, orderPrivateCar.getUserId(), orderPrivateCar.getId(), 1); |
| | | return true; |
| | | } |
| | | |
| | | List<Driver> list = new ArrayList<>(); |
| | | List<Driver> drivers = driverMapper.queryIdleDriver_(1, orderPrivateCar.getServerCarModelId(), query.getId()); |
| | | System.err.println("当前获取的司机:"+ JSON.toJSONString(drivers)); |
| | | |
| | | //找出距离最近且评分最高的司机 |
| | | Double dis = 100000D; |
| | |
| | | continue; |
| | | } |
| | | String value = redisUtil.getValue("DRIVER" + driver.getId()); |
| | | System.err.println("------" + value); |
| | | if(null != value){ |
| | | Map<String, Double> distance1 = geodesyUtil.getDistance(orderPrivateCar.getStartLon() + "," + orderPrivateCar.getStartLat(), value); |
| | | double d = Double.valueOf(distance1.get("WGS84")).doubleValue(); |
| | |
| | | } |
| | | } |
| | | } |
| | | System.err.println("------" + JSON.toJSONString(driver1)); |
| | | if(null != driver1){ |
| | | orderPrivateCar.setDriverId(driver1.getId()); |
| | | orderPrivateCar.setCarId(driver1.getCarId()); |
| | |
| | | @Override |
| | | public OrderServerWarpper queryOrderServer(Integer orderId, Integer uid) throws Exception { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(orderId); |
| | | String value = null; |
| | | String d = "0"; |
| | | String t = "0"; |
| | | if(null != orderPrivateCar.getDriverId()){ |
| | | //计算预计距离和剩余时间 |
| | | String value = redisUtil.getValue("DRIVER" + String.valueOf(orderPrivateCar.getDriverId())); |
| | | value = redisUtil.getValue("DRIVER" + orderPrivateCar.getDriverId()); |
| | | if(null == value || "".equals(value)){ |
| | | System.err.println("司机没有上传位置信息"); |
| | | |
| | |
| | | |
| | | } |
| | | Map<String, String> distance = gdMapElectricFenceUtil.getDistance(value, orderPrivateCar.getStartLon() + "," + orderPrivateCar.getStartLat(), 1); |
| | | String d = "0"; |
| | | String t = "0"; |
| | | |
| | | if(null == distance){ |
| | | System.err.println("查询距离出错了"); |
| | | }else{ |
| | | d = new BigDecimal(distance.get("distance")).divide(new BigDecimal(1000), new MathContext(2, RoundingMode.HALF_EVEN)).setScale(2, BigDecimal.ROUND_HALF_EVEN).toString(); |
| | | t = new BigDecimal(distance.get("duration")).divide(new BigDecimal(60), new MathContext(2, RoundingMode.HALF_EVEN)).setScale(2, BigDecimal.ROUND_HALF_EVEN).intValue() + ""; |
| | | } |
| | | } |
| | | |
| | | OrderServerWarpper orderServerWarpper = new OrderServerWarpper(); |
| | | orderServerWarpper.setOrderId(orderPrivateCar.getId()); |
| | | orderServerWarpper.setOrderType(1); |
| | |
| | | orderServerWarpper.setLaveTime("0"); |
| | | } |
| | | if(orderPrivateCar.getState() == 5 || orderPrivateCar.getState() == 6){//服务中 |
| | | distance = gdMapElectricFenceUtil.getDistance(value, orderPrivateCar.getEndLon() + "," + orderPrivateCar.getEndLat(), 1); |
| | | Map<String, String> distance = gdMapElectricFenceUtil.getDistance(value, orderPrivateCar.getEndLon() + "," + orderPrivateCar.getEndLat(), 1); |
| | | if(null == distance){ |
| | | System.err.println("查询距离出错了"); |
| | | }else{ |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.stylefeng.guns.modular.system.model.Region; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/12/18 16:39 |
| | | */ |
| | | public interface IRegionService extends IService<Region> { |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> queryList(Integer type, Integer pageNum, Integer size, Integer uid); |
| | | |
| | | |
| | | /** |
| | | * 获取系统消息详情 |
| | | * @param type |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Map<String, Object> queryNoticesInfo(Integer type, Integer id); |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | Map<String, Object> queryUserInfo(Integer uid) throws Exception; |
| | | Map<String, Object> queryUserInfo(String code, Integer uid) throws Exception; |
| | | |
| | | |
| | | /** |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.dao.RegionMapper; |
| | | import com.stylefeng.guns.modular.system.model.Region; |
| | | import com.stylefeng.guns.modular.system.service.IRegionService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/12/18 16:40 |
| | | */ |
| | | @Service |
| | | public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> implements IRegionService { |
| | | |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.system.dao.SystemNoticeMapper; |
| | | import com.stylefeng.guns.modular.system.dao.TNoticesMapper; |
| | | import com.stylefeng.guns.modular.system.model.SystemNotice; |
| | | import com.stylefeng.guns.modular.system.model.TNotices; |
| | | import com.stylefeng.guns.modular.system.service.ISystemNoticeService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 获取系统消息详情 |
| | | * @param type |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Map<String, Object> queryNoticesInfo(Integer type, Integer id) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(type == 1){//系统公告 |
| | | SystemNotice systemNotice = systemNoticeMapper.selectById(id); |
| | | TNotices tNotices = tNoticesMapper.selectById(systemNotice.getNoticesId()); |
| | | map.put("id", id); |
| | | map.put("title", tNotices.getTitle()); |
| | | map.put("img", tNotices.getImgUrl()); |
| | | map.put("content", tNotices.getContent()); |
| | | } |
| | | if(type == 2){//系统消息 |
| | | SystemNotice systemNotice = systemNoticeMapper.selectById(id); |
| | | map.put("id", id); |
| | | map.put("content", systemNotice.getContent()); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 阅读操作 |
| | | * @param id |
| | | * @param uid |
| | |
| | | userInfo.setState(1); |
| | | userInfo.setAvatar("https://anhenew.obs.cn-north-4.myhuaweicloud.com/admin/cca63b23e3a84c89a01e5204c1819497.png"); |
| | | |
| | | |
| | | this.insert(userInfo); |
| | | |
| | | addnewCoupoun(phone,userInfo); |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public Map<String, Object> queryUserInfo(Integer uid) throws Exception { |
| | | public Map<String, Object> queryUserInfo(String code, Integer uid) throws Exception { |
| | | Map<String, String> map = weChatUtil.code2Session(code); |
| | | UserInfo userInfo = userInfoMapper.selectById(uid); |
| | | if(ToolUtil.isEmpty(userInfo.getAppletsOpenId())){ |
| | | userInfo.setAppletsOpenId(map.get("openid")); |
| | | userInfoMapper.updateById(userInfo); |
| | | } |
| | | return userInfoMapper.queryUserInfo(uid, null); |
| | | } |
| | | |
| | |
| | | */ |
| | | private synchronized void addCoupon(UserInfo userInfo) throws Exception{ |
| | | //添加优惠券 |
| | | List<Map<String, Object>> list = userActivityRegisteredService.query(userInfo.getCompanyId()); |
| | | List<Map<String, Object>> list = userActivityRegisteredService.query(null == userInfo.getCompanyId() ? 1 : userInfo.getCompanyId()); |
| | | int num = 0; |
| | | for(Map<String, Object> map : list){ |
| | | if(null != map){ |
| | |
| | | String url = "https://api.weixin.qq.com/sns/jscode2session?appid=" + wxAppletsAppid + "&secret=" + wxAppletsAppSecret |
| | | + "&js_code=" + jscode + "&grant_type=authorization_code"; |
| | | String forObject = restTemplate.getForObject(url, String.class); |
| | | System.err.println(forObject); |
| | | JSONObject jsonObject = JSON.parseObject(forObject); |
| | | int errcode = jsonObject.getIntValue("errcode"); |
| | | Map<String, String> map = new HashMap<>(); |
| | |
| | | private Integer orderType; |
| | | private Long insertTime; |
| | | |
| | | private Integer carId; |
| | | |
| | | public Integer getOrderId() { |
| | | return orderId; |
| | | } |
| | |
| | | this.differenceMoney = differenceMoney; |
| | | } |
| | | |
| | | public Integer getCarId() { |
| | | return carId; |
| | | } |
| | | |
| | | public void setCarId(Integer carId) { |
| | | this.carId = carId; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "OrderWarpper{" + |
| | |
| | | orderWarpper.setCarTime(null != map.get("carTime") ? Double.parseDouble(String.valueOf(map.get("carTime"))) : 0); |
| | | orderWarpper.setServerCarModel(null != map.get("serverCarModel") ? String.valueOf(map.get("serverCarModel")) : ""); |
| | | orderWarpper.setDifferenceMoney(null != map.get("differenceMoney") ? Double.valueOf(map.get("differenceMoney").toString()) : 0D); |
| | | orderWarpper.setCarId(null != map.get("carId") ? Integer.valueOf(map.get("carId").toString()) : 0); |
| | | list.add(orderWarpper); |
| | | } |
| | | } |
| | |
| | | |
| | | <select id="queryInvoiceOrder" resultType="map"> |
| | | select |
| | | id as id, |
| | | id as orderId, |
| | | DATE_FORMAT(travelTime, '%Y-%m-%d %H:%i') as time, |
| | | startAddress as startAddress, |
| | | endAddress as endAddress, |
| | |
| | | |
| | | <select id="queryInvoiceOrder" resultType="map"> |
| | | select |
| | | id as id, |
| | | id as orderId, |
| | | DATE_FORMAT(travelTime, '%Y-%m-%d %H:%i') as time, |
| | | startAddress as startAddress, |
| | | endAddress as endAddress, |
| | |
| | | grantType: authorization_code #填authorization_code |
| | | appid: 111 #应用唯一标识,在微信开放平台提交应用审核通过后获得 |
| | | appSecret: 111 #应用密钥AppSecret,在微信开放平台提交应用审核通过后获得 |
| | | appletsAppid: wxe91f1af7638aa5dd #小程序APPid |
| | | appletsAppSecret: a787e1a462715604e0c9528b6d8960d1 # |
| | | mchId: 1678345627 #微信支付分配的商户号 |
| | | key: E10ADC3949BA59ABBE56E057F20F883E #key为商户平台设置的密钥key: |
| | | appletsAppid: wx3f6d567c18a87641 #小程序APPid |
| | | appletsAppSecret: 2fc56292246fc573644980890434b157 # |
| | | mchId: 1618978168 #微信支付分配的商户号 |
| | | key: BTisLYCrwstKZRTBZef5pe51SCA7Kxe1 #key为商户平台设置的密钥key: |
| | | |
| | | --- |
| | | |