package com.crm.custom.controller;

import com.crm.custom.service.SysReasonsRefusalFeignService;
import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.system.reasons.refusal.SysReasonsRefusalSearchDto;
import com.crm.rely.backend.core.entity.system.reasons.refusal.SysReasonsRefusalSearchEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 拒绝理由
 *
 * @author houn
 */
@RestController
@RequestMapping("/reasons/refusal")
public class SysReasonsRefusalController {

    @Autowired
    private SysReasonsRefusalFeignService sysReasonsRefusalFeignService;


    @PostMapping("/list")
    public BaseResultDto<Map<String, SysReasonsRefusalSearchDto>> customList(@RequestBody @Validated SysReasonsRefusalSearchEntity entity) throws Exception {

        BaseResultDto<Map<String, SysReasonsRefusalSearchDto>> result = sysReasonsRefusalFeignService.customList(entity);

        return result;
    }
}
