package org.springblade.modules.app.web;


import org.springblade.common.auth.permission.DisableLoginVerify;
import com.wn.common.controller.BaseController;
import com.wn.common.datamodel.ResultDTO;
import org.springblade.modules.app.aspect.ClientLogin;
import org.springblade.modules.app.common.dto.SlaughterBuyerRelationLogDTO;
import org.springblade.modules.app.common.dto.UserDTO;
import org.springblade.modules.app.manager.SlaughterBuyerRelationLogManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import java.util.List;

/**
 * <p>
 * 代宰户与屠宰场绑定记录表 前端控制器
 * </p>
 *
 * @author zhangK
 * @since 2022-01-13
 */
@RestController
@RequestMapping("app/relation/log")
@Api(value = "代、屠绑定记录", tags = "代、屠绑定记录")
public class SlaughterBuyerRelationLogController extends BaseController {

    @Autowired
    private SlaughterBuyerRelationLogManager slaughterBuyerRelationLogManager;

    //@ApiOperation(value = "查询绑定记录列表(代、屠共用)")
    @GetMapping("/list")
    @DisableLoginVerify
    @ClientLogin
    public ResponseEntity<ResultDTO<List<SlaughterBuyerRelationLogDTO>>> list(@ApiIgnore UserDTO userDTO) {
        return success(slaughterBuyerRelationLogManager.list(userDTO));
    }
}

