123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- <?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.robot.remote.smartrobotremote.mapper.BizWaterWorkMapper">
-
- <resultMap type="BizWaterWork" id="BizWaterWorkResult">
- <result property="worksId" column="works_id" />
- <result property="parentId" column="parent_id" />
- <result property="ancestors" column="ancestors" />
- <result property="worksName" column="works_name" />
- <result property="orderNum" column="order_num" />
- <result property="worksStatus" column="works_status" />
- <result property="delFlag" column="del_flag" />
- <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="worksNo" column="works_no" />
- <result property="worksProvince" column="works_province" />
- <result property="worksCity" column="works_city" />
- <result property="worksArea" column="works_area" />
- <result property="worksLongitude" column="works_longitude" />
- <result property="worksLatitude" column="works_latitude" />
- <result property="worksAddress" column="works_address" />
- <result property="worksCount" column="works_count" />
- <result property="worksType" column="works_type" />
- <result property="worksCenter" column="works_center" />
- <result property="worksBelong" column="works_belong" />
- <result property="worksMaintainer" column="works_maintainer" />
- <result property="worksTel" column="works_tel" />
- </resultMap>
- <sql id="selectBizWaterWorkVo">
- select works_id, parent_id, ancestors, works_name, order_num, works_status, del_flag, create_by, create_time, update_by, update_time, works_no, works_province, works_city, works_area, works_longitude, works_latitude, works_address, works_count, works_type, works_center, works_belong, works_maintainer, works_tel from biz_water_work
- </sql>
- <select id="selectBizWaterWorkList" parameterType="BizWaterWork" resultMap="BizWaterWorkResult">
- <include refid="selectBizWaterWorkVo"/>
- <where>
- <if test="parentId != null "> and parent_id = #{parentId}</if>
- <if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
- <if test="worksName != null and worksName != ''"> and works_name like concat('%', #{worksName}, '%')</if>
- <if test="orderNum != null "> and order_num = #{orderNum}</if>
- <if test="worksStatus != null and worksStatus != ''"> and works_status = #{worksStatus}</if>
- <if test="worksNo != null and worksNo != ''"> and works_no = #{worksNo}</if>
- <if test="worksProvince != null and worksProvince != ''"> and works_province = #{worksProvince}</if>
- <if test="worksCity != null and worksCity != ''"> and works_city = #{worksCity}</if>
- <if test="worksArea != null and worksArea != ''"> and works_area = #{worksArea}</if>
- <if test="worksLongitude != null and worksLongitude != ''"> and works_longitude = #{worksLongitude}</if>
- <if test="worksLatitude != null and worksLatitude != ''"> and works_latitude = #{worksLatitude}</if>
- <if test="worksAddress != null and worksAddress != ''"> and works_address = #{worksAddress}</if>
- <if test="worksCount != null "> and works_count = #{worksCount}</if>
- <if test="worksType != null and worksType != ''"> and works_type = #{worksType}</if>
- <if test="worksCenter != null and worksCenter != ''"> and works_center = #{worksCenter}</if>
- <if test="worksBelong != null "> and works_belong = #{worksBelong}</if>
- <if test="worksMaintainer != null and worksMaintainer != ''"> and works_maintainer = #{worksMaintainer}</if>
- <if test="worksTel != null and worksTel != ''"> and works_tel = #{worksTel}</if>
- </where>
- </select>
-
- <select id="selectBizWaterWorkByWorksId" parameterType="Long" resultMap="BizWaterWorkResult">
- <include refid="selectBizWaterWorkVo"/>
- where works_id = #{worksId}
- </select>
- <insert id="insertBizWaterWork" parameterType="BizWaterWork">
- insert into biz_water_work
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="worksId != null">works_id,</if>
- <if test="parentId != null">parent_id,</if>
- <if test="ancestors != null">ancestors,</if>
- <if test="worksName != null">works_name,</if>
- <if test="orderNum != null">order_num,</if>
- <if test="worksStatus != null">works_status,</if>
- <if test="delFlag != null">del_flag,</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="worksNo != null">works_no,</if>
- <if test="worksProvince != null">works_province,</if>
- <if test="worksCity != null">works_city,</if>
- <if test="worksArea != null">works_area,</if>
- <if test="worksLongitude != null">works_longitude,</if>
- <if test="worksLatitude != null">works_latitude,</if>
- <if test="worksAddress != null">works_address,</if>
- <if test="worksCount != null">works_count,</if>
- <if test="worksType != null">works_type,</if>
- <if test="worksCenter != null">works_center,</if>
- <if test="worksBelong != null">works_belong,</if>
- <if test="worksMaintainer != null">works_maintainer,</if>
- <if test="worksTel != null">works_tel,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="worksId != null">#{worksId},</if>
- <if test="parentId != null">#{parentId},</if>
- <if test="ancestors != null">#{ancestors},</if>
- <if test="worksName != null">#{worksName},</if>
- <if test="orderNum != null">#{orderNum},</if>
- <if test="worksStatus != null">#{worksStatus},</if>
- <if test="delFlag != null">#{delFlag},</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="worksNo != null">#{worksNo},</if>
- <if test="worksProvince != null">#{worksProvince},</if>
- <if test="worksCity != null">#{worksCity},</if>
- <if test="worksArea != null">#{worksArea},</if>
- <if test="worksLongitude != null">#{worksLongitude},</if>
- <if test="worksLatitude != null">#{worksLatitude},</if>
- <if test="worksAddress != null">#{worksAddress},</if>
- <if test="worksCount != null">#{worksCount},</if>
- <if test="worksType != null">#{worksType},</if>
- <if test="worksCenter != null">#{worksCenter},</if>
- <if test="worksBelong != null">#{worksBelong},</if>
- <if test="worksMaintainer != null">#{worksMaintainer},</if>
- <if test="worksTel != null">#{worksTel},</if>
- </trim>
- </insert>
- <update id="updateBizWaterWork" parameterType="BizWaterWork">
- update biz_water_work
- <trim prefix="SET" suffixOverrides=",">
- <if test="parentId != null">parent_id = #{parentId},</if>
- <if test="ancestors != null">ancestors = #{ancestors},</if>
- <if test="worksName != null">works_name = #{worksName},</if>
- <if test="orderNum != null">order_num = #{orderNum},</if>
- <if test="worksStatus != null">works_status = #{worksStatus},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</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="worksNo != null">works_no = #{worksNo},</if>
- <if test="worksProvince != null">works_province = #{worksProvince},</if>
- <if test="worksCity != null">works_city = #{worksCity},</if>
- <if test="worksArea != null">works_area = #{worksArea},</if>
- <if test="worksLongitude != null">works_longitude = #{worksLongitude},</if>
- <if test="worksLatitude != null">works_latitude = #{worksLatitude},</if>
- <if test="worksAddress != null">works_address = #{worksAddress},</if>
- <if test="worksCount != null">works_count = #{worksCount},</if>
- <if test="worksType != null">works_type = #{worksType},</if>
- <if test="worksCenter != null">works_center = #{worksCenter},</if>
- <if test="worksBelong != null">works_belong = #{worksBelong},</if>
- <if test="worksMaintainer != null">works_maintainer = #{worksMaintainer},</if>
- <if test="worksTel != null">works_tel = #{worksTel},</if>
- </trim>
- where works_id = #{worksId}
- </update>
- <delete id="deleteBizWaterWorkByWorksId" parameterType="Long">
- delete from biz_water_work where works_id = #{worksId}
- </delete>
- <delete id="deleteBizWaterWorkByWorksIds" parameterType="String">
- delete from biz_water_work where works_id in
- <foreach item="worksId" collection="array" open="(" separator="," close=")">
- #{worksId}
- </foreach>
- </delete>
- </mapper>
|