package com.ruoyi.web.controller.app;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.ss.model.domain.SmModelQuery;
import com.ruoyi.ss.model.service.ModelService;
import com.ruoyi.web.core.annotation.DeviceAdminRequired;
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.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wjh
 * 2024/7/22
 */
@RestController
@RequestMapping("/app/model")
public class AppModelController extends BaseController {

    @Autowired
    private ModelService modelService;

    @ApiOperation("获取全部型号列表")
    @DeviceAdminRequired
    @GetMapping("/all")
    public AjaxResult getAllModel(SmModelQuery query) {
        return success(modelService.selectSmModelList(query));
    }

}
