package com.bonus.bracelet.controller;

import com.bonus.bracelet.mapper.DeviceLyRecordMapper;
import com.bonus.bracelet.service.IDeviceLyRecordService;
import com.bonus.bracelet.service.IEquipmentReqService;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.web.page.TableDataInfo;
import com.bonus.common.entity.bracelet.BraceletParamsDto;
import com.bonus.common.entity.bracelet.vo.EquipmentReqDataVo;
import com.bonus.common.entity.bracelet.vo.EquipmentReqVo;
import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.log.enums.OperaType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @className:DeviceLyRecordController
 * @description:设备领用记录-web层
 */
@RestController
@RequestMapping("/deviceLyRecord/")
@Slf4j
public class DeviceLyRecordController extends BaseController {

    @Resource(name = "IDeviceLyRecordService")
    private IDeviceLyRecordService service;

//    @RequiresPermissions("basic:equipmentReq:list")
    @GetMapping("list")
    @SysLog(title = "综合查询", businessType = OperaType.QUERY,module = "综合查询->设备领用记录",details ="查询设备领用记录列表")
    public TableDataInfo list(EquipmentReqVo dto) {
        startPage();
        List<EquipmentReqVo> list = service.getEquipmentReqLists(dto);
        return getDataTable(list);
    }

}
