package com.huyi.service.common.companyAcc.controller;


import com.huyi.service.common.companyAcc.service.CompanyAccService;
import com.tianhu.common.core.utils.CommonUtil;
import com.tianhu.common.core.web.controller.BaseController;
import com.tianhu.common.core.web.domain.AjaxResult;
import com.tianhu.common.security.service.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 企业账户controller
 *
 * @author ch
 * @date 2021-8-16
 */

@RestController
@RequestMapping("/companyAcc")
public class companyAccController extends BaseController {
    @Autowired
    private TokenService tokenService;
    @Autowired
    private CompanyAccService companyAccService;

    /**
     * 查询核心企业还款账户
     * @return
     */
    @GetMapping("/list/{zfpcrAccount}")
    public AjaxResult list(@PathVariable String zfpcrAccount) {
        Map map = new HashMap();
        if (CommonUtil.isNotEmpty(zfpcrAccount)) {
            map.put("zfpcrAccount", zfpcrAccount);
        }
        List<Map> list = companyAccService.selectCompanyAccList(map);
        return AjaxResult.success(list);
    }


}
