设备上电审核前上报的基础信息表管理接口
This commit is contained in:
@ -108,7 +108,6 @@ public class AgricultureCropYieldServiceImpl implements IAgricultureCropYieldSer
|
||||
Map<String, List<AgricultureCropYield>> collect = list.stream().collect(Collectors.groupingBy(AgricultureCropYield::getHarvestMonth));
|
||||
List<HashMap<String, Object>> result = new ArrayList<>();
|
||||
collect.forEach((month, cropYieldList) -> {
|
||||
System.out.println("月份: " + month);
|
||||
HashMap<String, Object> props = new HashMap<>();
|
||||
props.put("name", month+"月");
|
||||
props.put("value",cropYieldList.get(0).getYieldValue());
|
||||
|
@ -1,18 +1,15 @@
|
||||
package com.fastbee.ggroup.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||
import com.fastbee.ggroup.domain.GSites;
|
||||
import com.fastbee.ggroup.domain.dto.GSiteDeviceDto;
|
||||
import com.fastbee.ggroup.domain.vo.GSiteDeviceVo;
|
||||
import com.fastbee.ggroup.mapper.GSitesMapper;
|
||||
import com.fastbee.iot.domain.Device;
|
||||
import com.fastbee.iot.domain.Group;
|
||||
import com.fastbee.iot.mapper.DeviceMapper;
|
||||
import com.fastbee.iot.mapper.GroupMapper;
|
||||
import com.github.yulichang.query.MPJLambdaQueryWrapper;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -0,0 +1,93 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 设备上电审核前上报的基础信息对象 iot_device_report_info
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-05
|
||||
*/
|
||||
@ApiModel(value = "DeviceReportInfo",description = "设备上电审核前上报的基础信息 iot_device_report_info")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DeviceReportInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 模组IMEI号 */
|
||||
@Excel(name = "模组IMEI号")
|
||||
@ApiModelProperty("模组IMEI号")
|
||||
private String imei;
|
||||
|
||||
/** 流量卡iccid */
|
||||
@Excel(name = "流量卡iccid")
|
||||
@ApiModelProperty("流量卡iccid")
|
||||
private String iccid;
|
||||
|
||||
/** MCU唯一id */
|
||||
@Excel(name = "MCU唯一id")
|
||||
@ApiModelProperty("MCU唯一id")
|
||||
private String mcuId;
|
||||
|
||||
/** 硬件板型 */
|
||||
@Excel(name = "硬件板型")
|
||||
@ApiModelProperty("硬件板型")
|
||||
private String bspType;
|
||||
|
||||
/** 模组型号 */
|
||||
@Excel(name = "模组型号")
|
||||
@ApiModelProperty("模组型号")
|
||||
private String lteType;
|
||||
|
||||
/** MCU型号 */
|
||||
@Excel(name = "MCU型号")
|
||||
@ApiModelProperty("MCU型号")
|
||||
private String mcuType;
|
||||
|
||||
/** MCU固件,包含了固件的名称和版本 */
|
||||
@Excel(name = "MCU固件,包含了固件的名称和版本")
|
||||
@ApiModelProperty("MCU固件,包含了固件的名称和版本")
|
||||
private String mcufw;
|
||||
|
||||
/** 模组固件,包含了固件的名称和版本 */
|
||||
@Excel(name = "模组固件,包含了固件的名称和版本")
|
||||
@ApiModelProperty("模组固件,包含了固件的名称和版本")
|
||||
private String ltefw;
|
||||
|
||||
/** 显示屏厂家,上报1,2,3等类似的数值,通过后台进行录入数值和显示屏厂家对应关系例:1对应GT2116 */
|
||||
@Excel(name = "显示屏厂家,上报1,2,3等类似的数值,通过后台进行录入数值和显示屏厂家对应关系例:1对应GT2116")
|
||||
@ApiModelProperty("显示屏厂家,上报1,2,3等类似的数值,通过后台进行录入数值和显示屏厂家对应关系例:1对应GT2116")
|
||||
private Long lcdManufacturer;
|
||||
|
||||
/** 语音厂家,上报1,2,3等类似的数值,通过后台进行录入数值和语音厂家对应关系例:1对应 */
|
||||
@Excel(name = "语音厂家,上报1,2,3等类似的数值,通过后台进行录入数值和语音厂家对应关系例:1对应")
|
||||
@ApiModelProperty("语音厂家,上报1,2,3等类似的数值,通过后台进行录入数值和语音厂家对应关系例:1对应")
|
||||
private Long voiceManufacturer;
|
||||
|
||||
/** FRAM型号 */
|
||||
@Excel(name = "FRAM型号")
|
||||
@ApiModelProperty("FRAM型号")
|
||||
private String framModel;
|
||||
|
||||
/** 代工厂家,上报1,2,3等类似的数值,通过后台进行录入数值和代工厂家对应关系例:1对应 */
|
||||
@Excel(name = "代工厂家,上报1,2,3等类似的数值,通过后台进行录入数值和代工厂家对应关系例:1对应")
|
||||
@ApiModelProperty("代工厂家,上报1,2,3等类似的数值,通过后台进行录入数值和代工厂家对应关系例:1对应")
|
||||
private Long replaceManufacturer;
|
||||
|
||||
/** 记录测试的过程,包括了测试脉冲次数、第一次上电时间等待补充信息 */
|
||||
@Excel(name = "记录测试的过程,包括了测试脉冲次数、第一次上电时间等待补充信息")
|
||||
@ApiModelProperty("记录测试的过程,包括了测试脉冲次数、第一次上电时间等待补充信息")
|
||||
private String testRecord;
|
||||
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.DeviceReportInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
/**
|
||||
* 设备上电审核前上报的基础信息Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-05
|
||||
*/
|
||||
@Mapper
|
||||
public interface DeviceReportInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备上电审核前上报的基础信息
|
||||
*
|
||||
* @param id 设备上电审核前上报的基础信息主键
|
||||
* @return 设备上电审核前上报的基础信息
|
||||
*/
|
||||
public DeviceReportInfo selectDeviceReportInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询设备上电审核前上报的基础信息列表
|
||||
*
|
||||
* @param deviceReportInfo 设备上电审核前上报的基础信息
|
||||
* @return 设备上电审核前上报的基础信息集合
|
||||
*/
|
||||
public List<DeviceReportInfo> selectDeviceReportInfoList(DeviceReportInfo deviceReportInfo);
|
||||
|
||||
/**
|
||||
* 新增设备上电审核前上报的基础信息
|
||||
*
|
||||
* @param deviceReportInfo 设备上电审核前上报的基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceReportInfo(DeviceReportInfo deviceReportInfo);
|
||||
|
||||
/**
|
||||
* 修改设备上电审核前上报的基础信息
|
||||
*
|
||||
* @param deviceReportInfo 设备上电审核前上报的基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceReportInfo(DeviceReportInfo deviceReportInfo);
|
||||
|
||||
/**
|
||||
* 删除设备上电审核前上报的基础信息
|
||||
*
|
||||
* @param id 设备上电审核前上报的基础信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceReportInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除设备上电审核前上报的基础信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceReportInfoByIds(Long[] ids);
|
||||
}
|
@ -2,8 +2,12 @@ package com.fastbee.iot.model;
|
||||
|
||||
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import lombok.Getter;
|
||||
|
||||
public class ProductAuthenticateModel {
|
||||
import java.io.Serializable;
|
||||
|
||||
@Getter
|
||||
public class ProductAuthenticateModel implements Serializable {
|
||||
/** 产品分类ID */
|
||||
private Long deviceId;
|
||||
|
||||
@ -39,98 +43,50 @@ public class ProductAuthenticateModel {
|
||||
|
||||
private int vertificateMethod;
|
||||
|
||||
public int getVertificateMethod() {
|
||||
return vertificateMethod;
|
||||
}
|
||||
|
||||
public void setVertificateMethod(int vertificateMethod) {
|
||||
this.vertificateMethod = vertificateMethod;
|
||||
}
|
||||
|
||||
public Integer getIsAuthorize() {
|
||||
return isAuthorize;
|
||||
}
|
||||
|
||||
public void setIsAuthorize(Integer isAuthorize) {
|
||||
this.isAuthorize = isAuthorize;
|
||||
}
|
||||
|
||||
public int getProductStatus() {
|
||||
return productStatus;
|
||||
}
|
||||
|
||||
public void setProductStatus(int productStatus) {
|
||||
this.productStatus = productStatus;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public Long getProductId() {
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setProductId(Long productId) {
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getSerialNumber() {
|
||||
return serialNumber;
|
||||
}
|
||||
|
||||
public void setSerialNumber(String serialNumber) {
|
||||
this.serialNumber = serialNumber;
|
||||
}
|
||||
|
||||
public String getMqttAccount() {
|
||||
return mqttAccount;
|
||||
}
|
||||
|
||||
public void setMqttAccount(String mqttAccount) {
|
||||
this.mqttAccount = mqttAccount;
|
||||
}
|
||||
|
||||
public String getMqttPassword() {
|
||||
return mqttPassword;
|
||||
}
|
||||
|
||||
public void setMqttPassword(String mqttPassword) {
|
||||
this.mqttPassword = mqttPassword;
|
||||
}
|
||||
|
||||
public String getMqttSecret() {
|
||||
return mqttSecret;
|
||||
}
|
||||
|
||||
public void setMqttSecret(String mqttSecret) {
|
||||
this.mqttSecret = mqttSecret;
|
||||
}
|
||||
|
@ -29,6 +29,11 @@ public class MqttClientFactory {
|
||||
return client;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建mqtt实例
|
||||
* @param config
|
||||
* @return
|
||||
*/
|
||||
public static MqttAsyncClient instanceNew(MqttClientConfig config) {
|
||||
MqttAsyncClient client = null;
|
||||
try {
|
||||
@ -40,12 +45,18 @@ public class MqttClientFactory {
|
||||
options.setAutomaticReconnect(true);
|
||||
IMqttToken token = client.connect(options);
|
||||
token.waitForCompletion();
|
||||
log.info("=>mqtt客户端创建成功!!!!!,key:{},host:{}", config.getKey(), config.getHostUrl());
|
||||
} catch (MqttException e) {
|
||||
log.error("=>mqtt客户端创建错误,原因:" + e.getMessage());
|
||||
}
|
||||
return client;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加订阅
|
||||
* @param key key
|
||||
* @param topic 主题
|
||||
*/
|
||||
public static void addSubscribe(String key, String topic) {
|
||||
try {
|
||||
MqttAsyncClient client = CLIENT_CACHE.get(key);
|
||||
@ -66,6 +77,11 @@ public class MqttClientFactory {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消订阅
|
||||
* @param key key
|
||||
* @param topic 主题
|
||||
*/
|
||||
public static void delSubscribe(String key, String topic) {
|
||||
try {
|
||||
MqttAsyncClient client = CLIENT_CACHE.get(key);
|
||||
|
@ -0,0 +1,61 @@
|
||||
package com.fastbee.iot.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.DeviceReportInfo;
|
||||
|
||||
/**
|
||||
* 设备上电审核前上报的基础信息Service接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-05
|
||||
*/
|
||||
public interface IDeviceReportInfoService
|
||||
{
|
||||
/**
|
||||
* 查询设备上电审核前上报的基础信息
|
||||
*
|
||||
* @param id 设备上电审核前上报的基础信息主键
|
||||
* @return 设备上电审核前上报的基础信息
|
||||
*/
|
||||
public DeviceReportInfo selectDeviceReportInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询设备上电审核前上报的基础信息列表
|
||||
*
|
||||
* @param deviceReportInfo 设备上电审核前上报的基础信息
|
||||
* @return 设备上电审核前上报的基础信息集合
|
||||
*/
|
||||
public List<DeviceReportInfo> selectDeviceReportInfoList(DeviceReportInfo deviceReportInfo);
|
||||
|
||||
/**
|
||||
* 新增设备上电审核前上报的基础信息
|
||||
*
|
||||
* @param deviceReportInfo 设备上电审核前上报的基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceReportInfo(DeviceReportInfo deviceReportInfo);
|
||||
|
||||
/**
|
||||
* 修改设备上电审核前上报的基础信息
|
||||
*
|
||||
* @param deviceReportInfo 设备上电审核前上报的基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceReportInfo(DeviceReportInfo deviceReportInfo);
|
||||
|
||||
/**
|
||||
* 批量删除设备上电审核前上报的基础信息
|
||||
*
|
||||
* @param ids 需要删除的设备上电审核前上报的基础信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceReportInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除设备上电审核前上报的基础信息信息
|
||||
*
|
||||
* @param id 设备上电审核前上报的基础信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceReportInfoById(Long id);
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.fastbee.iot.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fastbee.iot.mapper.DeviceReportInfoMapper;
|
||||
import com.fastbee.iot.domain.DeviceReportInfo;
|
||||
import com.fastbee.iot.service.IDeviceReportInfoService;
|
||||
|
||||
/**
|
||||
* 设备上电审核前上报的基础信息Service业务层处理
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-05
|
||||
*/
|
||||
@Service
|
||||
public class DeviceReportInfoServiceImpl implements IDeviceReportInfoService
|
||||
{
|
||||
@Autowired
|
||||
private DeviceReportInfoMapper deviceReportInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询设备上电审核前上报的基础信息
|
||||
*
|
||||
* @param id 设备上电审核前上报的基础信息主键
|
||||
* @return 设备上电审核前上报的基础信息
|
||||
*/
|
||||
@Override
|
||||
public DeviceReportInfo selectDeviceReportInfoById(Long id)
|
||||
{
|
||||
return deviceReportInfoMapper.selectDeviceReportInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备上电审核前上报的基础信息列表
|
||||
*
|
||||
* @param deviceReportInfo 设备上电审核前上报的基础信息
|
||||
* @return 设备上电审核前上报的基础信息
|
||||
*/
|
||||
@Override
|
||||
public List<DeviceReportInfo> selectDeviceReportInfoList(DeviceReportInfo deviceReportInfo)
|
||||
{
|
||||
return deviceReportInfoMapper.selectDeviceReportInfoList(deviceReportInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备上电审核前上报的基础信息
|
||||
*
|
||||
* @param deviceReportInfo 设备上电审核前上报的基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDeviceReportInfo(DeviceReportInfo deviceReportInfo)
|
||||
{
|
||||
return deviceReportInfoMapper.insertDeviceReportInfo(deviceReportInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备上电审核前上报的基础信息
|
||||
*
|
||||
* @param deviceReportInfo 设备上电审核前上报的基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDeviceReportInfo(DeviceReportInfo deviceReportInfo)
|
||||
{
|
||||
return deviceReportInfoMapper.updateDeviceReportInfo(deviceReportInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备上电审核前上报的基础信息
|
||||
*
|
||||
* @param ids 需要删除的设备上电审核前上报的基础信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDeviceReportInfoByIds(Long[] ids)
|
||||
{
|
||||
return deviceReportInfoMapper.deleteDeviceReportInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备上电审核前上报的基础信息信息
|
||||
*
|
||||
* @param id 设备上电审核前上报的基础信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDeviceReportInfoById(Long id)
|
||||
{
|
||||
return deviceReportInfoMapper.deleteDeviceReportInfoById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fastbee.iot.mapper.DeviceReportInfoMapper">
|
||||
|
||||
<resultMap type="DeviceReportInfo" id="DeviceReportInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="imei" column="imei" />
|
||||
<result property="iccid" column="iccid" />
|
||||
<result property="mcuId" column="mcu_id" />
|
||||
<result property="bspType" column="bsp_type" />
|
||||
<result property="lteType" column="lte_type" />
|
||||
<result property="mcuType" column="mcu_type" />
|
||||
<result property="mcufw" column="mcuFw" />
|
||||
<result property="ltefw" column="lteFw" />
|
||||
<result property="lcdManufacturer" column="lcd_manufacturer" />
|
||||
<result property="voiceManufacturer" column="voice_manufacturer" />
|
||||
<result property="framModel" column="fram_model" />
|
||||
<result property="replaceManufacturer" column="replace_manufacturer" />
|
||||
<result property="testRecord" column="test_record" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeviceReportInfoVo">
|
||||
select id, imei, iccid, mcu_id, bsp_type, lte_type, mcu_type, mcuFw, lteFw, lcd_manufacturer, voice_manufacturer, fram_model, replace_manufacturer, test_record from iot_device_report_info
|
||||
</sql>
|
||||
|
||||
<select id="selectDeviceReportInfoList" parameterType="DeviceReportInfo" resultMap="DeviceReportInfoResult">
|
||||
<include refid="selectDeviceReportInfoVo"/>
|
||||
<where>
|
||||
<if test="imei != null and imei != ''"> and imei = #{imei}</if>
|
||||
<if test="iccid != null and iccid != ''"> and iccid = #{iccid}</if>
|
||||
<if test="mcuId != null and mcuId != ''"> and mcu_id = #{mcuId}</if>
|
||||
<if test="bspType != null and bspType != ''"> and bsp_type = #{bspType}</if>
|
||||
<if test="lteType != null and lteType != ''"> and lte_type = #{lteType}</if>
|
||||
<if test="mcuType != null and mcuType != ''"> and mcu_type = #{mcuType}</if>
|
||||
<if test="mcufw != null and mcufw != ''"> and mcuFw = #{mcufw}</if>
|
||||
<if test="ltefw != null and ltefw != ''"> and lteFw = #{ltefw}</if>
|
||||
<if test="lcdManufacturer != null "> and lcd_manufacturer = #{lcdManufacturer}</if>
|
||||
<if test="voiceManufacturer != null "> and voice_manufacturer = #{voiceManufacturer}</if>
|
||||
<if test="framModel != null and framModel != ''"> and fram_model = #{framModel}</if>
|
||||
<if test="replaceManufacturer != null "> and replace_manufacturer = #{replaceManufacturer}</if>
|
||||
<if test="testRecord != null and testRecord != ''"> and test_record = #{testRecord}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDeviceReportInfoById" parameterType="Long" resultMap="DeviceReportInfoResult">
|
||||
<include refid="selectDeviceReportInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDeviceReportInfo" parameterType="DeviceReportInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into iot_device_report_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="imei != null and imei != ''">imei,</if>
|
||||
<if test="iccid != null and iccid != ''">iccid,</if>
|
||||
<if test="mcuId != null and mcuId != ''">mcu_id,</if>
|
||||
<if test="bspType != null and bspType != ''">bsp_type,</if>
|
||||
<if test="lteType != null and lteType != ''">lte_type,</if>
|
||||
<if test="mcuType != null and mcuType != ''">mcu_type,</if>
|
||||
<if test="mcufw != null and mcufw != ''">mcuFw,</if>
|
||||
<if test="ltefw != null and ltefw != ''">lteFw,</if>
|
||||
<if test="lcdManufacturer != null">lcd_manufacturer,</if>
|
||||
<if test="voiceManufacturer != null">voice_manufacturer,</if>
|
||||
<if test="framModel != null and framModel != ''">fram_model,</if>
|
||||
<if test="replaceManufacturer != null">replace_manufacturer,</if>
|
||||
<if test="testRecord != null">test_record,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="imei != null and imei != ''">#{imei},</if>
|
||||
<if test="iccid != null and iccid != ''">#{iccid},</if>
|
||||
<if test="mcuId != null and mcuId != ''">#{mcuId},</if>
|
||||
<if test="bspType != null and bspType != ''">#{bspType},</if>
|
||||
<if test="lteType != null and lteType != ''">#{lteType},</if>
|
||||
<if test="mcuType != null and mcuType != ''">#{mcuType},</if>
|
||||
<if test="mcufw != null and mcufw != ''">#{mcufw},</if>
|
||||
<if test="ltefw != null and ltefw != ''">#{ltefw},</if>
|
||||
<if test="lcdManufacturer != null">#{lcdManufacturer},</if>
|
||||
<if test="voiceManufacturer != null">#{voiceManufacturer},</if>
|
||||
<if test="framModel != null and framModel != ''">#{framModel},</if>
|
||||
<if test="replaceManufacturer != null">#{replaceManufacturer},</if>
|
||||
<if test="testRecord != null">#{testRecord},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDeviceReportInfo" parameterType="DeviceReportInfo">
|
||||
update iot_device_report_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="imei != null and imei != ''">imei = #{imei},</if>
|
||||
<if test="iccid != null and iccid != ''">iccid = #{iccid},</if>
|
||||
<if test="mcuId != null and mcuId != ''">mcu_id = #{mcuId},</if>
|
||||
<if test="bspType != null and bspType != ''">bsp_type = #{bspType},</if>
|
||||
<if test="lteType != null and lteType != ''">lte_type = #{lteType},</if>
|
||||
<if test="mcuType != null and mcuType != ''">mcu_type = #{mcuType},</if>
|
||||
<if test="mcufw != null and mcufw != ''">mcuFw = #{mcufw},</if>
|
||||
<if test="ltefw != null and ltefw != ''">lteFw = #{ltefw},</if>
|
||||
<if test="lcdManufacturer != null">lcd_manufacturer = #{lcdManufacturer},</if>
|
||||
<if test="voiceManufacturer != null">voice_manufacturer = #{voiceManufacturer},</if>
|
||||
<if test="framModel != null and framModel != ''">fram_model = #{framModel},</if>
|
||||
<if test="replaceManufacturer != null">replace_manufacturer = #{replaceManufacturer},</if>
|
||||
<if test="testRecord != null">test_record = #{testRecord},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDeviceReportInfoById" parameterType="Long">
|
||||
delete from iot_device_report_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDeviceReportInfoByIds" parameterType="String">
|
||||
delete from iot_device_report_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user