鼠害设备实时数据表
This commit is contained in:
@ -16,5 +16,22 @@
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>1.6.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fastbee</groupId>
|
||||
<artifactId>fastbee-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -0,0 +1,86 @@
|
||||
package com.fastbee.deviceData.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 鼠害设备实时数据对象 iot_device_mice_realtime
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-11-07
|
||||
*/
|
||||
@ApiModel(value = "DeviceMiceRealtime",description = "鼠害设备实时数据 iot_device_mice_realtime")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DeviceMiceRealtime extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 诱饵投放 0关 1开 */
|
||||
@Excel(name = "诱饵投放 0关 1开")
|
||||
@ApiModelProperty("诱饵投放 0关 1开")
|
||||
private String feedDelivery;
|
||||
|
||||
/** 红外探测 0无 1有 */
|
||||
@Excel(name = "红外探测 0无 1有")
|
||||
@ApiModelProperty("红外探测 0无 1有")
|
||||
private String infraredDetection;
|
||||
|
||||
/** 放生口 0关 1开 */
|
||||
@Excel(name = "放生口 0关 1开")
|
||||
@ApiModelProperty("放生口 0关 1开")
|
||||
private String export;
|
||||
|
||||
/** 补光灯 0关 1开 */
|
||||
@Excel(name = "补光灯 0关 1开")
|
||||
@ApiModelProperty("补光灯 0关 1开")
|
||||
private String fillLight;
|
||||
|
||||
/** 重量(g) */
|
||||
@Excel(name = "重量(g)")
|
||||
@ApiModelProperty("重量(g)")
|
||||
private String weight;
|
||||
|
||||
/** 经度 */
|
||||
@Excel(name = "经度")
|
||||
@ApiModelProperty("经度")
|
||||
private String lng;
|
||||
|
||||
/** 纬度 */
|
||||
@Excel(name = "纬度")
|
||||
@ApiModelProperty("纬度")
|
||||
private String lat;
|
||||
|
||||
/** 工作模式 0为手动模式 1为自动模式 */
|
||||
@Excel(name = "工作模式 0为手动模式 1为自动模式")
|
||||
@ApiModelProperty("工作模式 0为手动模式 1为自动模式")
|
||||
private String workingMode;
|
||||
|
||||
/** 净重 0关 1开 */
|
||||
@Excel(name = "净重 0关 1开")
|
||||
@ApiModelProperty("净重 0关 1开")
|
||||
private String netWeight;
|
||||
|
||||
/** 拍照 0关 1开 */
|
||||
@Excel(name = "拍照 0关 1开")
|
||||
@ApiModelProperty("拍照 0关 1开")
|
||||
private String takePicture;
|
||||
|
||||
/** 设备地址 */
|
||||
@Excel(name = "设备地址")
|
||||
@ApiModelProperty("设备地址")
|
||||
private String deviceAddr;
|
||||
|
||||
/** 设备状态 */
|
||||
@Excel(name = "设备状态")
|
||||
@ApiModelProperty("设备状态")
|
||||
private String truthStatus;
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.fastbee.deviceData.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.deviceData.domain.DeviceMiceRealtime;
|
||||
|
||||
/**
|
||||
* 鼠害设备实时数据Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-11-07
|
||||
*/
|
||||
public interface DeviceMiceRealtimeMapper
|
||||
{
|
||||
/**
|
||||
* 查询鼠害设备实时数据
|
||||
*
|
||||
* @param id 鼠害设备实时数据主键
|
||||
* @return 鼠害设备实时数据
|
||||
*/
|
||||
public DeviceMiceRealtime selectDeviceMiceRealtimeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询鼠害设备实时数据列表
|
||||
*
|
||||
* @param deviceMiceRealtime 鼠害设备实时数据
|
||||
* @return 鼠害设备实时数据集合
|
||||
*/
|
||||
public List<DeviceMiceRealtime> selectDeviceMiceRealtimeList(DeviceMiceRealtime deviceMiceRealtime);
|
||||
|
||||
/**
|
||||
* 新增鼠害设备实时数据
|
||||
*
|
||||
* @param deviceMiceRealtime 鼠害设备实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceMiceRealtime(DeviceMiceRealtime deviceMiceRealtime);
|
||||
|
||||
/**
|
||||
* 修改鼠害设备实时数据
|
||||
*
|
||||
* @param deviceMiceRealtime 鼠害设备实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceMiceRealtime(DeviceMiceRealtime deviceMiceRealtime);
|
||||
|
||||
/**
|
||||
* 删除鼠害设备实时数据
|
||||
*
|
||||
* @param id 鼠害设备实时数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceMiceRealtimeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除鼠害设备实时数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceMiceRealtimeByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.fastbee.deviceData.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.deviceData.domain.DeviceMiceRealtime;
|
||||
|
||||
/**
|
||||
* 鼠害设备实时数据Service接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-11-07
|
||||
*/
|
||||
public interface IDeviceMiceRealtimeService
|
||||
{
|
||||
/**
|
||||
* 查询鼠害设备实时数据
|
||||
*
|
||||
* @param id 鼠害设备实时数据主键
|
||||
* @return 鼠害设备实时数据
|
||||
*/
|
||||
public DeviceMiceRealtime selectDeviceMiceRealtimeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询鼠害设备实时数据列表
|
||||
*
|
||||
* @param deviceMiceRealtime 鼠害设备实时数据
|
||||
* @return 鼠害设备实时数据集合
|
||||
*/
|
||||
public List<DeviceMiceRealtime> selectDeviceMiceRealtimeList(DeviceMiceRealtime deviceMiceRealtime);
|
||||
|
||||
/**
|
||||
* 新增鼠害设备实时数据
|
||||
*
|
||||
* @param deviceMiceRealtime 鼠害设备实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceMiceRealtime(DeviceMiceRealtime deviceMiceRealtime);
|
||||
|
||||
/**
|
||||
* 修改鼠害设备实时数据
|
||||
*
|
||||
* @param deviceMiceRealtime 鼠害设备实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceMiceRealtime(DeviceMiceRealtime deviceMiceRealtime);
|
||||
|
||||
/**
|
||||
* 批量删除鼠害设备实时数据
|
||||
*
|
||||
* @param ids 需要删除的鼠害设备实时数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceMiceRealtimeByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除鼠害设备实时数据信息
|
||||
*
|
||||
* @param id 鼠害设备实时数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceMiceRealtimeById(Long id);
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.fastbee.deviceData.service.imp;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fastbee.deviceData.mapper.DeviceMiceRealtimeMapper;
|
||||
import com.fastbee.deviceData.domain.DeviceMiceRealtime;
|
||||
import com.fastbee.deviceData.service.IDeviceMiceRealtimeService;
|
||||
|
||||
/**
|
||||
* 鼠害设备实时数据Service业务层处理
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-11-07
|
||||
*/
|
||||
@Service
|
||||
public class DeviceMiceRealtimeServiceImpl implements IDeviceMiceRealtimeService
|
||||
{
|
||||
@Autowired
|
||||
private DeviceMiceRealtimeMapper deviceMiceRealtimeMapper;
|
||||
|
||||
/**
|
||||
* 查询鼠害设备实时数据
|
||||
*
|
||||
* @param id 鼠害设备实时数据主键
|
||||
* @return 鼠害设备实时数据
|
||||
*/
|
||||
@Override
|
||||
public DeviceMiceRealtime selectDeviceMiceRealtimeById(Long id)
|
||||
{
|
||||
return deviceMiceRealtimeMapper.selectDeviceMiceRealtimeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询鼠害设备实时数据列表
|
||||
*
|
||||
* @param deviceMiceRealtime 鼠害设备实时数据
|
||||
* @return 鼠害设备实时数据
|
||||
*/
|
||||
@Override
|
||||
public List<DeviceMiceRealtime> selectDeviceMiceRealtimeList(DeviceMiceRealtime deviceMiceRealtime)
|
||||
{
|
||||
return deviceMiceRealtimeMapper.selectDeviceMiceRealtimeList(deviceMiceRealtime);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增鼠害设备实时数据
|
||||
*
|
||||
* @param deviceMiceRealtime 鼠害设备实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDeviceMiceRealtime(DeviceMiceRealtime deviceMiceRealtime)
|
||||
{
|
||||
return deviceMiceRealtimeMapper.insertDeviceMiceRealtime(deviceMiceRealtime);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改鼠害设备实时数据
|
||||
*
|
||||
* @param deviceMiceRealtime 鼠害设备实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDeviceMiceRealtime(DeviceMiceRealtime deviceMiceRealtime)
|
||||
{
|
||||
return deviceMiceRealtimeMapper.updateDeviceMiceRealtime(deviceMiceRealtime);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除鼠害设备实时数据
|
||||
*
|
||||
* @param ids 需要删除的鼠害设备实时数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDeviceMiceRealtimeByIds(Long[] ids)
|
||||
{
|
||||
return deviceMiceRealtimeMapper.deleteDeviceMiceRealtimeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除鼠害设备实时数据信息
|
||||
*
|
||||
* @param id 鼠害设备实时数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDeviceMiceRealtimeById(Long id)
|
||||
{
|
||||
return deviceMiceRealtimeMapper.deleteDeviceMiceRealtimeById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
<?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.deviceData.mapper.DeviceMiceRealtimeMapper">
|
||||
|
||||
<resultMap type="DeviceMiceRealtime" id="DeviceMiceRealtimeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="feedDelivery" column="feed_delivery" />
|
||||
<result property="infraredDetection" column="infrared_detection" />
|
||||
<result property="export" column="export" />
|
||||
<result property="fillLight" column="fill_light" />
|
||||
<result property="weight" column="weight" />
|
||||
<result property="lng" column="lng" />
|
||||
<result property="lat" column="lat" />
|
||||
<result property="workingMode" column="working_mode" />
|
||||
<result property="netWeight" column="net_weight" />
|
||||
<result property="takePicture" column="take_picture" />
|
||||
<result property="deviceAddr" column="device_addr" />
|
||||
<result property="truthStatus" column="truth_status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeviceMiceRealtimeVo">
|
||||
select id, feed_delivery, infrared_detection, export, fill_light, weight, lng, lat, working_mode, net_weight, take_picture, device_addr, truth_status from iot_device_mice_realtime
|
||||
</sql>
|
||||
|
||||
<select id="selectDeviceMiceRealtimeList" parameterType="DeviceMiceRealtime" resultMap="DeviceMiceRealtimeResult">
|
||||
<include refid="selectDeviceMiceRealtimeVo"/>
|
||||
<where>
|
||||
<if test="feedDelivery != null and feedDelivery != ''"> and feed_delivery = #{feedDelivery}</if>
|
||||
<if test="infraredDetection != null and infraredDetection != ''"> and infrared_detection = #{infraredDetection}</if>
|
||||
<if test="export != null and export != ''"> and export = #{export}</if>
|
||||
<if test="fillLight != null and fillLight != ''"> and fill_light = #{fillLight}</if>
|
||||
<if test="weight != null and weight != ''"> and weight = #{weight}</if>
|
||||
<if test="lng != null and lng != ''"> and lng = #{lng}</if>
|
||||
<if test="lat != null and lat != ''"> and lat = #{lat}</if>
|
||||
<if test="workingMode != null and workingMode != ''"> and working_mode = #{workingMode}</if>
|
||||
<if test="netWeight != null and netWeight != ''"> and net_weight = #{netWeight}</if>
|
||||
<if test="takePicture != null and takePicture != ''"> and take_picture = #{takePicture}</if>
|
||||
<if test="deviceAddr != null and deviceAddr != ''"> and device_addr = #{deviceAddr}</if>
|
||||
<if test="truthStatus != null and truthStatus != ''"> and truth_status = #{truthStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDeviceMiceRealtimeById" parameterType="Long" resultMap="DeviceMiceRealtimeResult">
|
||||
<include refid="selectDeviceMiceRealtimeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDeviceMiceRealtime" parameterType="DeviceMiceRealtime" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into iot_device_mice_realtime
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="feedDelivery != null">feed_delivery,</if>
|
||||
<if test="infraredDetection != null">infrared_detection,</if>
|
||||
<if test="export != null">export,</if>
|
||||
<if test="fillLight != null">fill_light,</if>
|
||||
<if test="weight != null">weight,</if>
|
||||
<if test="lng != null">lng,</if>
|
||||
<if test="lat != null">lat,</if>
|
||||
<if test="workingMode != null">working_mode,</if>
|
||||
<if test="netWeight != null">net_weight,</if>
|
||||
<if test="takePicture != null">take_picture,</if>
|
||||
<if test="deviceAddr != null">device_addr,</if>
|
||||
<if test="truthStatus != null">truth_status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="feedDelivery != null">#{feedDelivery},</if>
|
||||
<if test="infraredDetection != null">#{infraredDetection},</if>
|
||||
<if test="export != null">#{export},</if>
|
||||
<if test="fillLight != null">#{fillLight},</if>
|
||||
<if test="weight != null">#{weight},</if>
|
||||
<if test="lng != null">#{lng},</if>
|
||||
<if test="lat != null">#{lat},</if>
|
||||
<if test="workingMode != null">#{workingMode},</if>
|
||||
<if test="netWeight != null">#{netWeight},</if>
|
||||
<if test="takePicture != null">#{takePicture},</if>
|
||||
<if test="deviceAddr != null">#{deviceAddr},</if>
|
||||
<if test="truthStatus != null">#{truthStatus},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDeviceMiceRealtime" parameterType="DeviceMiceRealtime">
|
||||
update iot_device_mice_realtime
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="feedDelivery != null">feed_delivery = #{feedDelivery},</if>
|
||||
<if test="infraredDetection != null">infrared_detection = #{infraredDetection},</if>
|
||||
<if test="export != null">export = #{export},</if>
|
||||
<if test="fillLight != null">fill_light = #{fillLight},</if>
|
||||
<if test="weight != null">weight = #{weight},</if>
|
||||
<if test="lng != null">lng = #{lng},</if>
|
||||
<if test="lat != null">lat = #{lat},</if>
|
||||
<if test="workingMode != null">working_mode = #{workingMode},</if>
|
||||
<if test="netWeight != null">net_weight = #{netWeight},</if>
|
||||
<if test="takePicture != null">take_picture = #{takePicture},</if>
|
||||
<if test="deviceAddr != null">device_addr = #{deviceAddr},</if>
|
||||
<if test="truthStatus != null">truth_status = #{truthStatus},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDeviceMiceRealtimeById" parameterType="Long">
|
||||
delete from iot_device_mice_realtime where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDeviceMiceRealtimeByIds" parameterType="String">
|
||||
delete from iot_device_mice_realtime where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user