package com.fs.qw.controller;

import com.fs.common.core.controller.BaseController;
import com.fs.common.core.page.TableDataInfo;
import com.fs.qw.domain.QwTagGroup;
import com.fs.qw.service.IQwTagGroupService;
import com.fs.qw.vo.QwTagGroupListVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 企微客户标签组Controller
 *
 * @author fs
 * @date 2024-06-20
 */
@RestController
@RequestMapping("/qw/tagGroup")
public class QwTagGroupController extends BaseController
{
    @Autowired
    private IQwTagGroupService qwTagGroupService;

    @Autowired
    private RedisTemplate redisTemplate;

    /**
    * 所有标签列表
    */
    @GetMapping("/allList")
    public TableDataInfo allList(QwTagGroup qwTagGroup)
    {
        startPage();

        List<QwTagGroupListVO> list = qwTagGroupService.selectQwTagGroupListVO(qwTagGroup);
        return getDataTable(list);
    }

    /**
     * 所有标签列表（无分页）
     * @param qwTagGroup
     * @return
     */
    @GetMapping("/getAllList")
    public TableDataInfo getAllList(QwTagGroup qwTagGroup)
    {
        List<QwTagGroupListVO> list = qwTagGroupService.selectQwTagGroupListVO(qwTagGroup);
        return getDataTable(list);
    }
}
