2 changed files with 118 additions and 16 deletions
-
16src/main/java/com/example/demo/controller/cash/Bank.java
-
118src/main/java/com/example/demo/controller/cash/BankController.java
@ -1,16 +0,0 @@ |
|||||
package com.example.demo.controller.cash; |
|
||||
|
|
||||
/** |
|
||||
* @program: gold-java |
|
||||
* @ClassName Bank |
|
||||
* @description: |
|
||||
* @author: Double |
|
||||
* @create: 2025−11-17 13:31 |
|
||||
* @Version 1.0 |
|
||||
**/ |
|
||||
|
|
||||
public class Bank { |
|
||||
|
|
||||
|
|
||||
|
|
||||
} |
|
||||
@ -0,0 +1,118 @@ |
|||||
|
package com.example.demo.controller.cash; |
||||
|
|
||||
|
import com.example.demo.config.interfac.Log; |
||||
|
import com.example.demo.domain.DTO.BankDTO; |
||||
|
import com.example.demo.domain.vo.cash.BankVO; |
||||
|
import com.example.demo.domain.vo.coin.Result; |
||||
|
import com.example.demo.service.cash.BankService; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
/** |
||||
|
* @program: gold-java |
||||
|
* @ClassName Bank |
||||
|
* @description: |
||||
|
* @author: Double |
||||
|
* @create: 2025−11-17 13:31 |
||||
|
* @Version 1.0 |
||||
|
**/ |
||||
|
|
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("/bank") |
||||
|
@RequiredArgsConstructor |
||||
|
@Slf4j |
||||
|
@CrossOrigin |
||||
|
public class BankController { |
||||
|
|
||||
|
@Autowired |
||||
|
private BankService bankService; |
||||
|
|
||||
|
//payment银行接口(批量) |
||||
|
@Log("payment银行接口(批量)") |
||||
|
@PostMapping("/paymentAuto") |
||||
|
public Result paymentAuto(@RequestBody BankDTO bankDTO) { |
||||
|
try { |
||||
|
return Result.success(bankService.paymentAuto(bankDTO)); |
||||
|
} catch (Exception e) { |
||||
|
return Result.error(e.getMessage()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//payment银行接口(单个) |
||||
|
@Log("payment银行接口(单个)") |
||||
|
@PostMapping("/getPayment") |
||||
|
public Result getPayment(@RequestBody BankDTO bankDTO) { |
||||
|
try { |
||||
|
if (bankDTO.getTime().isEmpty() || bankDTO.getOrderNo().isEmpty()) { |
||||
|
return Result.error("时间或订单号为空"); |
||||
|
} |
||||
|
return bankService.getPayment(bankDTO); |
||||
|
} catch (Exception e) { |
||||
|
return Result.error(e.getMessage()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//stripe银行接口(批量) |
||||
|
@Log("stripe银行接口(批量)") |
||||
|
@PostMapping("/stripeAuto") |
||||
|
public Result stripeAuto(@RequestBody BankDTO bankDTO) { |
||||
|
try { |
||||
|
return Result.success(bankService.stripeAuto(bankDTO)); |
||||
|
} catch (Exception e) { |
||||
|
return Result.error(e.getMessage()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//stripe银行接口(单个) |
||||
|
@Log("stripe银行接口(单个)") |
||||
|
@PostMapping("/getStripe") |
||||
|
public Result getStripe(@RequestBody BankDTO bankDTO) { |
||||
|
try { |
||||
|
if (bankDTO.getOrderNo().isEmpty()) { |
||||
|
return Result.error("订单号为空"); |
||||
|
} |
||||
|
return bankService.getStripe(bankDTO); |
||||
|
} catch (Exception e) { |
||||
|
return Result.error(e.getMessage()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//stripe银行接口(批量) |
||||
|
@Log("firstdata银行接口(批量)") |
||||
|
@PostMapping("/firstdataAuto") |
||||
|
public Result firstdataAuto(@RequestBody BankDTO bankDTO) { |
||||
|
try { |
||||
|
return Result.success(bankService.firstdataAuto(bankDTO)); |
||||
|
} catch (Exception e) { |
||||
|
return Result.error(e.getMessage()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//stripe银行接口(单个) |
||||
|
@Log("firstdata银行接口(单个)") |
||||
|
@PostMapping("/getFirstdata") |
||||
|
public Result getFirstdata(@RequestBody BankDTO bankDTO) { |
||||
|
try { |
||||
|
if (bankDTO.getOrderNo().isEmpty()) { |
||||
|
return Result.error("订单号为空"); |
||||
|
} |
||||
|
return bankService.getFirstdata(bankDTO); |
||||
|
} catch (Exception e) { |
||||
|
return Result.error(e.getMessage()); |
||||
|
} |
||||
|
} |
||||
|
//stripe银行接口(批量) |
||||
|
@Log("ipay银行接口(批量)") |
||||
|
@PostMapping("/ipayAuto") |
||||
|
public Result ipayAuto(@RequestBody BankDTO bankDTO) { |
||||
|
try { |
||||
|
return Result.success(bankService.ipayAuto(bankDTO)); |
||||
|
} catch (Exception e) { |
||||
|
return Result.error(e.getMessage()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue