BankAccountController.java 1.32 KB
package com.glsx.usedcar.web.api;

import com.glsx.usedcar.module.finance.entity.BankAccount;
import com.glsx.usedcar.module.finance.service.BankAccountService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * 银行账户(BankAccount) PI接口
 *
 * @since 2025-10-19 11:05:09
 */
@Slf4j
@RestController
@RequestMapping("/api/bankAccount")
public class BankAccountController {

    /**
     * BankAccount服务对象
     */
    @Resource
    private BankAccountService bankAccountService;


    /**
     * 根据id查询银行账户
     *
     * @param accountId
     * @return
     */
    @GetMapping("getBankAccountById")
    public BankAccount getBankAccountById(@RequestParam int accountId) {
        return bankAccountService.getBankAccountById(accountId);
    }


    /**
     * 查询全部启用$银行账户
     *
     * @return
     */
    @GetMapping("getEnableBankAccount")
    public BankAccount getEnableBankAccount(@RequestParam BankAccount.AccountType accountType) {
        return bankAccountService.getEnabledBankAccountByType(accountType);
    }


}