package com.sptg.gateway.controller;

import com.sptg.common.core.beans.ResultBean;
import com.sptg.permissions.api.entity.Dict;
import com.sptg.permissions.api.feigns.DictFeign;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * Created By lidexi in 2021/3/19
 **/
@RestController
@RequestMapping(value = "/app/permissions/dict")
@AllArgsConstructor
public class DictController {

    private final DictFeign dictFeign;

    @PostMapping(value = "/getByCode")
    public ResultBean<Dict> getByCode(@RequestParam(value = "code")String code){
        return this.dictFeign.getByCode(code);
    }

}
