设备操作相关接口,以及用户充值卡相关接口修改
This commit is contained in:
@ -0,0 +1,15 @@
|
||||
package com.fastbee.iot.model.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DeviceOperationDTO {
|
||||
|
||||
private Long productId;
|
||||
|
||||
private String deviceNumber;
|
||||
|
||||
private String operationType;
|
||||
|
||||
private String operationCode;
|
||||
}
|
@ -5,6 +5,8 @@ import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||
import com.fastbee.common.exception.ServiceException;
|
||||
import com.fastbee.iot.domain.Device;
|
||||
import com.fastbee.iot.mapper.DeviceMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fastbee.iot.mapper.DeviceReportInfoMapper;
|
||||
@ -24,6 +26,10 @@ public class DeviceReportInfoServiceImpl implements IDeviceReportInfoService
|
||||
private DeviceReportInfoMapper deviceReportInfoMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
private DeviceMapper deviceMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询设备上电审核前上报的基础信息
|
||||
*
|
||||
@ -81,7 +87,26 @@ public class DeviceReportInfoServiceImpl implements IDeviceReportInfoService
|
||||
if(deviceReportInfo.getAutoReview()!=null&&deviceReportInfo.getAutoReview()){
|
||||
deviceReportInfo.setStatus(2);//修改状态为已审核
|
||||
}
|
||||
return deviceReportInfoMapper.insertDeviceReportInfo(deviceReportInfo);
|
||||
int inserted = deviceReportInfoMapper.insertDeviceReportInfo(deviceReportInfo);
|
||||
|
||||
if(inserted<1){
|
||||
throw new ServiceException("插入设备上报信息失败!");
|
||||
}
|
||||
// //插入成功后,插入设备信息
|
||||
// Device device= new Device();
|
||||
// device.setDeviceName(deviceReportInfo.getName());
|
||||
// device.setSerialNumber(deviceReportInfo.getSerialNumber());
|
||||
// //TODO 弄成活的
|
||||
// device.setProductId(146L);
|
||||
// device.setStatus(1);//未激活
|
||||
// device.setCreateTime(deviceReportInfo.getPowersTime());
|
||||
// device.setTenantId(1L);//默认总管理员
|
||||
// int inserted1 = deviceMapper.insert(device);
|
||||
// if(inserted1<1){
|
||||
// throw new ServiceException("插入设备信息失败!");
|
||||
// }
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user