| | |
| | | @Override |
| | | public ResultUtil process(Integer orderId, Integer state, Double lon, Double lat,String phone, Integer language, Integer uid) throws Exception { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(orderId); |
| | | if((orderPrivateCar.getState() + 1) != state){ |
| | | return ResultUtil.error(language == 1 ? "操作失败,请刷新订单" : language == 2 ? "Operation failed, please refresh the order" : "L’opération a échoué, veuillez actualiser la commande"); |
| | | } |
| | | String tripId = redisUtil.getValue("trip" + orderPrivateCar.getUserId()); |
| | | ReverseGeocodeVo reverseGeocode = GoogleMapUtil.getReverseGeocode(lat, lon, tripId); |
| | | if(null == reverseGeocode){ |
| | |
| | | file-size-threshold: 100MB |
| | | redis: |
| | | database: 0 |
| | | host: 172.17.0.3 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: mPMHThYzlT8DWgl8HLqwPEyPOiHDPPB5 |
| | | |
| | |
| | | // The path to your file to upload |
| | | // String filePath = "path/to/your/file" |
| | | String fileName = file.getOriginalFilename(); |
| | | String projectId = "i-go-gcp"; |
| | | String bucketName = "i-go"; |
| | | String projectId = "i-go-cloud"; |
| | | String bucketName = "i-go-gcs-public"; |
| | | GoogleCredentials defaultCredentials = null; |
| | | try { |
| | | defaultCredentials = GoogleCredentials.getApplicationDefault(); |
| | |
| | | storage.createFrom(blobInfo, file.getInputStream(), precondition); |
| | | System.out.println( |
| | | "File uploaded to bucket " + bucketName + " as " + fileName); |
| | | |
| | | |
| | | makeObjectPublic(projectId, bucketName, fileName); |
| | | return "https://storage.googleapis.com/i-go/" + fileName; |
| | | } catch (IOException e) { |
| | |
| | | System.out.println( |
| | | "Object " + objectName + " in bucket " + bucketName + " was made publicly readable"); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | max-file-size: 100MB |
| | | redis: |
| | | database: 0 |
| | | host: 172.17.0.3 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: mPMHThYzlT8DWgl8HLqwPEyPOiHDPPB5 |
| | | |
| | |
| | | UserActivityDiscount1 query2 = userActivityDiscount1Mapper.query(orderLogistics.getCompanyId()); |
| | | if(null != query2){ |
| | | Integer orderNum=this.selectCount(new EntityWrapper<OrderLogistics>().eq("userId",orderLogistics.getUserId()).eq("activityId",query2.getId()).last(" and to_days(getoffTime) = to_days(now())")); |
| | | if(query2.getDistance()*1000>orderLogistics.getMileage() && query2.getOrderNum()>orderNum){ |
| | | if(orderLogistics.getMileage() > (query2.getDistance() * 1000) && query2.getOrderNum() > orderNum){ |
| | | Double special = query2.getLogistics(); |
| | | if(null != special){ |
| | | orderLogistics.setDiscount(special); |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ResultUtil payPrivateCarOrder(Integer payType, Integer bankCardId, Integer orderId, Integer couponId, Integer redDeduction, Integer type, Integer language) throws Exception { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(orderId); |
| | | if(orderPrivateCar.getState() == 8 || orderPrivateCar.getState() == 9){ |
| | | return ResultUtil.error(language == 1 ? "订单已完成支付,不允许重复支付" : language == 2 ? "The order has been paid, recurring payments is not allowed." : "La commande a été payée, les paiements récurrents ne sont pas autorisés.", ""); |
| | | } |
| | | if(orderPrivateCar.getState() != 7){ |
| | | return ResultUtil.error(language == 1 ? "订单不在待支付状态,不允许支付" : language == 2 ? "The order is no longer with Pending Payment, making payments is not allowed." : "La commande n’est plus en attente de paiement, il n’est pas permis d’effectuer des paiements.", ""); |
| | | } |
| | | // if(orderPrivateCar.getState() == 8 || orderPrivateCar.getState() == 9){ |
| | | // return ResultUtil.error(language == 1 ? "订单已完成支付,不允许重复支付" : language == 2 ? "The order has been paid, recurring payments is not allowed." : "La commande a été payée, les paiements récurrents ne sont pas autorisés.", ""); |
| | | // } |
| | | // if(orderPrivateCar.getState() != 7){ |
| | | // return ResultUtil.error(language == 1 ? "订单不在待支付状态,不允许支付" : language == 2 ? "The order is no longer with Pending Payment, making payments is not allowed." : "La commande n’est plus en attente de paiement, il n’est pas permis d’effectuer des paiements.", ""); |
| | | // } |
| | | Integer uid = orderPrivateCar.getUserId(); |
| | | BigDecimal orderMoney = new BigDecimal(orderPrivateCar.getOrderMoney()); |
| | | UserInfo userInfo = userInfoService.selectById(uid); |
| | |
| | | if(null != query2){ |
| | | Integer orderNum=this.selectCount(new EntityWrapper<OrderPrivateCar>().eq("userId",orderPrivateCar.getUserId()) |
| | | .eq("activityId",query2.getId()).last(" and to_days(getoffTime) = to_days(now())")); |
| | | if(query2.getDistance() * 1000 > orderPrivateCar.getMileage() && query2.getOrderNum().compareTo(orderNum) > 0){ |
| | | if(orderPrivateCar.getMileage() > (query2.getDistance() * 1000) && query2.getOrderNum().compareTo(orderNum) > 0){ |
| | | Double special = query2.getSpecial(); |
| | | if(null != special){ |
| | | orderPrivateCar.setDiscount(special); |
| | |
| | | // The path to your file to upload |
| | | // String filePath = "path/to/your/file" |
| | | String fileName = file.getOriginalFilename(); |
| | | String projectId = "i-go-gcp"; |
| | | String bucketName = "i-go"; |
| | | String projectId = "i-go-cloud"; |
| | | String bucketName = "i-go-gcs-public"; |
| | | Storage storage = StorageOptions.newBuilder().setProjectId(projectId).build().getService(); |
| | | BlobId blobId = BlobId.of(bucketName, fileName); |
| | | BlobInfo blobInfo = BlobInfo.newBuilder(blobId).build(); |
| | |
| | | max-file-size: 100MB |
| | | redis: |
| | | database: 0 |
| | | host: 172.17.0.3 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: mPMHThYzlT8DWgl8HLqwPEyPOiHDPPB5 |
| | | |
| | |
| | | //package com.stylefeng.guns; |
| | | // |
| | | //import com.alibaba.fastjson.JSON; |
| | | //import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; |
| | | //import com.stylefeng.guns.modular.system.util.SMSUtil; |
| | | //import com.stylefeng.guns.modular.system.util.Tingg.TinggPayoutUtil; |
| | | //import com.stylefeng.guns.modular.system.util.Tingg.model.PayoutResponse; |
| | |
| | | //public class TestGunsApplication { |
| | | // |
| | | // @Autowired |
| | | // private TinggPayoutUtil tinggPayoutUtil; |
| | | // |
| | | // @Autowired |
| | | // private SMSUtil smsUtil; |
| | | // private IOrderPrivateCarService orderPrivateCarService; |
| | | // |
| | | // |
| | | // @Test |
| | | // public void test(){ |
| | | // smsUtil.sendCellulantMessage("233203716998", "您的验证码为:123456,该验证码5分钟内有效,请勿泄漏于他人!"); |
| | | // try { |
| | | // orderPrivateCarService.payPrivateCarOrder(1, null, 13083, null, null, 1, 1); |
| | | // } catch (Exception e) { |
| | | // throw new RuntimeException(e); |
| | | // } |
| | | // } |
| | | //} |
| | |
| | | file-size-threshold: 100MB |
| | | redis: |
| | | database: 0 |
| | | host: 172.17.0.3 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: mPMHThYzlT8DWgl8HLqwPEyPOiHDPPB5 |
| | | |