水泵使用记录
This commit is contained in:
@ -0,0 +1,50 @@
|
||||
package com.fastbee.rechargecard.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 水泵设备使用记录对象 ng_water_pump_usage_records
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-19
|
||||
*/
|
||||
@ApiModel(value = "NgWaterPumpUsageRecords",description = "水泵设备使用记录 ng_water_pump_usage_records")
|
||||
@Data
|
||||
public class NgWaterPumpUsageRecords implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 开泵时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "开泵时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty("开泵时间")
|
||||
private Date pumpStartTime;
|
||||
|
||||
/** 关泵时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "关泵时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty("关泵时间")
|
||||
private Date pumpStopTime;
|
||||
|
||||
/** 设备编号 */
|
||||
@Excel(name = "设备编号")
|
||||
@ApiModelProperty("设备编号")
|
||||
private String deviceNumber;
|
||||
|
||||
/** 报文内容 */
|
||||
@Excel(name = "报文内容")
|
||||
@ApiModelProperty("报文内容")
|
||||
private String messageContent;
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.fastbee.rechargecard.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.rechargecard.domain.NgWaterPumpUsageRecords;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 水泵设备使用记录Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-19
|
||||
*/
|
||||
@Mapper
|
||||
public interface NgWaterPumpUsageRecordsMapper
|
||||
{
|
||||
/**
|
||||
* 查询水泵设备使用记录
|
||||
*
|
||||
* @param id 水泵设备使用记录主键
|
||||
* @return 水泵设备使用记录
|
||||
*/
|
||||
public NgWaterPumpUsageRecords selectNgWaterPumpUsageRecordsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询水泵设备使用记录列表
|
||||
*
|
||||
* @param ngWaterPumpUsageRecords 水泵设备使用记录
|
||||
* @return 水泵设备使用记录集合
|
||||
*/
|
||||
public List<NgWaterPumpUsageRecords> selectNgWaterPumpUsageRecordsList(NgWaterPumpUsageRecords ngWaterPumpUsageRecords);
|
||||
|
||||
/**
|
||||
* 新增水泵设备使用记录
|
||||
*
|
||||
* @param ngWaterPumpUsageRecords 水泵设备使用记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNgWaterPumpUsageRecords(NgWaterPumpUsageRecords ngWaterPumpUsageRecords);
|
||||
|
||||
/**
|
||||
* 修改水泵设备使用记录
|
||||
*
|
||||
* @param ngWaterPumpUsageRecords 水泵设备使用记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNgWaterPumpUsageRecords(NgWaterPumpUsageRecords ngWaterPumpUsageRecords);
|
||||
|
||||
/**
|
||||
* 删除水泵设备使用记录
|
||||
*
|
||||
* @param id 水泵设备使用记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNgWaterPumpUsageRecordsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除水泵设备使用记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNgWaterPumpUsageRecordsByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.fastbee.rechargecard.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.rechargecard.domain.NgWaterPumpUsageRecords;
|
||||
|
||||
/**
|
||||
* 水泵设备使用记录Service接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-19
|
||||
*/
|
||||
public interface INgWaterPumpUsageRecordsService
|
||||
{
|
||||
/**
|
||||
* 查询水泵设备使用记录
|
||||
*
|
||||
* @param id 水泵设备使用记录主键
|
||||
* @return 水泵设备使用记录
|
||||
*/
|
||||
public NgWaterPumpUsageRecords selectNgWaterPumpUsageRecordsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询水泵设备使用记录列表
|
||||
*
|
||||
* @param ngWaterPumpUsageRecords 水泵设备使用记录
|
||||
* @return 水泵设备使用记录集合
|
||||
*/
|
||||
public List<NgWaterPumpUsageRecords> selectNgWaterPumpUsageRecordsList(NgWaterPumpUsageRecords ngWaterPumpUsageRecords);
|
||||
|
||||
/**
|
||||
* 新增水泵设备使用记录
|
||||
*
|
||||
* @param ngWaterPumpUsageRecords 水泵设备使用记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNgWaterPumpUsageRecords(NgWaterPumpUsageRecords ngWaterPumpUsageRecords);
|
||||
|
||||
/**
|
||||
* 修改水泵设备使用记录
|
||||
*
|
||||
* @param ngWaterPumpUsageRecords 水泵设备使用记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNgWaterPumpUsageRecords(NgWaterPumpUsageRecords ngWaterPumpUsageRecords);
|
||||
|
||||
/**
|
||||
* 批量删除水泵设备使用记录
|
||||
*
|
||||
* @param ids 需要删除的水泵设备使用记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNgWaterPumpUsageRecordsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除水泵设备使用记录信息
|
||||
*
|
||||
* @param id 水泵设备使用记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNgWaterPumpUsageRecordsById(Long id);
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.fastbee.rechargecard.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fastbee.rechargecard.mapper.NgWaterPumpUsageRecordsMapper;
|
||||
import com.fastbee.rechargecard.domain.NgWaterPumpUsageRecords;
|
||||
import com.fastbee.rechargecard.service.INgWaterPumpUsageRecordsService;
|
||||
|
||||
/**
|
||||
* 水泵设备使用记录Service业务层处理
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-19
|
||||
*/
|
||||
@Service
|
||||
public class NgWaterPumpUsageRecordsServiceImpl implements INgWaterPumpUsageRecordsService
|
||||
{
|
||||
@Autowired
|
||||
private NgWaterPumpUsageRecordsMapper ngWaterPumpUsageRecordsMapper;
|
||||
|
||||
/**
|
||||
* 查询水泵设备使用记录
|
||||
*
|
||||
* @param id 水泵设备使用记录主键
|
||||
* @return 水泵设备使用记录
|
||||
*/
|
||||
@Override
|
||||
public NgWaterPumpUsageRecords selectNgWaterPumpUsageRecordsById(Long id)
|
||||
{
|
||||
return ngWaterPumpUsageRecordsMapper.selectNgWaterPumpUsageRecordsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询水泵设备使用记录列表
|
||||
*
|
||||
* @param ngWaterPumpUsageRecords 水泵设备使用记录
|
||||
* @return 水泵设备使用记录
|
||||
*/
|
||||
@Override
|
||||
public List<NgWaterPumpUsageRecords> selectNgWaterPumpUsageRecordsList(NgWaterPumpUsageRecords ngWaterPumpUsageRecords)
|
||||
{
|
||||
return ngWaterPumpUsageRecordsMapper.selectNgWaterPumpUsageRecordsList(ngWaterPumpUsageRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增水泵设备使用记录
|
||||
*
|
||||
* @param ngWaterPumpUsageRecords 水泵设备使用记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertNgWaterPumpUsageRecords(NgWaterPumpUsageRecords ngWaterPumpUsageRecords)
|
||||
{
|
||||
return ngWaterPumpUsageRecordsMapper.insertNgWaterPumpUsageRecords(ngWaterPumpUsageRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改水泵设备使用记录
|
||||
*
|
||||
* @param ngWaterPumpUsageRecords 水泵设备使用记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateNgWaterPumpUsageRecords(NgWaterPumpUsageRecords ngWaterPumpUsageRecords)
|
||||
{
|
||||
return ngWaterPumpUsageRecordsMapper.updateNgWaterPumpUsageRecords(ngWaterPumpUsageRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除水泵设备使用记录
|
||||
*
|
||||
* @param ids 需要删除的水泵设备使用记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteNgWaterPumpUsageRecordsByIds(Long[] ids)
|
||||
{
|
||||
return ngWaterPumpUsageRecordsMapper.deleteNgWaterPumpUsageRecordsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除水泵设备使用记录信息
|
||||
*
|
||||
* @param id 水泵设备使用记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteNgWaterPumpUsageRecordsById(Long id)
|
||||
{
|
||||
return ngWaterPumpUsageRecordsMapper.deleteNgWaterPumpUsageRecordsById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
<?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.rechargecard.mapper.NgWaterPumpUsageRecordsMapper">
|
||||
|
||||
<resultMap type="NgWaterPumpUsageRecords" id="NgWaterPumpUsageRecordsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="pumpStartTime" column="pump_start_time" />
|
||||
<result property="pumpStopTime" column="pump_stop_time" />
|
||||
<result property="deviceNumber" column="device_number" />
|
||||
<result property="messageContent" column="message_content" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNgWaterPumpUsageRecordsVo">
|
||||
select id, pump_start_time, pump_stop_time, device_number, message_content from ng_water_pump_usage_records
|
||||
</sql>
|
||||
|
||||
<select id="selectNgWaterPumpUsageRecordsList" parameterType="NgWaterPumpUsageRecords" resultMap="NgWaterPumpUsageRecordsResult">
|
||||
<include refid="selectNgWaterPumpUsageRecordsVo"/>
|
||||
<where>
|
||||
<if test="pumpStartTime != null "> and pump_start_time = #{pumpStartTime}</if>
|
||||
<if test="pumpStopTime != null "> and pump_stop_time = #{pumpStopTime}</if>
|
||||
<if test="deviceNumber != null and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
|
||||
<if test="messageContent != null and messageContent != ''"> and message_content = #{messageContent}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectNgWaterPumpUsageRecordsById" parameterType="Long" resultMap="NgWaterPumpUsageRecordsResult">
|
||||
<include refid="selectNgWaterPumpUsageRecordsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertNgWaterPumpUsageRecords" parameterType="NgWaterPumpUsageRecords" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ng_water_pump_usage_records
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="pumpStartTime != null">pump_start_time,</if>
|
||||
<if test="pumpStopTime != null">pump_stop_time,</if>
|
||||
<if test="deviceNumber != null and deviceNumber != ''">device_number,</if>
|
||||
<if test="messageContent != null">message_content,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="pumpStartTime != null">#{pumpStartTime},</if>
|
||||
<if test="pumpStopTime != null">#{pumpStopTime},</if>
|
||||
<if test="deviceNumber != null and deviceNumber != ''">#{deviceNumber},</if>
|
||||
<if test="messageContent != null">#{messageContent},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateNgWaterPumpUsageRecords" parameterType="NgWaterPumpUsageRecords">
|
||||
update ng_water_pump_usage_records
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="pumpStartTime != null">pump_start_time = #{pumpStartTime},</if>
|
||||
<if test="pumpStopTime != null">pump_stop_time = #{pumpStopTime},</if>
|
||||
<if test="deviceNumber != null and deviceNumber != ''">device_number = #{deviceNumber},</if>
|
||||
<if test="messageContent != null">message_content = #{messageContent},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteNgWaterPumpUsageRecordsById" parameterType="Long">
|
||||
delete from ng_water_pump_usage_records where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteNgWaterPumpUsageRecordsByIds" parameterType="String">
|
||||
delete from ng_water_pump_usage_records where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user