You've already forked FrameTour-BE
调整
This commit is contained in:
@@ -3,6 +3,7 @@ package com.ycwl.basic.service.mobile;
|
||||
import com.ycwl.basic.model.wx.WXPayOrderReqVO;
|
||||
import com.ycwl.basic.model.wx.WechatCallbackSuccessData;
|
||||
|
||||
import com.ycwl.basic.pay.entity.PayResponse;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
@@ -19,7 +20,7 @@ public interface WxPayService {
|
||||
*/
|
||||
void payNotify(HttpServletRequest request);
|
||||
|
||||
void payNotify(Long scenicId, HttpServletRequest request);
|
||||
PayResponse payNotify(Long scenicId, HttpServletRequest request);
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -51,14 +51,14 @@ public class AppScenicServiceImpl implements AppScenicService {
|
||||
@Override
|
||||
public ApiResponse<ScenicDeviceCountVO> deviceCountByScenicId(Long scenicId) {
|
||||
JwtInfo worker = JwtTokenUtil.getWorker();
|
||||
ScenicDeviceCountVO scenicDeviceCountVO = deviceMapper.deviceCountByScenicId(scenicId, worker.getUserId());
|
||||
ScenicDeviceCountVO scenicDeviceCountVO = deviceMapper.deviceCountByScenicId(scenicId);
|
||||
return ApiResponse.success(scenicDeviceCountVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResponse<ScenicRespVO> getDetails(Long id) {
|
||||
ScenicRespVO scenicRespVO = scenicMapper.getAppById(id);
|
||||
ScenicDeviceCountVO scenicDeviceCountVO = deviceMapper.deviceCountByScenicId(id, -1L);
|
||||
ScenicDeviceCountVO scenicDeviceCountVO = deviceMapper.deviceCountByScenicId(id);
|
||||
scenicRespVO.setLensNum(scenicDeviceCountVO.getTotalDeviceCount());
|
||||
return ApiResponse.success(scenicRespVO);
|
||||
}
|
||||
|
@@ -80,6 +80,7 @@ public class WxPayServiceImpl implements WxPayService {
|
||||
CreateOrderResponse order = scenicPayAdapter.createOrder(request);
|
||||
Map<String, Object> paymentParams = scenicPayAdapter.getPaymentParams(order);
|
||||
paymentParams.put("needPay", !order.isSkipPay());
|
||||
paymentParams.put("orderId", req.getOrderSn());
|
||||
return paymentParams;
|
||||
} catch (Exception e) {
|
||||
log.error("[微信支付]createOrder error", e);
|
||||
@@ -88,7 +89,7 @@ public class WxPayServiceImpl implements WxPayService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void payNotify(Long scenicId, HttpServletRequest request) {
|
||||
public PayResponse payNotify(Long scenicId, HttpServletRequest request) {
|
||||
IPayAdapter scenicPayAdapter = scenicService.getScenicPayAdapter(scenicId);
|
||||
try {
|
||||
PayResponse callbackResponse = scenicPayAdapter.handleCallback(request);
|
||||
@@ -108,6 +109,7 @@ public class WxPayServiceImpl implements WxPayService {
|
||||
} catch (Exception e) {
|
||||
throw new AppException(BizCodeEnum.ADVANCE_PAYMENT_CALLBACK_FAILED, e.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user