package com.tuoheng.controller;

import com.tuoheng.service.DictService;
import com.tuoheng.until.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author xiaoying
 * @Date 2023/6/2 16:29
 */
@RestController
@RequestMapping("/dict")
public class DictController {

    @Autowired
    private DictService dictService;

    /**
     * 初始化平台对应字典数据
     *
     * @param code 平台code
     * @return
     */
    @PostMapping("/init")
    public JsonResult init(String code) {
        return dictService.init(code);

    }

}
