增加内存详细处理、优化历史消息处理
This commit is contained in:
+171
@@ -0,0 +1,171 @@
|
||||
<?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.tongran.rocketmq.mapper.InitialMemoryDetailsInfoMapper">
|
||||
|
||||
<resultMap type="InitialMemoryDetailsInfo" id="InitialMemoryDetailsInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="total" column="total" />
|
||||
<result property="name" column="name" />
|
||||
<result property="location" column="location" />
|
||||
<result property="manufacturer" column="manufacturer" />
|
||||
<result property="capacity" column="capacity" />
|
||||
<result property="frequency" column="frequency" />
|
||||
<result property="serialNumber" column="serial_number" />
|
||||
<result property="type" column="type" />
|
||||
<result property="minVoltage" column="min_voltage" />
|
||||
<result property="rank" column="rank" />
|
||||
<result property="bitWidth" column="bit_width" />
|
||||
<result property="technology" column="technology" />
|
||||
<result property="partNumber" column="part_number" />
|
||||
<!-- 新增health_status字段映射 -->
|
||||
<result property="healthStatus" column="health_status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialMemoryDetailsInfoVo">
|
||||
select id, client_id, total, name, location, manufacturer, capacity, frequency, serial_number, type, min_voltage, rank, bit_width, technology, part_number, health_status, create_by, create_time, update_by, update_time, remark from initial_memory_details_info
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialMemoryDetailsInfoList" parameterType="InitialMemoryDetailsInfo" resultMap="InitialMemoryDetailsInfoResult">
|
||||
<include refid="selectInitialMemoryDetailsInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="total != null "> and total = #{total}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="location != null and location != ''"> and location = #{location}</if>
|
||||
<if test="manufacturer != null and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
|
||||
<if test="capacity != null and capacity != ''"> and capacity = #{capacity}</if>
|
||||
<if test="frequency != null and frequency != ''"> and frequency = #{frequency}</if>
|
||||
<if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="minVoltage != null and minVoltage != ''"> and min_voltage = #{minVoltage}</if>
|
||||
<if test="rank != null and rank != ''"> and rank = #{rank}</if>
|
||||
<if test="bitWidth != null and bitWidth != ''"> and bit_width = #{bitWidth}</if>
|
||||
<if test="technology != null and technology != ''"> and technology = #{technology}</if>
|
||||
<if test="partNumber != null and partNumber != ''"> and part_number = #{partNumber}</if>
|
||||
<!-- 新增health_status查询条件 -->
|
||||
<if test="healthStatus != null and healthStatus != ''"> and health_status = #{healthStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialMemoryDetailsInfoById" parameterType="Long" resultMap="InitialMemoryDetailsInfoResult">
|
||||
<include refid="selectInitialMemoryDetailsInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialMemoryDetailsInfo" parameterType="InitialMemoryDetailsInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_memory_details_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="total != null">total,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="location != null">location,</if>
|
||||
<if test="manufacturer != null">manufacturer,</if>
|
||||
<if test="capacity != null">capacity,</if>
|
||||
<if test="frequency != null">frequency,</if>
|
||||
<if test="serialNumber != null">serial_number,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="minVoltage != null">min_voltage,</if>
|
||||
<if test="rank != null">rank,</if>
|
||||
<if test="bitWidth != null">bit_width,</if>
|
||||
<if test="technology != null">technology,</if>
|
||||
<if test="partNumber != null">part_number,</if>
|
||||
<!-- 新增health_status字段 -->
|
||||
<if test="healthStatus != null">health_status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="total != null">#{total},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="location != null">#{location},</if>
|
||||
<if test="manufacturer != null">#{manufacturer},</if>
|
||||
<if test="capacity != null">#{capacity},</if>
|
||||
<if test="frequency != null">#{frequency},</if>
|
||||
<if test="serialNumber != null">#{serialNumber},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="minVoltage != null">#{minVoltage},</if>
|
||||
<if test="rank != null">#{rank},</if>
|
||||
<if test="bitWidth != null">#{bitWidth},</if>
|
||||
<if test="technology != null">#{technology},</if>
|
||||
<if test="partNumber != null">#{partNumber},</if>
|
||||
<!-- 新增health_status字段值 -->
|
||||
<if test="healthStatus != null">#{healthStatus},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
on duplicate key update
|
||||
<trim suffixOverrides=",">
|
||||
<if test="total != null">total = values(total),</if>
|
||||
<if test="name != null">name = values(name),</if>
|
||||
<if test="location != null">location = values(location),</if>
|
||||
<if test="manufacturer != null">manufacturer = values(manufacturer),</if>
|
||||
<if test="capacity != null">capacity = values(capacity),</if>
|
||||
<if test="frequency != null">frequency = values(frequency),</if>
|
||||
<if test="serialNumber != null">serial_number = values(serial_number),</if>
|
||||
<if test="type != null">`type` = values(`type`),</if>
|
||||
<if test="minVoltage != null">min_voltage = values(min_voltage),</if>
|
||||
<if test="rank != null">rank = values(rank),</if>
|
||||
<if test="bitWidth != null">bit_width = values(bit_width),</if>
|
||||
<if test="technology != null">technology = values(technology),</if>
|
||||
<if test="partNumber != null">part_number = values(part_number),</if>
|
||||
<!-- 新增health_status字段更新 -->
|
||||
<if test="healthStatus != null">health_status = values(health_status),</if>
|
||||
update_time = now(),
|
||||
<if test="remark != null">remark = values(remark),</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialMemoryDetailsInfo" parameterType="InitialMemoryDetailsInfo">
|
||||
update initial_memory_details_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
|
||||
<if test="total != null">total = #{total},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="location != null">location = #{location},</if>
|
||||
<if test="manufacturer != null">manufacturer = #{manufacturer},</if>
|
||||
<if test="capacity != null">capacity = #{capacity},</if>
|
||||
<if test="frequency != null">frequency = #{frequency},</if>
|
||||
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="minVoltage != null">min_voltage = #{minVoltage},</if>
|
||||
<if test="rank != null">rank = #{rank},</if>
|
||||
<if test="bitWidth != null">bit_width = #{bitWidth},</if>
|
||||
<if test="technology != null">technology = #{technology},</if>
|
||||
<if test="partNumber != null">part_number = #{partNumber},</if>
|
||||
<!-- 新增health_status字段更新 -->
|
||||
<if test="healthStatus != null">health_status = #{healthStatus},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialMemoryDetailsInfoById" parameterType="Long">
|
||||
delete from initial_memory_details_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialMemoryDetailsInfoByIds" parameterType="String">
|
||||
delete from initial_memory_details_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user