package com.sifang.modules.smallprogram;

import com.sifang.modules.customer.Service.HuaRongBankCardService;
import com.sifang.modules.sunshine.SystemSetting.utils.BusinessException;
import com.sifang.modules.sunshine.SystemSetting.utils.Result;
import com.sifang.modules.sys.web.BaseExceptionController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @title: HuaRongBankCardController
 * @Author Tan
 * @Date: 2024/7/12 19:55
 * @Version 1.0
 */
@Controller
@RequestMapping(value = "${adminPath}/main/huaRongBankCard")
public class HuaRongBankCardController extends BaseExceptionController {

    @Autowired
    private HuaRongBankCardService huaRongBankCardService;

    @ResponseBody
    @RequestMapping(value = "viewBankCardByIdCode")
    public Result viewBankCardByIdCode(String partnerId, String IdCode){
        Result result = null;
        try {
            result = huaRongBankCardService.viewBankCardByIdCode(partnerId,IdCode);
        } catch (BusinessException e) {
            return Result.fail(e.getMessage());
        } catch (Exception e) {
            return Result.fail("操作失败");
        }
        return result;
    }

}