package com.ruoyi.web.controller.mch;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.ss.device.domain.vo.DeviceVO;
import com.ruoyi.ss.device.service.DeviceService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wjh
 * 2024/7/30
 */
@RestController
@RequestMapping("/mch/device")
public class MchDeviceController extends BaseController {

    @Autowired
    private DeviceService deviceService;

    @ApiOperation("商户通过设备IDS查询")
    @GetMapping("/listByIds/{ids}")
    public AjaxResult listByIds(@PathVariable List<Long> ids)
    {
        List<DeviceVO> list = deviceService.selectByIds(ids, getUserId());
        return success(list);
    }

}
