package com.bonus.canteen.core.allocation.canteen.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bonus.canteen.core.allocation.canteen.param.AllocOtherPageParam;
import com.bonus.canteen.core.allocation.canteen.service.AllocLabelService;
import com.bonus.canteen.core.allocation.canteen.vo.AllocLabelVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
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;

@RestController
@RequestMapping({"/api/v2/alloc/label"})
@Api(
   tags = {"lsh_标签控制器"}
)
public class AllocLabelController {
   private static final Logger log = LoggerFactory.getLogger(AllocLabelController.class);
   @Autowired
   @Lazy
   private AllocLabelService allocLabelService;

   @ApiOperation("分页查询标签列表")
   @PostMapping({"/page"})
//   @RequiresGuest
   public Page<AllocLabelVO> pageLabel(@RequestBody AllocOtherPageParam request) {
      return this.allocLabelService.pageLabel(request);
   }

//   @ApiOperation("查询所有标签名称")
//   @PostMapping({"/list-name"})
//   @RequiresGuest
//   public List<String> listLabelName() {
//      return this.allocLabelService.listLabelName();
//   }
//
//   @ApiOperation("查询食堂/档口关联的标签名称列表")
//   @PostMapping({"/list-relation-name"})
//   public List<String> listRelationLabelName(@RequestBody LeRequest<AllocCanteenStallParam> request) {
//      return this.allocLabelService.listRelationLabelName((AllocCanteenStallParam)request.getContent());
//   }
//
//   @ApiOperation("新增标签")
//   @PostMapping({"/add"})
//   @RequiresGuest
//   public void addLabel(@RequestBody LeRequest<String> request) {
//      this.allocLabelService.addLabel((String)request.getContent());
//   }
//
//   @ApiOperation("修改标签")
//   @PostMapping({"/update"})
//   @RequiresGuest
//   public void updateLabel(@RequestBody @Valid LeRequest<AllocLabelDTO> request) {
//      this.allocLabelService.updateLabel((AllocLabelDTO)request.getContent());
//   }
//
//   @ApiOperation("删除标签")
//   @PostMapping({"/remove"})
//   @RequiresGuest
//   public void removeLabel(@RequestBody LeRequest<String> request) {
//      this.allocLabelService.removeLabel((String)request.getContent());
//   }
}
