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

import com.huyi.service.common.financeProduct.service.FinanceProductService;
import com.tianhu.common.core.domain.R;
import com.tianhu.common.core.utils.CommonUtil;
import com.tianhu.common.core.web.controller.BaseController;
import com.tianhu.common.security.service.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

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


/**
 * 融资产品Controller
 *
 * @author pxh
 * @date 2021-02-04
 */

@RestController
@RequestMapping("/commonFinanceProduct")
public class FinanceProductController extends BaseController {
    @Autowired
    private TokenService tokenService;
    @Autowired
    private FinanceProductService financeProductService;
     /**
     * 查询融资产品列表
     */
    @GetMapping("/list/{zfpcrProductId}")
    public R list(@PathVariable String zfpcrProductId) {
        //查询当前操作员
        Map map = new HashMap();
        if (CommonUtil.isNotEmpty(zfpcrProductId)) {
            map.put("zfpId", zfpcrProductId);
        }
        List<Map> list = financeProductService.selectFinanceProductList(map);
        return R.ok(list);
    }
}

