Forráskód Böngészése

调整退款appId

yfh 3 napja
szülő
commit
48daf75166

+ 2 - 2
fs-admin/src/main/java/com/fs/his/controller/FsStorePaymentController.java

@@ -135,10 +135,10 @@ public class FsStorePaymentController extends BaseController
     }
     @PreAuthorize("@ss.hasPermi('his:storePayment:refund')")
     @GetMapping(value = "refund/{paymentId}")
-    public R refund(@PathVariable("paymentId") Long paymentId,String appId)
+    public R refund(@PathVariable("paymentId") Long paymentId)
     {
         log.info("sysUserId: {} 提交退款", getUserId());
-        return fsStorePaymentService.refundFsStorePayment(paymentId,appId);
+        return fsStorePaymentService.refundFsStorePayment(paymentId);
     }
 
     /**

+ 1 - 1
fs-service/src/main/java/com/fs/his/service/IFsStorePaymentService.java

@@ -90,7 +90,7 @@ public interface IFsStorePaymentService
 
     String updateFsStorePaymentByDecryptForm(Long paymentId);
 
-    R refundFsStorePayment(Long paymentId, String appId);
+    R refundFsStorePayment(Long paymentId);
 
     R sendRedPacket(WxSendRedPacketParam param);
 

+ 4 - 4
fs-service/src/main/java/com/fs/his/service/impl/FsStorePaymentServiceImpl.java

@@ -422,7 +422,7 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
     @Autowired
     IPayService payService;
     @Override
-    public R refundFsStorePayment(Long paymentId, String appId) {
+    public R refundFsStorePayment(Long paymentId) {
         FsStorePayment fsStorePayment = fsStorePaymentMapper.selectFsStorePaymentByPaymentId(paymentId);
         if(fsStorePayment!=null){
             String orderType="";
@@ -442,12 +442,12 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
 
             if(fsStorePayment.getPayMode().equals("wx")){
                 WxPayConfig payConfig = new WxPayConfig();
-                if (StringUtils.isBlank(appId)) {
+                if (StringUtils.isBlank(fsStorePayment.getAppId())) {
                     throw new IllegalArgumentException("appId不能为空");
                 }
-                FsCoursePlaySourceConfig fsCoursePlaySourceConfig = fsCoursePlaySourceConfigMapper.selectCoursePlaySourceConfigByAppId(appId);
+                FsCoursePlaySourceConfig fsCoursePlaySourceConfig = fsCoursePlaySourceConfigMapper.selectCoursePlaySourceConfigByAppId(fsStorePayment.getAppId());
                 if (fsCoursePlaySourceConfig == null) {
-                    throw new CustomException("未找到appId对应的小程序配置: " + appId);
+                    throw new CustomException("未找到appId对应的小程序配置: " + fsStorePayment.getAppId());
                 }
                 Long merchantConfigId = fsCoursePlaySourceConfig.getMerchantConfigId();
                 if (merchantConfigId == null || merchantConfigId <= 0) {