|
@@ -8,9 +8,12 @@ import jakarta.servlet.http.HttpServletRequest;
|
|
|
import lombok.SneakyThrows;
|
|
import lombok.SneakyThrows;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -35,9 +38,9 @@ public class PaymentController {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@ApiLog("微信支付")
|
|
@ApiLog("微信支付")
|
|
|
- @PostMapping("/wxPay")
|
|
|
|
|
|
|
+ @GetMapping("/wxPay")
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
- R<?> prepay(@RequestBody Long rechargeConfigId) {
|
|
|
|
|
|
|
+ R<?> prepay(@RequestParam Long rechargeConfigId) {
|
|
|
return R.success(wxPayService.wxPay(rechargeConfigId));
|
|
return R.success(wxPayService.wxPay(rechargeConfigId));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -52,7 +55,7 @@ public class PaymentController {
|
|
|
@ApiLog("用户申请退款")
|
|
@ApiLog("用户申请退款")
|
|
|
@PostMapping("/wxApplyRefund")
|
|
@PostMapping("/wxApplyRefund")
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
- R<?> wxAppRefund(@RequestBody String reason) {
|
|
|
|
|
|
|
+ R<?> wxAppRefund(@RequestParam String reason) {
|
|
|
wxPayService.applyWxRefund(reason);
|
|
wxPayService.applyWxRefund(reason);
|
|
|
return R.success();
|
|
return R.success();
|
|
|
}
|
|
}
|