<?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.panzhihua.service_jinhui_community.dao.JinhuiReseauDao">
|
|
<resultMap type="com.panzhihua.service_jinhui_community.entity.JinhuiReseau" id="itemMap">
|
<result property="id" column="id" />
|
<result property="reseauName" column="reseau_name" />
|
<result property="coverage" column="coverage" />
|
<result property="acreage" column="acreage" />
|
<result property="designation" column="designation" />
|
<result property="linellae" column="linellae" />
|
<result property="broad" column="broad" />
|
<result property="fill" column="fill" />
|
<result property="rail" column="rail" />
|
<result property="reseauId" column="reseau_id" />
|
<result property="creationTime" column="creation_time" />
|
<result property="updateTime" column="update_time" />
|
</resultMap>
|
|
<!-- 分页查询 -->
|
<select id="getList" resultMap="itemMap">
|
select
|
id,
|
reseau_name,
|
coverage,
|
acreage,
|
designation,
|
linellae,
|
broad,
|
fill,
|
rail,
|
reseau_id,
|
creation_time,
|
update_time
|
from jinhui_reseau
|
order by creation_time desc
|
</select>
|
|
<!-- 绑定网格员下拉框 -->
|
<select id="getBoxList" resultMap="itemMap">
|
select
|
id,
|
reseau_name,
|
coverage,
|
acreage,
|
designation,
|
linellae,
|
broad,
|
fill,
|
rail,
|
reseau_id,
|
creation_time,
|
update_time
|
from jinhui_reseau
|
where reseau_id is null
|
order by creation_time desc
|
</select>
|
|
|
<select id="getDetails" resultMap="itemMap">
|
select
|
id,
|
reseau_name,
|
coverage,
|
acreage,
|
designation,
|
linellae,
|
broad,
|
fill,
|
rail,
|
reseau_id,
|
creation_time,
|
update_time
|
from jinhui_reseau
|
where
|
id=#{id}
|
</select>
|
|
<insert id="addData">
|
insert into jinhui_reseau
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="item.id != null and item.id != '' ">
|
id,
|
</if>
|
<if test="item.reseauName != null and item.reseauName != '' ">
|
reseau_name,
|
</if>
|
<if test="item.coverage != null and item.coverage != '' ">
|
coverage,
|
</if>
|
<if test="item.acreage != null and item.acreage != '' ">
|
acreage,
|
</if>
|
<if test="item.designation != null and item.designation != '' ">
|
designation,
|
</if>
|
<if test="item.linellae != null and item.linellae != '' ">
|
linellae,
|
</if>
|
<if test="item.broad != null and item.broad != '' ">
|
broad,
|
</if>
|
<if test="item.fill != null and item.fill != '' ">
|
fill,
|
</if>
|
<if test="item.rail != null and item.rail != '' ">
|
rail,
|
</if>
|
<if test="item.reseauId != null and item.reseauId != '' ">
|
reseau_id,
|
</if>
|
creation_time
|
</trim>
|
values
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="item.id != null and item.id != '' ">
|
#{item.id},
|
</if>
|
<if test="item.reseauName != null and item.reseauName != '' ">
|
#{item.reseauName},
|
</if>
|
<if test="item.coverage != null and item.coverage != '' ">
|
#{item.coverage},
|
</if>
|
<if test="item.acreage != null and item.acreage != '' ">
|
#{item.acreage},
|
</if>
|
<if test="item.designation != null and item.designation != '' ">
|
#{item.designation},
|
</if>
|
<if test="item.linellae != null and item.linellae != '' ">
|
#{item.linellae},
|
</if>
|
<if test="item.broad != null and item.broad != '' ">
|
#{item.broad},
|
</if>
|
<if test="item.fill != null and item.fill != '' ">
|
#{item.fill},
|
</if>
|
<if test="item.rail != null and item.rail != '' ">
|
#{item.rail},
|
</if>
|
<if test="item.reseauId != null and item.reseauId != '' ">
|
#{item.reseauId},
|
</if>
|
sysdate()
|
</trim>
|
</insert>
|
|
<update id="editData">
|
update jinhui_reseau
|
<set>
|
<if test="item.id != null and item.id != '' ">
|
id=#{item.id},
|
</if>
|
<if test="item.reseauName != null and item.reseauName != '' ">
|
reseau_name=#{item.reseauName},
|
</if>
|
<if test="item.coverage != null and item.coverage != '' ">
|
coverage=#{item.coverage},
|
</if>
|
<if test="item.acreage != null and item.acreage != '' ">
|
acreage=#{item.acreage},
|
</if>
|
<if test="item.designation != null and item.designation != '' ">
|
designation=#{item.designation},
|
</if>
|
<if test="item.linellae != null and item.linellae != '' ">
|
linellae=#{item.linellae},
|
</if>
|
<if test="item.broad != null and item.broad != '' ">
|
broad=#{item.broad},
|
</if>
|
<if test="item.fill != null and item.fill != '' ">
|
fill=#{item.fill},
|
</if>
|
<if test="item.rail != null and item.rail != '' ">
|
rail=#{item.rail},
|
</if>
|
<if test="item.reseauId != null and item.reseauId != '' ">
|
reseau_id=#{item.reseauId},
|
</if>
|
update_time=sysdate()
|
</set>
|
where id = #{item.id}
|
</update>
|
|
<delete id="expurgateData" parameterType="String">
|
delete from jinhui_reseau where id=#{id}
|
</delete>
|
|
</mapper>
|