修改设备管理的列表显示和详情显示
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
This commit is contained in:
parent
b136bb0707
commit
0b378f2f21
@ -66,6 +66,12 @@ public class DeviceController {
|
|||||||
DeviceDO device = deviceService.getDevice(id);
|
DeviceDO device = deviceService.getDevice(id);
|
||||||
return success(BeanUtils.toBean(device, DeviceRespVO.class));
|
return success(BeanUtils.toBean(device, DeviceRespVO.class));
|
||||||
}
|
}
|
||||||
|
@GetMapping("/getDeviceId")
|
||||||
|
@Operation(summary = "根据设备编号获得设备详情")
|
||||||
|
public CommonResult<DeviceRespVO> getDeviceId(@RequestParam("devicecode") Integer devicecode) {
|
||||||
|
DeviceDO device = deviceService.getDeviceId(devicecode);
|
||||||
|
return success(BeanUtils.toBean(device, DeviceRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "获得设备分页")
|
@Operation(summary = "获得设备分页")
|
||||||
|
|||||||
@ -15,12 +15,11 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
|||||||
@TableName("tb_device")
|
@TableName("tb_device")
|
||||||
@KeySequence("tb_device_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
@KeySequence("tb_device_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@Builder
|
@Builder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class DeviceDO extends BaseDO {
|
public class DeviceDO {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键ID
|
* 主键ID
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|||||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.device.DeviceDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.device.DeviceDO;
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.device.vo.*;
|
import cn.iocoder.yudao.module.system.controller.admin.device.vo.*;
|
||||||
|
|
||||||
@ -15,6 +16,7 @@ import cn.iocoder.yudao.module.system.controller.admin.device.vo.*;
|
|||||||
* @author 全智安
|
* @author 全智安
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
public interface DeviceMapper extends BaseMapperX<DeviceDO> {
|
public interface DeviceMapper extends BaseMapperX<DeviceDO> {
|
||||||
|
|
||||||
default PageResult<DeviceDO> selectPage(DevicePageReqVO reqVO) {
|
default PageResult<DeviceDO> selectPage(DevicePageReqVO reqVO) {
|
||||||
|
|||||||
@ -43,6 +43,10 @@ public interface DeviceService {
|
|||||||
* @return 设备
|
* @return 设备
|
||||||
*/
|
*/
|
||||||
DeviceDO getDevice(Integer id);
|
DeviceDO getDevice(Integer id);
|
||||||
|
/*
|
||||||
|
* 根据设备编号查询设备
|
||||||
|
* */
|
||||||
|
DeviceDO getDeviceId(Integer devicecode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得设备分页
|
* 获得设备分页
|
||||||
|
|||||||
@ -3,13 +3,10 @@ package cn.iocoder.yudao.module.system.service.device;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.device.vo.*;
|
import cn.iocoder.yudao.module.system.controller.admin.device.vo.*;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.device.DeviceDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.device.DeviceDO;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.system.dal.mysql.device.DeviceMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.device.DeviceMapper;
|
||||||
@ -65,6 +62,10 @@ public class DeviceServiceImpl implements DeviceService {
|
|||||||
public DeviceDO getDevice(Integer id) {
|
public DeviceDO getDevice(Integer id) {
|
||||||
return deviceMapper.selectById(id);
|
return deviceMapper.selectById(id);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public DeviceDO getDeviceId(Integer devicecode) {
|
||||||
|
return deviceMapper.selectOne(DeviceDO::getDevicecode, devicecode);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<DeviceDO> getDevicePage(DevicePageReqVO pageReqVO) {
|
public PageResult<DeviceDO> getDevicePage(DevicePageReqVO pageReqVO) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user