|
|
@@ -5,23 +5,35 @@
|
|
|
<mapper namespace="com.xunmei.system.mapper.SysNfcBindMapper">
|
|
|
|
|
|
<resultMap type="com.xunmei.system.domain.SysNfcBind" id="SysNfcBindResult">
|
|
|
- <result property="id" column="id"/>
|
|
|
- <result property="areaId" column="area_id"/>
|
|
|
- <result property="enable" column="enable"/>
|
|
|
- <result property="code" column="code"/>
|
|
|
- <result property="createTime" column="create_time"/>
|
|
|
- <result property="updateId" column="update_id"/>
|
|
|
- <result property="updateBy" column="update_by"/>
|
|
|
- <result property="updateTime" column="update_time"/>
|
|
|
- <result property="orgId" column="org_id"/>
|
|
|
- <result property="orgName" column="org_name"/>
|
|
|
- <result property="orgPath" column="org_path"/>
|
|
|
- <result property="collectionAreaName" column="collection_area_name"/>
|
|
|
- <result property="checkId" column="check_id"/>
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="areaId" column="area_id"/>
|
|
|
+ <result property="enable" column="enable"/>
|
|
|
+ <result property="code" column="code"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="updateId" column="update_id"/>
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
+ <result property="orgId" column="org_id"/>
|
|
|
+ <result property="orgName" column="org_name"/>
|
|
|
+ <result property="orgPath" column="org_path"/>
|
|
|
+ <result property="collectionAreaName" column="collection_area_name"/>
|
|
|
+ <result property="checkId" column="check_id"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectSysNfcBindVo">
|
|
|
- select id, area_id, enable, code, create_time, update_id, update_by, update_time, org_id, org_name, org_path, collection_area_name, check_id
|
|
|
+ select id,
|
|
|
+ area_id,
|
|
|
+ enable,
|
|
|
+ code,
|
|
|
+ create_time,
|
|
|
+ update_id,
|
|
|
+ update_by,
|
|
|
+ update_time,
|
|
|
+ org_id,
|
|
|
+ org_name,
|
|
|
+ org_path,
|
|
|
+ collection_area_name,
|
|
|
+ check_id
|
|
|
from sys_nfc_bind
|
|
|
</sql>
|
|
|
|
|
|
@@ -29,148 +41,160 @@
|
|
|
resultMap="SysNfcBindResult">
|
|
|
<include refid="selectSysNfcBindVo"/>
|
|
|
<where>
|
|
|
- <if test="areaId != null ">
|
|
|
- and area_id = #{areaId}
|
|
|
- </if>
|
|
|
- <if test="enable != null ">
|
|
|
- and enable = #{enable}
|
|
|
- </if>
|
|
|
- <if test="code != null and code != ''">
|
|
|
- and code = #{code}
|
|
|
- </if>
|
|
|
- <if test="updateId != null ">
|
|
|
- and update_id = #{updateId}
|
|
|
- </if>
|
|
|
- <if test="orgId != null ">
|
|
|
- and org_id = #{orgId}
|
|
|
- </if>
|
|
|
- <if test="orgName != null and orgName != ''">
|
|
|
- and org_name like concat('%', #{orgName}, '%')
|
|
|
- </if>
|
|
|
- <if test="orgPath != null and orgPath != ''">
|
|
|
- and org_path = #{orgPath}
|
|
|
- </if>
|
|
|
- <if test="collectionAreaName != null and collectionAreaName != ''">
|
|
|
- and collection_area_name like concat('%', #{collectionAreaName}, '%')
|
|
|
- </if>
|
|
|
- <if test="checkId != null ">
|
|
|
- and check_id = #{checkId}
|
|
|
- </if>
|
|
|
+ <if test="areaId != null ">
|
|
|
+ and area_id = #{areaId}
|
|
|
+ </if>
|
|
|
+ <if test="enable != null ">
|
|
|
+ and enable = #{enable}
|
|
|
+ </if>
|
|
|
+ <if test="code != null and code != ''">
|
|
|
+ and code = #{code}
|
|
|
+ </if>
|
|
|
+ <if test="updateId != null ">
|
|
|
+ and update_id = #{updateId}
|
|
|
+ </if>
|
|
|
+ <if test="orgId != null ">
|
|
|
+ and org_id = #{orgId}
|
|
|
+ </if>
|
|
|
+ <if test="orgName != null and orgName != ''">
|
|
|
+ and org_name like concat('%', #{orgName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="orgPath != null and orgPath != ''">
|
|
|
+ and org_path = #{orgPath}
|
|
|
+ </if>
|
|
|
+ <if test="collectionAreaName != null and collectionAreaName != ''">
|
|
|
+ and collection_area_name like concat('%', #{collectionAreaName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="checkId != null ">
|
|
|
+ and check_id = #{checkId}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectSysNfcBindById" parameterType="Long"
|
|
|
resultMap="SysNfcBindResult">
|
|
|
- <include refid="selectSysNfcBindVo"/>
|
|
|
- where id = #{id}
|
|
|
+ <include refid="selectSysNfcBindVo"/>
|
|
|
+ where id = #{id}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertSysNfcBind" parameterType="com.xunmei.system.domain.SysNfcBind">
|
|
|
insert into sys_nfc_bind
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">id,
|
|
|
- </if>
|
|
|
- <if test="areaId != null">area_id,
|
|
|
- </if>
|
|
|
- <if test="enable != null">enable,
|
|
|
- </if>
|
|
|
- <if test="code != null">code,
|
|
|
- </if>
|
|
|
- <if test="createTime != null">create_time,
|
|
|
- </if>
|
|
|
- <if test="updateId != null">update_id,
|
|
|
- </if>
|
|
|
- <if test="updateBy != null">update_by,
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">update_time,
|
|
|
- </if>
|
|
|
- <if test="orgId != null">org_id,
|
|
|
- </if>
|
|
|
- <if test="orgName != null">org_name,
|
|
|
- </if>
|
|
|
- <if test="orgPath != null">org_path,
|
|
|
- </if>
|
|
|
- <if test="collectionAreaName != null">collection_area_name,
|
|
|
- </if>
|
|
|
- <if test="checkId != null">check_id,
|
|
|
- </if>
|
|
|
+ <if test="id != null">id,
|
|
|
+ </if>
|
|
|
+ <if test="areaId != null">area_id,
|
|
|
+ </if>
|
|
|
+ <if test="enable != null">enable,
|
|
|
+ </if>
|
|
|
+ <if test="code != null">code,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">create_time,
|
|
|
+ </if>
|
|
|
+ <if test="updateId != null">update_id,
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">update_by,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">update_time,
|
|
|
+ </if>
|
|
|
+ <if test="orgId != null">org_id,
|
|
|
+ </if>
|
|
|
+ <if test="orgName != null">org_name,
|
|
|
+ </if>
|
|
|
+ <if test="orgPath != null">org_path,
|
|
|
+ </if>
|
|
|
+ <if test="collectionAreaName != null">collection_area_name,
|
|
|
+ </if>
|
|
|
+ <if test="checkId != null">check_id,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">#{id},
|
|
|
- </if>
|
|
|
- <if test="areaId != null">#{areaId},
|
|
|
- </if>
|
|
|
- <if test="enable != null">#{enable},
|
|
|
- </if>
|
|
|
- <if test="code != null">#{code},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">#{createTime},
|
|
|
- </if>
|
|
|
- <if test="updateId != null">#{updateId},
|
|
|
- </if>
|
|
|
- <if test="updateBy != null">#{updateBy},
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">#{updateTime},
|
|
|
- </if>
|
|
|
- <if test="orgId != null">#{orgId},
|
|
|
- </if>
|
|
|
- <if test="orgName != null">#{orgName},
|
|
|
- </if>
|
|
|
- <if test="orgPath != null">#{orgPath},
|
|
|
- </if>
|
|
|
- <if test="collectionAreaName != null">#{collectionAreaName},
|
|
|
- </if>
|
|
|
- <if test="checkId != null">#{checkId},
|
|
|
- </if>
|
|
|
+ <if test="id != null">#{id},
|
|
|
+ </if>
|
|
|
+ <if test="areaId != null">#{areaId},
|
|
|
+ </if>
|
|
|
+ <if test="enable != null">#{enable},
|
|
|
+ </if>
|
|
|
+ <if test="code != null">#{code},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">#{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="updateId != null">#{updateId},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">#{updateBy},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">#{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="orgId != null">#{orgId},
|
|
|
+ </if>
|
|
|
+ <if test="orgName != null">#{orgName},
|
|
|
+ </if>
|
|
|
+ <if test="orgPath != null">#{orgPath},
|
|
|
+ </if>
|
|
|
+ <if test="collectionAreaName != null">#{collectionAreaName},
|
|
|
+ </if>
|
|
|
+ <if test="checkId != null">#{checkId},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateSysNfcBind" parameterType="com.xunmei.system.domain.SysNfcBind">
|
|
|
update sys_nfc_bind
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="areaId != null">area_id =
|
|
|
- #{areaId},
|
|
|
- </if>
|
|
|
- <if test="enable != null">enable =
|
|
|
- #{enable},
|
|
|
- </if>
|
|
|
- <if test="code != null">code =
|
|
|
- #{code},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">create_time =
|
|
|
- #{createTime},
|
|
|
- </if>
|
|
|
- <if test="updateId != null">update_id =
|
|
|
- #{updateId},
|
|
|
- </if>
|
|
|
- <if test="updateBy != null">update_by =
|
|
|
- #{updateBy},
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">update_time =
|
|
|
- #{updateTime},
|
|
|
- </if>
|
|
|
- <if test="orgId != null">org_id =
|
|
|
- #{orgId},
|
|
|
- </if>
|
|
|
- <if test="orgName != null">org_name =
|
|
|
- #{orgName},
|
|
|
- </if>
|
|
|
- <if test="orgPath != null">org_path =
|
|
|
- #{orgPath},
|
|
|
- </if>
|
|
|
- <if test="collectionAreaName != null">collection_area_name =
|
|
|
- #{collectionAreaName},
|
|
|
- </if>
|
|
|
- <if test="checkId != null">check_id =
|
|
|
- #{checkId},
|
|
|
- </if>
|
|
|
+ <if test="areaId != null">area_id =
|
|
|
+ #{areaId},
|
|
|
+ </if>
|
|
|
+ <if test="enable != null">enable =
|
|
|
+ #{enable},
|
|
|
+ </if>
|
|
|
+ <if test="code != null">code =
|
|
|
+ #{code},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">create_time =
|
|
|
+ #{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="updateId != null">update_id =
|
|
|
+ #{updateId},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">update_by =
|
|
|
+ #{updateBy},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">update_time =
|
|
|
+ #{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="orgId != null">org_id =
|
|
|
+ #{orgId},
|
|
|
+ </if>
|
|
|
+ <if test="orgName != null">org_name =
|
|
|
+ #{orgName},
|
|
|
+ </if>
|
|
|
+ <if test="orgPath != null">org_path =
|
|
|
+ #{orgPath},
|
|
|
+ </if>
|
|
|
+ <if test="collectionAreaName != null">collection_area_name =
|
|
|
+ #{collectionAreaName},
|
|
|
+ </if>
|
|
|
+ <if test="checkId != null">check_id =
|
|
|
+ #{checkId},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
|
+ <update id="updateAreaNameByAreaId">
|
|
|
+ UPDATE sys_nfc_bind
|
|
|
+ SET area_name = #{areaName}
|
|
|
+ WHERE area_id = #{areaId}
|
|
|
+ </update>
|
|
|
+ <update id="updateAreaCheckNameByCheckId">
|
|
|
+ UPDATE sys_nfc_bind
|
|
|
+ SET collection_area_name = #{collectionAreaName}
|
|
|
+ WHERE check_id = #{checkId}
|
|
|
+ </update>
|
|
|
+
|
|
|
|
|
|
<delete id="deleteSysNfcBindById" parameterType="Long">
|
|
|
delete
|
|
|
- from sys_nfc_bind where id = #{id}
|
|
|
+ from sys_nfc_bind
|
|
|
+ where id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteSysNfcBindByIds" parameterType="String">
|