Просмотр исходного кода

回滚设备信息表和设备连接表

liuyaowen 1 год назад
Родитель
Сommit
c4532478ac

+ 105 - 0
src/main/java/com/yunfeiyun/agmp/iotm/device/controller/IotDeviceController.java

@@ -0,0 +1,105 @@
+package com.yunfeiyun.agmp.iotm.device.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.yunfeiyun.agmp.iot.common.domain.IotDevice;
+import com.yunfeiyun.agmp.iotm.device.service.IIotDeviceService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.yunfeiyun.agmp.common.annotation.Log;
+import com.yunfeiyun.agmp.common.core.controller.BaseController;
+import com.yunfeiyun.agmp.common.core.domain.AjaxResult;
+import com.yunfeiyun.agmp.common.enums.BusinessType;
+import com.yunfeiyun.agmp.common.utils.poi.ExcelUtil;
+import com.yunfeiyun.agmp.common.core.page.TableDataInfo;
+
+/**
+ * 设备基础Controller
+ * 
+ * @author 杨晓辉
+ * @date 2024-11-06
+ */
+@RestController
+@RequestMapping("/iot/device")
+public class IotDeviceController extends BaseController
+{
+    @Autowired
+    private IIotDeviceService iotDeviceService;
+
+    /**
+     * 查询设备基础列表
+     */
+    @PreAuthorize("@ss.hasPermi('iot:device:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(IotDevice iotDevice)
+    {
+        startPage();
+        List<IotDevice> list = iotDeviceService.selectIotDeviceList(iotDevice);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出设备基础列表
+     */
+    @PreAuthorize("@ss.hasPermi('iot:device:export')")
+    @Log(title = "设备基础", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, IotDevice iotDevice)
+    {
+        List<IotDevice> list = iotDeviceService.selectIotDeviceList(iotDevice);
+        ExcelUtil<IotDevice> util = new ExcelUtil<IotDevice>(IotDevice.class);
+        util.exportExcel(response, list, "设备基础数据");
+    }
+
+    /**
+     * 获取设备基础详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('iot:device:query')")
+    @GetMapping(value = "/info/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(iotDeviceService.selectIotDeviceById(id));
+    }
+
+    /**
+     * 新增设备基础
+     */
+    @PreAuthorize("@ss.hasPermi('iot:device:add')")
+    @Log(title = "设备基础", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    public AjaxResult add(@RequestBody IotDevice iotDevice)
+    {
+        return toAjax(iotDeviceService.insertIotDevice(iotDevice));
+    }
+
+    /**
+     * 修改设备基础
+     */
+    @PreAuthorize("@ss.hasPermi('iot:device:edit')")
+    @Log(title = "设备基础", businessType = BusinessType.UPDATE)
+    @PutMapping("/edit")
+    public AjaxResult edit(@RequestBody IotDevice iotDevice)
+    {
+        return toAjax(iotDeviceService.updateIotDevice(iotDevice));
+    }
+
+    /**
+     * 删除设备基础
+     */
+    @PreAuthorize("@ss.hasPermi('iot:device:remove')")
+    @Log(title = "设备基础", businessType = BusinessType.DELETE)
+	@DeleteMapping("/delete/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(iotDeviceService.deleteIotDeviceByIds(ids));
+    }
+}

+ 105 - 0
src/main/java/com/yunfeiyun/agmp/iotm/device/controller/IotDeviceconnController.java

@@ -0,0 +1,105 @@
+package com.yunfeiyun.agmp.iotm.device.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.yunfeiyun.agmp.common.utils.poi.ExcelUtil;
+import com.yunfeiyun.agmp.iot.common.domain.IotDeviceconn;
+import com.yunfeiyun.agmp.iotm.device.service.IIotDeviceconnService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.yunfeiyun.agmp.common.annotation.Log;
+import com.yunfeiyun.agmp.common.core.controller.BaseController;
+import com.yunfeiyun.agmp.common.core.domain.AjaxResult;
+import com.yunfeiyun.agmp.common.enums.BusinessType;
+import com.yunfeiyun.agmp.common.core.page.TableDataInfo;
+
+/**
+ * 设备连接配置Controller
+ * 
+ * @author 杨晓辉
+ * @date 2024-11-06
+ */
+@RestController
+@RequestMapping("/iot/deviceconn")
+public class IotDeviceconnController extends BaseController
+{
+    @Autowired
+    private IIotDeviceconnService iotDeviceconnService;
+
+    /**
+     * 查询设备连接配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('iot:deviceconn:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(IotDeviceconn iotDeviceconn)
+    {
+        startPage();
+        List<IotDeviceconn> list = iotDeviceconnService.selectIotDeviceconnList(iotDeviceconn);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出设备连接配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('iot:deviceconn:export')")
+    @Log(title = "设备连接配置", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, IotDeviceconn iotDeviceconn)
+    {
+        List<IotDeviceconn> list = iotDeviceconnService.selectIotDeviceconnList(iotDeviceconn);
+        ExcelUtil<IotDeviceconn> util = new ExcelUtil<IotDeviceconn>(IotDeviceconn.class);
+        util.exportExcel(response, list, "设备连接配置数据");
+    }
+
+    /**
+     * 获取设备连接配置详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('iot:deviceconn:query')")
+    @GetMapping(value = "/info/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(iotDeviceconnService.selectIotDeviceconnById(id));
+    }
+
+    /**
+     * 新增设备连接配置
+     */
+    @PreAuthorize("@ss.hasPermi('iot:deviceconn:add')")
+    @Log(title = "设备连接配置", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    public AjaxResult add(@RequestBody IotDeviceconn iotDeviceconn)
+    {
+        return toAjax(iotDeviceconnService.insertIotDeviceconn(iotDeviceconn));
+    }
+
+    /**
+     * 修改设备连接配置
+     */
+    @PreAuthorize("@ss.hasPermi('iot:deviceconn:edit')")
+    @Log(title = "设备连接配置", businessType = BusinessType.UPDATE)
+    @PutMapping("/edit")
+    public AjaxResult edit(@RequestBody IotDeviceconn iotDeviceconn)
+    {
+        return toAjax(iotDeviceconnService.updateIotDeviceconn(iotDeviceconn));
+    }
+
+    /**
+     * 删除设备连接配置
+     */
+    @PreAuthorize("@ss.hasPermi('iot:deviceconn:remove')")
+    @Log(title = "设备连接配置", businessType = BusinessType.DELETE)
+	@DeleteMapping("/delete/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(iotDeviceconnService.deleteIotDeviceconnByIds(ids));
+    }
+}

+ 62 - 0
src/main/java/com/yunfeiyun/agmp/iotm/device/mapper/IotDeviceMapper.java

@@ -0,0 +1,62 @@
+package com.yunfeiyun.agmp.iotm.device.mapper;
+
+import com.yunfeiyun.agmp.iot.common.domain.IotDevice;
+
+import java.util.List;
+
+/**
+ * 设备基础Mapper接口
+ * 
+ * @author 杨晓辉
+ * @date 2024-11-06
+ */
+public interface IotDeviceMapper 
+{
+    /**
+     * 查询设备基础
+     * 
+     * @param id 设备基础主键
+     * @return 设备基础
+     */
+    public IotDevice selectIotDeviceById(Long id);
+
+    /**
+     * 查询设备基础列表
+     * 
+     * @param iotDevice 设备基础
+     * @return 设备基础集合
+     */
+    public List<IotDevice> selectIotDeviceList(IotDevice iotDevice);
+
+    /**
+     * 新增设备基础
+     * 
+     * @param iotDevice 设备基础
+     * @return 结果
+     */
+    public int insertIotDevice(IotDevice iotDevice);
+
+    /**
+     * 修改设备基础
+     * 
+     * @param iotDevice 设备基础
+     * @return 结果
+     */
+    public int updateIotDevice(IotDevice iotDevice);
+
+    /**
+     * 删除设备基础
+     * 
+     * @param id 设备基础主键
+     * @return 结果
+     */
+    public int deleteIotDeviceById(Long id);
+
+    /**
+     * 批量删除设备基础
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteIotDeviceByIds(Long[] ids);
+}

+ 62 - 0
src/main/java/com/yunfeiyun/agmp/iotm/device/mapper/IotDeviceconnMapper.java

@@ -0,0 +1,62 @@
+package com.yunfeiyun.agmp.iotm.device.mapper;
+
+import com.yunfeiyun.agmp.iot.common.domain.IotDeviceconn;
+
+import java.util.List;
+
+/**
+ * 设备连接配置Mapper接口
+ * 
+ * @author 杨晓辉
+ * @date 2024-11-06
+ */
+public interface IotDeviceconnMapper 
+{
+    /**
+     * 查询设备连接配置
+     * 
+     * @param id 设备连接配置主键
+     * @return 设备连接配置
+     */
+    public IotDeviceconn selectIotDeviceconnById(Long id);
+
+    /**
+     * 查询设备连接配置列表
+     * 
+     * @param iotDeviceconn 设备连接配置
+     * @return 设备连接配置集合
+     */
+    public List<IotDeviceconn> selectIotDeviceconnList(IotDeviceconn iotDeviceconn);
+
+    /**
+     * 新增设备连接配置
+     * 
+     * @param iotDeviceconn 设备连接配置
+     * @return 结果
+     */
+    public int insertIotDeviceconn(IotDeviceconn iotDeviceconn);
+
+    /**
+     * 修改设备连接配置
+     * 
+     * @param iotDeviceconn 设备连接配置
+     * @return 结果
+     */
+    public int updateIotDeviceconn(IotDeviceconn iotDeviceconn);
+
+    /**
+     * 删除设备连接配置
+     * 
+     * @param id 设备连接配置主键
+     * @return 结果
+     */
+    public int deleteIotDeviceconnById(Long id);
+
+    /**
+     * 批量删除设备连接配置
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteIotDeviceconnByIds(Long[] ids);
+}

+ 62 - 0
src/main/java/com/yunfeiyun/agmp/iotm/device/service/IIotDeviceService.java

@@ -0,0 +1,62 @@
+package com.yunfeiyun.agmp.iotm.device.service;
+
+import com.yunfeiyun.agmp.iot.common.domain.IotDevice;
+
+import java.util.List;
+
+/**
+ * 设备基础Service接口
+ * 
+ * @author 杨晓辉
+ * @date 2024-11-06
+ */
+public interface IIotDeviceService 
+{
+    /**
+     * 查询设备基础
+     * 
+     * @param id 设备基础主键
+     * @return 设备基础
+     */
+    public IotDevice selectIotDeviceById(Long id);
+
+    /**
+     * 查询设备基础列表
+     * 
+     * @param iotDevice 设备基础
+     * @return 设备基础集合
+     */
+    public List<IotDevice> selectIotDeviceList(IotDevice iotDevice);
+
+    /**
+     * 新增设备基础
+     * 
+     * @param iotDevice 设备基础
+     * @return 结果
+     */
+    public int insertIotDevice(IotDevice iotDevice);
+
+    /**
+     * 修改设备基础
+     * 
+     * @param iotDevice 设备基础
+     * @return 结果
+     */
+    public int updateIotDevice(IotDevice iotDevice);
+
+    /**
+     * 批量删除设备基础
+     * 
+     * @param ids 需要删除的设备基础主键集合
+     * @return 结果
+     */
+    public int deleteIotDeviceByIds(Long[] ids);
+
+    /**
+     * 删除设备基础信息
+     * 
+     * @param id 设备基础主键
+     * @return 结果
+     */
+    public int deleteIotDeviceById(Long id);
+}

+ 62 - 0
src/main/java/com/yunfeiyun/agmp/iotm/device/service/IIotDeviceconnService.java

@@ -0,0 +1,62 @@
+package com.yunfeiyun.agmp.iotm.device.service;
+
+import com.yunfeiyun.agmp.iot.common.domain.IotDeviceconn;
+
+import java.util.List;
+
+/**
+ * 设备连接配置Service接口
+ * 
+ * @author 杨晓辉
+ * @date 2024-11-06
+ */
+public interface IIotDeviceconnService 
+{
+    /**
+     * 查询设备连接配置
+     * 
+     * @param id 设备连接配置主键
+     * @return 设备连接配置
+     */
+    public IotDeviceconn selectIotDeviceconnById(Long id);
+
+    /**
+     * 查询设备连接配置列表
+     * 
+     * @param iotDeviceconn 设备连接配置
+     * @return 设备连接配置集合
+     */
+    public List<IotDeviceconn> selectIotDeviceconnList(IotDeviceconn iotDeviceconn);
+
+    /**
+     * 新增设备连接配置
+     * 
+     * @param iotDeviceconn 设备连接配置
+     * @return 结果
+     */
+    public int insertIotDeviceconn(IotDeviceconn iotDeviceconn);
+
+    /**
+     * 修改设备连接配置
+     * 
+     * @param iotDeviceconn 设备连接配置
+     * @return 结果
+     */
+    public int updateIotDeviceconn(IotDeviceconn iotDeviceconn);
+
+    /**
+     * 批量删除设备连接配置
+     * 
+     * @param ids 需要删除的设备连接配置主键集合
+     * @return 结果
+     */
+    public int deleteIotDeviceconnByIds(Long[] ids);
+
+    /**
+     * 删除设备连接配置信息
+     * 
+     * @param id 设备连接配置主键
+     * @return 结果
+     */
+    public int deleteIotDeviceconnById(Long id);
+}

+ 94 - 0
src/main/java/com/yunfeiyun/agmp/iotm/device/service/impl/IotDeviceServiceImpl.java

@@ -0,0 +1,94 @@
+package com.yunfeiyun.agmp.iotm.device.service.impl;
+
+import java.util.List;
+
+import com.yunfeiyun.agmp.iot.common.domain.IotDevice;
+import com.yunfeiyun.agmp.iotm.device.mapper.IotDeviceMapper;
+import com.yunfeiyun.agmp.iotm.device.service.IIotDeviceService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 设备基础Service业务层处理
+ * 
+ * @author 杨晓辉
+ * @date 2024-11-06
+ */
+@Service
+public class IotDeviceServiceImpl implements IIotDeviceService
+{
+    @Autowired
+    private IotDeviceMapper iotDeviceMapper;
+
+    /**
+     * 查询设备基础
+     * 
+     * @param id 设备基础主键
+     * @return 设备基础
+     */
+    @Override
+    public IotDevice selectIotDeviceById(Long id)
+    {
+        return iotDeviceMapper.selectIotDeviceById(id);
+    }
+
+    /**
+     * 查询设备基础列表
+     * 
+     * @param iotDevice 设备基础
+     * @return 设备基础
+     */
+    @Override
+    public List<IotDevice> selectIotDeviceList(IotDevice iotDevice)
+    {
+        return iotDeviceMapper.selectIotDeviceList(iotDevice);
+    }
+
+    /**
+     * 新增设备基础
+     * 
+     * @param iotDevice 设备基础
+     * @return 结果
+     */
+    @Override
+    public int insertIotDevice(IotDevice iotDevice)
+    {
+        return iotDeviceMapper.insertIotDevice(iotDevice);
+    }
+
+    /**
+     * 修改设备基础
+     * 
+     * @param iotDevice 设备基础
+     * @return 结果
+     */
+    @Override
+    public int updateIotDevice(IotDevice iotDevice)
+    {
+        return iotDeviceMapper.updateIotDevice(iotDevice);
+    }
+
+    /**
+     * 批量删除设备基础
+     * 
+     * @param ids 需要删除的设备基础主键
+     * @return 结果
+     */
+    @Override
+    public int deleteIotDeviceByIds(Long[] ids)
+    {
+        return iotDeviceMapper.deleteIotDeviceByIds(ids);
+    }
+
+    /**
+     * 删除设备基础信息
+     * 
+     * @param id 设备基础主键
+     * @return 结果
+     */
+    @Override
+    public int deleteIotDeviceById(Long id)
+    {
+        return iotDeviceMapper.deleteIotDeviceById(id);
+    }
+}

+ 94 - 0
src/main/java/com/yunfeiyun/agmp/iotm/device/service/impl/IotDeviceconnServiceImpl.java

@@ -0,0 +1,94 @@
+package com.yunfeiyun.agmp.iotm.device.service.impl;
+
+import java.util.List;
+
+import com.yunfeiyun.agmp.iot.common.domain.IotDeviceconn;
+import com.yunfeiyun.agmp.iotm.device.mapper.IotDeviceconnMapper;
+import com.yunfeiyun.agmp.iotm.device.service.IIotDeviceconnService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 设备连接配置Service业务层处理
+ * 
+ * @author 杨晓辉
+ * @date 2024-11-06
+ */
+@Service
+public class IotDeviceconnServiceImpl implements IIotDeviceconnService
+{
+    @Autowired
+    private IotDeviceconnMapper iotDeviceconnMapper;
+
+    /**
+     * 查询设备连接配置
+     * 
+     * @param id 设备连接配置主键
+     * @return 设备连接配置
+     */
+    @Override
+    public IotDeviceconn selectIotDeviceconnById(Long id)
+    {
+        return iotDeviceconnMapper.selectIotDeviceconnById(id);
+    }
+
+    /**
+     * 查询设备连接配置列表
+     * 
+     * @param iotDeviceconn 设备连接配置
+     * @return 设备连接配置
+     */
+    @Override
+    public List<IotDeviceconn> selectIotDeviceconnList(IotDeviceconn iotDeviceconn)
+    {
+        return iotDeviceconnMapper.selectIotDeviceconnList(iotDeviceconn);
+    }
+
+    /**
+     * 新增设备连接配置
+     * 
+     * @param iotDeviceconn 设备连接配置
+     * @return 结果
+     */
+    @Override
+    public int insertIotDeviceconn(IotDeviceconn iotDeviceconn)
+    {
+        return iotDeviceconnMapper.insertIotDeviceconn(iotDeviceconn);
+    }
+
+    /**
+     * 修改设备连接配置
+     * 
+     * @param iotDeviceconn 设备连接配置
+     * @return 结果
+     */
+    @Override
+    public int updateIotDeviceconn(IotDeviceconn iotDeviceconn)
+    {
+        return iotDeviceconnMapper.updateIotDeviceconn(iotDeviceconn);
+    }
+
+    /**
+     * 批量删除设备连接配置
+     * 
+     * @param ids 需要删除的设备连接配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteIotDeviceconnByIds(Long[] ids)
+    {
+        return iotDeviceconnMapper.deleteIotDeviceconnByIds(ids);
+    }
+
+    /**
+     * 删除设备连接配置信息
+     * 
+     * @param id 设备连接配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteIotDeviceconnById(Long id)
+    {
+        return iotDeviceconnMapper.deleteIotDeviceconnById(id);
+    }
+}

+ 221 - 0
src/main/resources/mapper/IotDeviceMapper.xml

@@ -0,0 +1,221 @@
+<?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.yunfeiyun.agmp.iotm.device.mapper.IotDeviceMapper">
+    
+    <resultMap type="IotDevice" id="IotDeviceResult">
+        <result property="id"    column="id"    />
+        <result property="devBid"    column="devBid"    />
+        <result property="tid"    column="tid"    />
+        <result property="devtypeBid"    column="devtypeBid"    />
+        <result property="firmBid"    column="firmBid"    />
+        <result property="devclassBid"    column="devclassBid"    />
+        <result property="devconnBid"    column="devconnBid"    />
+        <result property="devCode"    column="devCode"    />
+        <result property="devName"    column="devName"    />
+        <result property="devVersion"    column="devVersion"    />
+        <result property="devStatus"    column="devStatus"    />
+        <result property="devProvince"    column="devProvince"    />
+        <result property="devCity"    column="devCity"    />
+        <result property="devDistrict"    column="devDistrict"    />
+        <result property="devLng"    column="devLng"    />
+        <result property="devLat"    column="devLat"    />
+        <result property="devPositionstatus"    column="devPositionstatus"    />
+        <result property="devPositiontype"    column="devPositiontype"    />
+        <result property="devTag"    column="devTag"    />
+        <result property="devRecogtype"    column="devRecogtype"    />
+        <result property="devNetworktype"    column="devNetworktype"    />
+        <result property="devOfflinedate"    column="devOfflinedate"    />
+        <result property="devProvincealign"    column="devProvincealign"    />
+        <result property="devCityalign"    column="devCityalign"    />
+        <result property="devDistrictalign"    column="devDistrictalign"    />
+        <result property="devLngalign"    column="devLngalign"    />
+        <result property="devLatalign"    column="devLatalign"    />
+        <result property="devContacts"    column="devContacts"    />
+        <result property="devTel"    column="devTel"    />
+        <result property="devCreator"    column="devCreator"    />
+        <result property="devModifier"    column="devModifier"    />
+        <result property="devUpdateddate"    column="devUpdateddate"    />
+        <result property="devModifieddate"    column="devModifieddate"    />
+        <result property="devCreateddate"    column="devCreateddate"    />
+        <result property="devDelstatus"    column="devDelstatus"    />
+    </resultMap>
+
+    <sql id="selectIotDeviceVo">
+        select id, devBid, tid, devtypeBid, firmBid, devclassBid, devconnBid, devCode, devName, devVersion, devStatus, devProvince, devCity, devDistrict, devLng, devLat, devPositionstatus, devPositiontype, devTag, devRecogtype, devNetworktype, devOfflinedate, devProvincealign, devCityalign, devDistrictalign, devLngalign, devLatalign, devContacts, devTel, devCreator, devModifier, devUpdateddate, devModifieddate, devCreateddate, devDelstatus from IotDevice
+    </sql>
+
+    <select id="selectIotDeviceList" parameterType="IotDevice" resultMap="IotDeviceResult">
+        <include refid="selectIotDeviceVo"/>
+        <where>  
+            <if test="devBid != null  and devBid != ''"> and devBid = #{devBid}</if>
+            <if test="tid != null  and tid != ''"> and tid = #{tid}</if>
+            <if test="devtypeBid != null  and devtypeBid != ''"> and devtypeBid = #{devtypeBid}</if>
+            <if test="firmBid != null  and firmBid != ''"> and firmBid = #{firmBid}</if>
+            <if test="devclassBid != null  and devclassBid != ''"> and devclassBid = #{devclassBid}</if>
+            <if test="devconnBid != null  and devconnBid != ''"> and devconnBid = #{devconnBid}</if>
+            <if test="devCode != null  and devCode != ''"> and devCode = #{devCode}</if>
+            <if test="devName != null  and devName != ''"> and devName like concat('%', #{devName}, '%')</if>
+            <if test="devVersion != null  and devVersion != ''"> and devVersion = #{devVersion}</if>
+            <if test="devStatus != null  and devStatus != ''"> and devStatus = #{devStatus}</if>
+            <if test="devProvince != null  and devProvince != ''"> and devProvince = #{devProvince}</if>
+            <if test="devCity != null  and devCity != ''"> and devCity = #{devCity}</if>
+            <if test="devDistrict != null  and devDistrict != ''"> and devDistrict = #{devDistrict}</if>
+            <if test="devLng != null "> and devLng = #{devLng}</if>
+            <if test="devLat != null "> and devLat = #{devLat}</if>
+            <if test="devPositionstatus != null  and devPositionstatus != ''"> and devPositionstatus = #{devPositionstatus}</if>
+            <if test="devPositiontype != null  and devPositiontype != ''"> and devPositiontype = #{devPositiontype}</if>
+            <if test="devTag != null  and devTag != ''"> and devTag = #{devTag}</if>
+            <if test="devRecogtype != null  and devRecogtype != ''"> and devRecogtype = #{devRecogtype}</if>
+            <if test="devNetworktype != null  and devNetworktype != ''"> and devNetworktype = #{devNetworktype}</if>
+            <if test="devOfflinedate != null  and devOfflinedate != ''"> and devOfflinedate = #{devOfflinedate}</if>
+            <if test="devProvincealign != null  and devProvincealign != ''"> and devProvincealign = #{devProvincealign}</if>
+            <if test="devCityalign != null  and devCityalign != ''"> and devCityalign = #{devCityalign}</if>
+            <if test="devDistrictalign != null  and devDistrictalign != ''"> and devDistrictalign = #{devDistrictalign}</if>
+            <if test="devLngalign != null "> and devLngalign = #{devLngalign}</if>
+            <if test="devLatalign != null "> and devLatalign = #{devLatalign}</if>
+            <if test="devContacts != null  and devContacts != ''"> and devContacts = #{devContacts}</if>
+            <if test="devTel != null  and devTel != ''"> and devTel = #{devTel}</if>
+            <if test="devCreator != null  and devCreator != ''"> and devCreator = #{devCreator}</if>
+            <if test="devModifier != null  and devModifier != ''"> and devModifier = #{devModifier}</if>
+            <if test="devUpdateddate != null  and devUpdateddate != ''"> and devUpdateddate = #{devUpdateddate}</if>
+            <if test="devModifieddate != null  and devModifieddate != ''"> and devModifieddate = #{devModifieddate}</if>
+            <if test="devCreateddate != null  and devCreateddate != ''"> and devCreateddate = #{devCreateddate}</if>
+            <if test="devDelstatus != null  and devDelstatus != ''"> and devDelstatus = #{devDelstatus}</if>
+        </where>
+    </select>
+    
+    <select id="selectIotDeviceById" parameterType="Long" resultMap="IotDeviceResult">
+        <include refid="selectIotDeviceVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertIotDevice" parameterType="IotDevice" useGeneratedKeys="true" keyProperty="id">
+        insert into IotDevice
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="devBid != null">devBid,</if>
+            <if test="tid != null">tid,</if>
+            <if test="devtypeBid != null and devtypeBid != ''">devtypeBid,</if>
+            <if test="firmBid != null">firmBid,</if>
+            <if test="devclassBid != null">devclassBid,</if>
+            <if test="devconnBid != null">devconnBid,</if>
+            <if test="devCode != null">devCode,</if>
+            <if test="devName != null">devName,</if>
+            <if test="devVersion != null">devVersion,</if>
+            <if test="devStatus != null">devStatus,</if>
+            <if test="devProvince != null">devProvince,</if>
+            <if test="devCity != null">devCity,</if>
+            <if test="devDistrict != null">devDistrict,</if>
+            <if test="devLng != null">devLng,</if>
+            <if test="devLat != null">devLat,</if>
+            <if test="devPositionstatus != null">devPositionstatus,</if>
+            <if test="devPositiontype != null">devPositiontype,</if>
+            <if test="devTag != null">devTag,</if>
+            <if test="devRecogtype != null">devRecogtype,</if>
+            <if test="devNetworktype != null">devNetworktype,</if>
+            <if test="devOfflinedate != null">devOfflinedate,</if>
+            <if test="devProvincealign != null">devProvincealign,</if>
+            <if test="devCityalign != null">devCityalign,</if>
+            <if test="devDistrictalign != null">devDistrictalign,</if>
+            <if test="devLngalign != null">devLngalign,</if>
+            <if test="devLatalign != null">devLatalign,</if>
+            <if test="devContacts != null">devContacts,</if>
+            <if test="devTel != null">devTel,</if>
+            <if test="devCreator != null">devCreator,</if>
+            <if test="devModifier != null">devModifier,</if>
+            <if test="devUpdateddate != null">devUpdateddate,</if>
+            <if test="devModifieddate != null">devModifieddate,</if>
+            <if test="devCreateddate != null">devCreateddate,</if>
+            <if test="devDelstatus != null">devDelstatus,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="devBid != null">#{devBid},</if>
+            <if test="tid != null">#{tid},</if>
+            <if test="devtypeBid != null and devtypeBid != ''">#{devtypeBid},</if>
+            <if test="firmBid != null">#{firmBid},</if>
+            <if test="devclassBid != null">#{devclassBid},</if>
+            <if test="devconnBid != null">#{devconnBid},</if>
+            <if test="devCode != null">#{devCode},</if>
+            <if test="devName != null">#{devName},</if>
+            <if test="devVersion != null">#{devVersion},</if>
+            <if test="devStatus != null">#{devStatus},</if>
+            <if test="devProvince != null">#{devProvince},</if>
+            <if test="devCity != null">#{devCity},</if>
+            <if test="devDistrict != null">#{devDistrict},</if>
+            <if test="devLng != null">#{devLng},</if>
+            <if test="devLat != null">#{devLat},</if>
+            <if test="devPositionstatus != null">#{devPositionstatus},</if>
+            <if test="devPositiontype != null">#{devPositiontype},</if>
+            <if test="devTag != null">#{devTag},</if>
+            <if test="devRecogtype != null">#{devRecogtype},</if>
+            <if test="devNetworktype != null">#{devNetworktype},</if>
+            <if test="devOfflinedate != null">#{devOfflinedate},</if>
+            <if test="devProvincealign != null">#{devProvincealign},</if>
+            <if test="devCityalign != null">#{devCityalign},</if>
+            <if test="devDistrictalign != null">#{devDistrictalign},</if>
+            <if test="devLngalign != null">#{devLngalign},</if>
+            <if test="devLatalign != null">#{devLatalign},</if>
+            <if test="devContacts != null">#{devContacts},</if>
+            <if test="devTel != null">#{devTel},</if>
+            <if test="devCreator != null">#{devCreator},</if>
+            <if test="devModifier != null">#{devModifier},</if>
+            <if test="devUpdateddate != null">#{devUpdateddate},</if>
+            <if test="devModifieddate != null">#{devModifieddate},</if>
+            <if test="devCreateddate != null">#{devCreateddate},</if>
+            <if test="devDelstatus != null">#{devDelstatus},</if>
+         </trim>
+    </insert>
+
+    <update id="updateIotDevice" parameterType="IotDevice">
+        update IotDevice
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="devBid != null">devBid = #{devBid},</if>
+            <if test="tid != null">tid = #{tid},</if>
+            <if test="devtypeBid != null and devtypeBid != ''">devtypeBid = #{devtypeBid},</if>
+            <if test="firmBid != null">firmBid = #{firmBid},</if>
+            <if test="devclassBid != null">devclassBid = #{devclassBid},</if>
+            <if test="devconnBid != null">devconnBid = #{devconnBid},</if>
+            <if test="devCode != null">devCode = #{devCode},</if>
+            <if test="devName != null">devName = #{devName},</if>
+            <if test="devVersion != null">devVersion = #{devVersion},</if>
+            <if test="devStatus != null">devStatus = #{devStatus},</if>
+            <if test="devProvince != null">devProvince = #{devProvince},</if>
+            <if test="devCity != null">devCity = #{devCity},</if>
+            <if test="devDistrict != null">devDistrict = #{devDistrict},</if>
+            <if test="devLng != null">devLng = #{devLng},</if>
+            <if test="devLat != null">devLat = #{devLat},</if>
+            <if test="devPositionstatus != null">devPositionstatus = #{devPositionstatus},</if>
+            <if test="devPositiontype != null">devPositiontype = #{devPositiontype},</if>
+            <if test="devTag != null">devTag = #{devTag},</if>
+            <if test="devRecogtype != null">devRecogtype = #{devRecogtype},</if>
+            <if test="devNetworktype != null">devNetworktype = #{devNetworktype},</if>
+            <if test="devOfflinedate != null">devOfflinedate = #{devOfflinedate},</if>
+            <if test="devProvincealign != null">devProvincealign = #{devProvincealign},</if>
+            <if test="devCityalign != null">devCityalign = #{devCityalign},</if>
+            <if test="devDistrictalign != null">devDistrictalign = #{devDistrictalign},</if>
+            <if test="devLngalign != null">devLngalign = #{devLngalign},</if>
+            <if test="devLatalign != null">devLatalign = #{devLatalign},</if>
+            <if test="devContacts != null">devContacts = #{devContacts},</if>
+            <if test="devTel != null">devTel = #{devTel},</if>
+            <if test="devCreator != null">devCreator = #{devCreator},</if>
+            <if test="devModifier != null">devModifier = #{devModifier},</if>
+            <if test="devUpdateddate != null">devUpdateddate = #{devUpdateddate},</if>
+            <if test="devModifieddate != null">devModifieddate = #{devModifieddate},</if>
+            <if test="devCreateddate != null">devCreateddate = #{devCreateddate},</if>
+            <if test="devDelstatus != null">devDelstatus = #{devDelstatus},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteIotDeviceById" parameterType="Long">
+        delete from IotDevice where id = #{id}
+    </delete>
+
+    <delete id="deleteIotDeviceByIds" parameterType="String">
+        delete from IotDevice where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 101 - 0
src/main/resources/mapper/IotDeviceconnMapper.xml

@@ -0,0 +1,101 @@
+<?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.yunfeiyun.agmp.iotm.device.mapper.IotDeviceconnMapper">
+    
+    <resultMap type="IotDeviceconn" id="IotDeviceconnResult">
+        <result property="id"    column="id"    />
+        <result property="devconnBid"    column="devconnBid"    />
+        <result property="devtypeBid"    column="devtypeBid"    />
+        <result property="devconnType"    column="devconnType"    />
+        <result property="devconnName"    column="devconnName"    />
+        <result property="devconnConfig"    column="devconnConfig"    />
+        <result property="devconnCreator"    column="devconnCreator"    />
+        <result property="devconnModifier"    column="devconnModifier"    />
+        <result property="devconnModifieddate"    column="devconnModifieddate"    />
+        <result property="devconnCreateddate"    column="devconnCreateddate"    />
+        <result property="tid"    column="tid"    />
+    </resultMap>
+
+    <sql id="selectIotDeviceconnVo">
+        select id, devconnBid, devtypeBid, devconnType, devconnName, devconnConfig, devconnCreator, devconnModifier, devconnModifieddate, devconnCreateddate, tid from IotDeviceconn
+    </sql>
+
+    <select id="selectIotDeviceconnList" parameterType="IotDeviceconn" resultMap="IotDeviceconnResult">
+        <include refid="selectIotDeviceconnVo"/>
+        <where>  
+            <if test="devconnBid != null  and devconnBid != ''"> and devconnBid = #{devconnBid}</if>
+            <if test="devtypeBid != null  and devtypeBid != ''"> and devtypeBid = #{devtypeBid}</if>
+            <if test="devconnType != null  and devconnType != ''"> and devconnType = #{devconnType}</if>
+            <if test="devconnName != null  and devconnName != ''"> and devconnName like concat('%', #{devconnName}, '%')</if>
+            <if test="devconnConfig != null  and devconnConfig != ''"> and devconnConfig = #{devconnConfig}</if>
+            <if test="devconnCreator != null  and devconnCreator != ''"> and devconnCreator = #{devconnCreator}</if>
+            <if test="devconnModifier != null  and devconnModifier != ''"> and devconnModifier = #{devconnModifier}</if>
+            <if test="devconnModifieddate != null  and devconnModifieddate != ''"> and devconnModifieddate = #{devconnModifieddate}</if>
+            <if test="devconnCreateddate != null  and devconnCreateddate != ''"> and devconnCreateddate = #{devconnCreateddate}</if>
+            <if test="tid != null  and tid != ''"> and tid = #{tid}</if>
+        </where>
+    </select>
+    
+    <select id="selectIotDeviceconnById" parameterType="Long" resultMap="IotDeviceconnResult">
+        <include refid="selectIotDeviceconnVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertIotDeviceconn" parameterType="IotDeviceconn" useGeneratedKeys="true" keyProperty="id">
+        insert into IotDeviceconn
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="devconnBid != null">devconnBid,</if>
+            <if test="devtypeBid != null">devtypeBid,</if>
+            <if test="devconnType != null">devconnType,</if>
+            <if test="devconnName != null">devconnName,</if>
+            <if test="devconnConfig != null">devconnConfig,</if>
+            <if test="devconnCreator != null">devconnCreator,</if>
+            <if test="devconnModifier != null">devconnModifier,</if>
+            <if test="devconnModifieddate != null">devconnModifieddate,</if>
+            <if test="devconnCreateddate != null">devconnCreateddate,</if>
+            <if test="tid != null">tid,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="devconnBid != null">#{devconnBid},</if>
+            <if test="devtypeBid != null">#{devtypeBid},</if>
+            <if test="devconnType != null">#{devconnType},</if>
+            <if test="devconnName != null">#{devconnName},</if>
+            <if test="devconnConfig != null">#{devconnConfig},</if>
+            <if test="devconnCreator != null">#{devconnCreator},</if>
+            <if test="devconnModifier != null">#{devconnModifier},</if>
+            <if test="devconnModifieddate != null">#{devconnModifieddate},</if>
+            <if test="devconnCreateddate != null">#{devconnCreateddate},</if>
+            <if test="tid != null">#{tid},</if>
+         </trim>
+    </insert>
+
+    <update id="updateIotDeviceconn" parameterType="IotDeviceconn">
+        update IotDeviceconn
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="devconnBid != null">devconnBid = #{devconnBid},</if>
+            <if test="devtypeBid != null">devtypeBid = #{devtypeBid},</if>
+            <if test="devconnType != null">devconnType = #{devconnType},</if>
+            <if test="devconnName != null">devconnName = #{devconnName},</if>
+            <if test="devconnConfig != null">devconnConfig = #{devconnConfig},</if>
+            <if test="devconnCreator != null">devconnCreator = #{devconnCreator},</if>
+            <if test="devconnModifier != null">devconnModifier = #{devconnModifier},</if>
+            <if test="devconnModifieddate != null">devconnModifieddate = #{devconnModifieddate},</if>
+            <if test="devconnCreateddate != null">devconnCreateddate = #{devconnCreateddate},</if>
+            <if test="tid != null">tid = #{tid},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteIotDeviceconnById" parameterType="Long">
+        delete from IotDeviceconn where id = #{id}
+    </delete>
+
+    <delete id="deleteIotDeviceconnByIds" parameterType="String">
+        delete from IotDeviceconn where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>