|
@@ -11,10 +11,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="phoneNum" column="phone_num" />
|
|
|
<result property="collectTime" column="collect_time" />
|
|
|
<result property="collectSite" column="collect_site" />
|
|
|
+
|
|
|
+ <result property="equipId" column="equip_id" />
|
|
|
+ <result property="equipName" column="equip_name" />
|
|
|
+ <result property="unitName" column="unit_name" />
|
|
|
+ <result property="community" column="community" />
|
|
|
+ <result property="type" column="type" />
|
|
|
+ <result property="state" column="state" />
|
|
|
+ <result property="temperature" column="temperature" />
|
|
|
+ <result property="belongsUser" column="belongs_user" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectAkmDataVo">
|
|
|
- select id, name, id_card, phone_num, collect_time, collect_site from akm_data
|
|
|
+ select id, name, id_card, phone_num, collect_time, collect_site, equip_id, equip_name, unit_name, community, equip_id, type, state, temperature, belongs_user from akm_data
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectAkmDataList" parameterType="AkmData" resultMap="AkmDataResult">
|
|
@@ -25,6 +34,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="phoneNum != null and phoneNum != ''"> and phone_num = #{phoneNum}</if>
|
|
|
<if test="collectTime != null "> and collect_time = #{collectTime}</if>
|
|
|
<if test="collectSite != null and collectSite != ''"> and collect_site = #{collectSite}</if>
|
|
|
+
|
|
|
+ <if test="equipId != null and equipId != ''"> and equip_id = #{equipId}</if>
|
|
|
+ <if test="equipName != null and equipName != ''"> and equip_name = #{equipName}</if>
|
|
|
+ <if test="unitName != null and unitName != ''"> and unit_name = #{unitName}</if>
|
|
|
+ <if test="community != null and community != ''"> and community = #{community}</if>
|
|
|
+ <if test="type != null and type != ''"> and type = #{type}</if>
|
|
|
+ <if test="state != null and state != ''"> and state = #{state}</if>
|
|
|
+ <if test="temperature != null and temperature != ''"> and temperature = #{temperature}</if>
|
|
|
+ <if test="belongsUser != null and belongsUser != ''"> and belongs_user = #{belongsUser}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -50,6 +68,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="phoneNum != null">phone_num,</if>
|
|
|
<if test="collectTime != null">collect_time,</if>
|
|
|
<if test="collectSite != null">collect_site,</if>
|
|
|
+
|
|
|
+ <if test="equipId != null ">equip_id,</if>
|
|
|
+ <if test="equipName != null"> equip_name, </if>
|
|
|
+ <if test="unitName != null "> unit_name,</if>
|
|
|
+ <if test="community != null "> community,</if>
|
|
|
+ <if test="type != null "> type,</if>
|
|
|
+ <if test="state != null "> state,</if>
|
|
|
+ <if test="temperature != null "> temperature, </if>
|
|
|
+ <if test="belongsUser != null "> belongs_user,</if>
|
|
|
+
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ create_time,
|
|
|
+ update_time
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="name != null">#{name},</if>
|
|
@@ -57,6 +89,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="phoneNum != null">#{phoneNum},</if>
|
|
|
<if test="collectTime != null">#{collectTime},</if>
|
|
|
<if test="collectSite != null">#{collectSite},</if>
|
|
|
+
|
|
|
+
|
|
|
+ <if test="equipId != null "> #{equipId},</if>
|
|
|
+ <if test="equipName != null"> #{equipName},</if>
|
|
|
+ <if test="unitName != null ">#{unitName},</if>
|
|
|
+ <if test="community != null ">#{community},</if>
|
|
|
+ <if test="type != null">#{type},</if>
|
|
|
+ <if test="state != null ">#{state},</if>
|
|
|
+ <if test="temperature != null ">#{temperature},</if>
|
|
|
+ <if test="belongsUser != null "> #{belongsUser},</if>
|
|
|
+
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ sysdate(),sysdate()
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -68,6 +114,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="phoneNum != null">phone_num = #{phoneNum},</if>
|
|
|
<if test="collectTime != null">collect_time = #{collectTime},</if>
|
|
|
<if test="collectSite != null">collect_site = #{collectSite},</if>
|
|
|
+
|
|
|
+ <if test="equipId != null and equipId != ''"> equip_id = #{equipId},</if>
|
|
|
+ <if test="equipName != null and equipName != ''"> equip_name = #{equipName},</if>
|
|
|
+ <if test="unitName != null and unitName != ''"> unit_name = #{unitName},</if>
|
|
|
+ <if test="community != null and community != ''"> community = #{community},</if>
|
|
|
+ <if test="type != null and type != ''">type = #{type},</if>
|
|
|
+ <if test="state != null and state != ''">state = #{state},</if>
|
|
|
+ <if test="temperature != null and temperature != ''"> temperature = #{temperature},</if>
|
|
|
+ <if test="belongsUser != null and belongsUser != ''"> belongs_user = #{belongsUser},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|