feat: 增加设备类型相关接口
parent
71486090ba
commit
5b91a516ad
@ -0,0 +1,36 @@
|
|||||||
|
package com.shxy.xymanager_admin.controller;
|
||||||
|
|
||||||
|
import com.shxy.xymanager_common.base.BaseController;
|
||||||
|
import com.shxy.xymanager_common.base.ResponseReult;
|
||||||
|
import com.shxy.xymanager_common.entity.DevType;
|
||||||
|
import com.shxy.xymanager_common.entity.DevTypeExample;
|
||||||
|
import com.shxy.xymanager_dao.dao.DevTypeDao;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Api(tags = {"设备类型相关接口"})
|
||||||
|
@RequestMapping("devtype")
|
||||||
|
@Slf4j
|
||||||
|
public class DevTypeController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
DevTypeDao devTypeDao;
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
@ApiOperation("查询列表")
|
||||||
|
public ResponseReult<List<DevType>> list() {
|
||||||
|
DevTypeExample example = new DevTypeExample();
|
||||||
|
example.createCriteria();
|
||||||
|
List<DevType> list = devTypeDao.selectByExample(example);
|
||||||
|
return ResponseReult.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue