package cn.com.ctop.kuaishou.modules.label.controller;

import cn.com.ctop.kuaishou.modules.label.service.MaterialLabelService;
import org.apache.ibatis.annotations.Param;
import org.jeecg.common.api.vo.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description: 标签管理
 * @Author: zzy
 * @Date: 2021-07-30
 * @Version: V1.0
 */
@RestController
@RequestMapping("/label")
public class LbelController {


    @Resource
    MaterialLabelService materialTagService;

    /**
     * 查询所有指标数据
     *
     * @param
     * @return
     */
    @GetMapping("/filterMaterial")
    public Result createCleanTemplate(@Param("type") String type) {
        return materialTagService.filterMaterial(type);
    }

    /**
     * 根据指标数据打标签
     *
     * @param
     * @return
     */
    @GetMapping("/materialSpecificationLabel")
    public Result materialSpecificationLabel(@Param("type") String type) {
        return materialTagService.materialSpecificationLabel(type);
    }

    /**
     * 同步标签到ES
     *
     * @param
     * @return
     */
    @GetMapping("/SynchronousLabel")
    public Result SynchronousLabel(@Param("type") String type) {
        return materialTagService.SynchronousLabel(type);
    }
}
