|
@@ -0,0 +1,231 @@
|
|
|
|
+<?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.zcxk.rmcp.core.dao.MeterReplaceLogMapper">
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.zcxk.rmcp.core.entity.MeterReplaceLog">
|
|
|
|
+ <!--@mbg.generated-->
|
|
|
|
+ <!--@Table rmcp_meter_replace_log-->
|
|
|
|
+ <id column="id" property="id" />
|
|
|
|
+ <result column="tenant_id" property="tenantId" />
|
|
|
|
+ <result column="device_id" property="deviceId" />
|
|
|
|
+ <result column="replace_method" property="replaceMethod" />
|
|
|
|
+ <result column="new_product_id" property="newProductId" />
|
|
|
|
+ <result column="old_product_id" property="oldProductId" />
|
|
|
|
+ <result column="new_meter_no" property="newMeterNo" />
|
|
|
|
+ <result column="old_meter_no" property="oldMeterNo" />
|
|
|
|
+ <result column="new_begin_degree" property="newBeginDegree" />
|
|
|
|
+ <result column="old_end_degree" property="oldEndDegree" />
|
|
|
|
+ <result column="new_device_no" property="newDeviceNo" />
|
|
|
|
+ <result column="old_device_no" property="oldDeviceNo" />
|
|
|
|
+ <result column="remark" property="remark" />
|
|
|
|
+ <result column="status" property="status" />
|
|
|
|
+ <result column="replace_username" property="replaceUsername" />
|
|
|
|
+ <result column="replace_user_phone" property="replaceUserPhone" />
|
|
|
|
+ <result column="sync_status" property="syncStatus" />
|
|
|
|
+ <result column="create_date" property="createDate" />
|
|
|
|
+ <result column="update_date" property="updateDate" />
|
|
|
|
+ <result column="create_by" property="createBy" />
|
|
|
|
+ <result column="update_by" property="updateBy" />
|
|
|
|
+ </resultMap>
|
|
|
|
+ <sql id="Base_Column_List">
|
|
|
|
+ <!--@mbg.generated-->
|
|
|
|
+ id, tenant_id, device_id, replace_method, new_product_id, old_product_id, new_meter_no,
|
|
|
|
+ old_meter_no, new_begin_degree, old_end_degree, new_device_no, old_device_no, remark,
|
|
|
|
+ `status`, replace_username, replace_user_phone, sync_status, create_date, update_date,
|
|
|
|
+ create_by, update_by
|
|
|
|
+ </sql>
|
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.zcxk.rmcp.core.entity.MeterReplaceLog" useGeneratedKeys="true">
|
|
|
|
+ <!--@mbg.generated-->
|
|
|
|
+ insert into rmcp_meter_replace_log
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="tenantId != null">
|
|
|
|
+ tenant_id,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="deviceId != null">
|
|
|
|
+ device_id,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="replaceMethod != null">
|
|
|
|
+ replace_method,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newProductId != null">
|
|
|
|
+ new_product_id,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="oldProductId != null">
|
|
|
|
+ old_product_id,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newMeterNo != null">
|
|
|
|
+ new_meter_no,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="oldMeterNo != null">
|
|
|
|
+ old_meter_no,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newBeginDegree != null">
|
|
|
|
+ new_begin_degree,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="oldEndDegree != null">
|
|
|
|
+ old_end_degree,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newDeviceNo != null">
|
|
|
|
+ new_device_no,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="oldDeviceNo != null">
|
|
|
|
+ old_device_no,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remark != null">
|
|
|
|
+ remark,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null">
|
|
|
|
+ `status`,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="replaceUsername != null">
|
|
|
|
+ replace_username,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="replaceUserPhone != null">
|
|
|
|
+ replace_user_phone,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="syncStatus != null">
|
|
|
|
+ sync_status,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createDate != null">
|
|
|
|
+ create_date,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateDate != null">
|
|
|
|
+ update_date,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createBy != null">
|
|
|
|
+ create_by,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateBy != null">
|
|
|
|
+ update_by,
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="tenantId != null">
|
|
|
|
+ #{tenantId},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="deviceId != null">
|
|
|
|
+ #{deviceId},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="replaceMethod != null">
|
|
|
|
+ #{replaceMethod},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newProductId != null">
|
|
|
|
+ #{newProductId},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="oldProductId != null">
|
|
|
|
+ #{oldProductId},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newMeterNo != null">
|
|
|
|
+ #{newMeterNo},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="oldMeterNo != null">
|
|
|
|
+ #{oldMeterNo},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newBeginDegree != null">
|
|
|
|
+ #{newBeginDegree},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="oldEndDegree != null">
|
|
|
|
+ #{oldEndDegree},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newDeviceNo != null">
|
|
|
|
+ #{newDeviceNo},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="oldDeviceNo != null">
|
|
|
|
+ #{oldDeviceNo},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remark != null">
|
|
|
|
+ #{remark},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null">
|
|
|
|
+ #{status},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="replaceUsername != null">
|
|
|
|
+ #{replaceUsername},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="replaceUserPhone != null">
|
|
|
|
+ #{replaceUserPhone},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="syncStatus != null">
|
|
|
|
+ #{syncStatus},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createDate != null">
|
|
|
|
+ #{createDate},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateDate != null">
|
|
|
|
+ #{updateDate},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createBy != null">
|
|
|
|
+ #{createBy},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateBy != null">
|
|
|
|
+ #{updateBy},
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.zcxk.rmcp.core.entity.MeterReplaceLog">
|
|
|
|
+ <!--@mbg.generated-->
|
|
|
|
+ update rmcp_meter_replace_log
|
|
|
|
+ <set>
|
|
|
|
+ <if test="tenantId != null">
|
|
|
|
+ tenant_id = #{tenantId},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="deviceId != null">
|
|
|
|
+ device_id = #{deviceId},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="replaceMethod != null">
|
|
|
|
+ replace_method = #{replaceMethod},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newProductId != null">
|
|
|
|
+ new_product_id = #{newProductId},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="oldProductId != null">
|
|
|
|
+ old_product_id = #{oldProductId},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newMeterNo != null">
|
|
|
|
+ new_meter_no = #{newMeterNo},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="oldMeterNo != null">
|
|
|
|
+ old_meter_no = #{oldMeterNo},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newBeginDegree != null">
|
|
|
|
+ new_begin_degree = #{newBeginDegree},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="oldEndDegree != null">
|
|
|
|
+ old_end_degree = #{oldEndDegree},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newDeviceNo != null">
|
|
|
|
+ new_device_no = #{newDeviceNo},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="oldDeviceNo != null">
|
|
|
|
+ old_device_no = #{oldDeviceNo},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remark != null">
|
|
|
|
+ remark = #{remark},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null">
|
|
|
|
+ `status` = #{status},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="replaceUsername != null">
|
|
|
|
+ replace_username = #{replaceUsername},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="replaceUserPhone != null">
|
|
|
|
+ replace_user_phone = #{replaceUserPhone},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="syncStatus != null">
|
|
|
|
+ sync_status = #{syncStatus},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createDate != null">
|
|
|
|
+ create_date = #{createDate},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateDate != null">
|
|
|
|
+ update_date = #{updateDate},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createBy != null">
|
|
|
|
+ create_by = #{createBy},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateBy != null">
|
|
|
|
+ update_by = #{updateBy},
|
|
|
|
+ </if>
|
|
|
|
+ </set>
|
|
|
|
+ where id = #{id}
|
|
|
|
+ </update>
|
|
|
|
+</mapper>
|