wenhongquan 1 rok temu
rodzic
commit
27d3e820e0

+ 1 - 0
ruoyi-admin/src/main/resources/application.yml

@@ -119,6 +119,7 @@ security:
     # actuator 监控配置
     - /actuator
     - /actuator/**
+    - /system/commonOther/**
 
 # 多租户配置
 tenant:

+ 4 - 30
ruoyi-modules/ruoyi-dzbc/src/main/java/org/dromara/system/controller/CommonController.java → ruoyi-modules/ruoyi-dzbc/src/main/java/org/dromara/system/controller/CommonOtherController.java

@@ -1,10 +1,6 @@
 package org.dromara.system.controller;
 
 import cn.dev33.satoken.annotation.SaIgnore;
-import cn.hutool.core.date.DateUtil;
-import cn.hutool.core.util.StrUtil;
-import cn.hutool.json.JSONArray;
-import cn.hutool.json.JSONObject;
 import cn.hutool.json.JSONUtil;
 import com.github.binarywang.wxpay.bean.notify.WxPayNotifyResponse;
 import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
@@ -14,48 +10,26 @@ import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import okhttp3.OkHttpClient;
 import org.apache.commons.io.IOUtils;
 import org.dromara.common.core.domain.R;
-import org.dromara.common.core.utils.SpringUtils;
 import org.dromara.common.log.annotation.Log;
 import org.dromara.common.log.enums.BusinessType;
-import org.dromara.common.mybatis.core.page.PageQuery;
-import org.dromara.common.mybatis.core.page.TableDataInfo;
-import org.dromara.common.redis.utils.CacheUtils;
-import org.dromara.common.redis.utils.RedisUtils;
-import org.dromara.system.domain.bo.SysDictDataBo;
+import org.dromara.common.web.core.BaseController;
 import org.dromara.system.domain.bo.TblDzbcBannerBo;
 import org.dromara.system.domain.bo.TblDzbcOrderBo;
-import org.dromara.system.domain.vo.SysDictDataVo;
-import org.dromara.system.domain.vo.TblDzbcBannerVo;
 import org.dromara.system.domain.vo.TblDzbcOrderVo;
-import org.dromara.system.service.ISysDictDataService;
 import org.dromara.system.service.ITblDzbcBannerService;
 import org.dromara.system.service.ITblDzbcOrderService;
-import org.dromara.util.CabinetUtil;
-import org.dromara.util.MessageUtils;
-import org.dromara.util.YingshiHttp;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
-import java.time.Duration;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static org.dromara.util.CabinetUtil.CABINET_BOXS;
-import static org.dromara.util.CabinetUtil.CABINET_INFO;
-
 @Validated
 @RequiredArgsConstructor
 @RestController
-@Slf4j
 @SaIgnore
-@RequestMapping("/common")
-public class CommonController extends TblBaseController {
+@Slf4j
+@RequestMapping("/system/commonOther")
+public class CommonOtherController extends BaseController {
 
     private final ITblDzbcBannerService bannerService;
 

+ 12 - 2
ruoyi-modules/ruoyi-dzbc/src/main/java/org/dromara/system/controller/TblDzbcOrderController.java

@@ -125,6 +125,11 @@ public class TblDzbcOrderController extends BaseController {
         return toAjax(tblDzbcOrderService.deleteWithValidByIds(List.of(ids), true));
     }
 
+    /**
+     * 获取定制班车-获取订单微信支付参数
+     *
+     * @param id 主键
+     */
     @Log(title = "定制班车-订单", businessType = BusinessType.INSERT)
     @RepeatSubmit()
     @GetMapping("/pay/wx/{id}")
@@ -139,7 +144,7 @@ public class TblDzbcOrderController extends BaseController {
                 orderRequest.setTotalFee(tblDzbcOrderVo.getTotalPrice());
                 orderRequest.setTradeType("JSAPI");
                 orderRequest.setGoodsTag(tblDzbcOrderVo.getName());
-                orderRequest.setNotifyUrl(baseUrl + "/common/wx");
+                orderRequest.setNotifyUrl(baseUrl + "/system/commonOther/wx");
                 List<SysSocialVo> sysSocials = sysSocialService.queryListByUserId(LoginHelper.getUserId());
                 AtomicReference<SysSocialVo> sysSocialVo1 = new AtomicReference<>();
                 sysSocials.forEach(sysSocialVo -> {
@@ -170,6 +175,11 @@ public class TblDzbcOrderController extends BaseController {
     }
 
 
+    /**
+     * 取消定订单
+     *
+     * @param id 主键
+     */
     @Log(title = "定制班车-订单", businessType = BusinessType.UPDATE)
     @RepeatSubmit()
     @GetMapping("/cancel/{id}")
@@ -183,7 +193,7 @@ public class TblDzbcOrderController extends BaseController {
                 refundRequest.setTotalFee(tblDzbcOrderVo.getTotalPrice());
                 refundRequest.setRefundFee(tblDzbcOrderVo.getTotalPrice());
                 refundRequest.setOutRefundNo(wxtrade.getStr("transactionId"));
-                refundRequest.setNotifyUrl(baseUrl + "/common/wxref");
+                refundRequest.setNotifyUrl(baseUrl + "/system/commonOther/wx/ref");
                 wxPayService.refund(refundRequest);
 
 

+ 7 - 0
ruoyi-modules/ruoyi-dzbc/src/main/java/org/dromara/system/controller/TblDzbcPathSchedulingController.java

@@ -112,6 +112,13 @@ public class TblDzbcPathSchedulingController extends BaseController {
     }
 
 
+    /**
+     * 获取定制班车-余票
+     * @param searchDate
+     * @param fromareaId
+     * @param toareaId
+     * @return
+     */
     @Log(title = "定制班车-路线排班", businessType = BusinessType.DELETE)
     @GetMapping("/getCarTickets")
     public R<Object> getCarTickets(@RequestParam(required = true) String searchDate,@RequestParam(required = true) Long fromareaId,@RequestParam(required = true) Long toareaId) {