WebCreditGrantingRiskController.java 1.68 KB
package com.lhcredit.project.webbusiness.controller;

import java.util.Date;
import java.util.List;

import com.lhcredit.common.utils.StringUtils;
import com.lhcredit.common.utils.security.ShiroUtils;
import com.lhcredit.framework.aspectj.lang.enums.OperatorType;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.lhcredit.framework.aspectj.lang.annotation.Log;
import com.lhcredit.framework.aspectj.lang.enums.BusinessType;
import com.lhcredit.project.business.creditGrantingRisk.domain.CreditGrantingRisk;
import com.lhcredit.project.business.creditGrantingRisk.service.ICreditGrantingRiskService;
import com.lhcredit.framework.web.controller.BaseController;
import com.lhcredit.framework.web.domain.AjaxResult;


/**
 * 授信风险信息对外接口
 *
 * @author lhcredit
 * @date 2024-06-11
 */
@RestController
@RequestMapping("/web/creditGrantingRisk")
public class WebCreditGrantingRiskController extends BaseController {
    @Autowired
    private ICreditGrantingRiskService creditGrantingRiskService;

    /**
     * 查询授信风险详情接口
     */
    @ApiOperation("查询授信风险详情")
    @Log(title = "授信风险", businessType = BusinessType.DETAIL, operatorType = OperatorType.WEB)
    @RequestMapping("/find")
    public AjaxResult detail(Long cgId) {
        CreditGrantingRisk creditGrantingRisk =creditGrantingRiskService.findByCgId(cgId);
        if (StringUtils.isNull(creditGrantingRisk)) {
            return AjaxResult.error("该信息不存在");
        }
        return toAjax(creditGrantingRisk);
    }



}