gis组管理,站点管理相关接口完成
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
<result property="space" column="space" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="GGroupsSiteResult" type="GGroupSite" >
|
||||
<resultMap id="GGroupsSiteResult" type="GGroupSiteDto" >
|
||||
<result property="parentId" column="group_id" />
|
||||
<result property="parentName" column="group_name" />
|
||||
<result property="siteId" column="id" />
|
||||
|
@ -0,0 +1,87 @@
|
||||
<?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.fastbee.ggroup.mapper.GSiteGroupsMapper">
|
||||
|
||||
<resultMap type="GSiteGroups" id="GSiteGroupsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="siteId" column="site_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGSiteGroupsVo">
|
||||
select id, site_id, parent_id, create_by, create_time, update_time, update_by, project_id, order_num from g_site_groups
|
||||
</sql>
|
||||
|
||||
<select id="selectGSiteGroupsList" parameterType="GSiteGroups" resultMap="GSiteGroupsResult">
|
||||
<include refid="selectGSiteGroupsVo"/>
|
||||
<where>
|
||||
<if test="siteId != null "> and site_id = #{siteId}</if>
|
||||
<if test="parentId != null "> and parent_id = #{parentId}</if>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGSiteGroupsById" parameterType="Long" resultMap="GSiteGroupsResult">
|
||||
<include refid="selectGSiteGroupsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertGSiteGroups" parameterType="GSiteGroups" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into g_site_groups
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="siteId != null">site_id,</if>
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="orderNum != null">order_num,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="siteId != null">#{siteId},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="orderNum != null">#{orderNum},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGSiteGroups" parameterType="GSiteGroups">
|
||||
update g_site_groups
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="siteId != null">site_id = #{siteId},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGSiteGroupsById" parameterType="Long">
|
||||
delete from g_site_groups where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGSiteGroupsByIds" parameterType="String">
|
||||
delete from g_site_groups where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -35,29 +35,29 @@
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertGSites" parameterType="GSites" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into g_sites
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="icon != null">icon,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="space != null">space,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="icon != null">#{icon},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="space != null">#{space},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<!-- <insert id="insertGSites" parameterType="GSites" useGeneratedKeys="true" keyProperty="id">-->
|
||||
<!-- insert into g_sites-->
|
||||
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
|
||||
<!-- <if test="name != null and name != ''">name,</if>-->
|
||||
<!-- <if test="icon != null">icon,</if>-->
|
||||
<!-- <if test="type != null">type,</if>-->
|
||||
<!-- <if test="createBy != null">create_by,</if>-->
|
||||
<!-- <if test="createTime != null">create_time,</if>-->
|
||||
<!-- <if test="updateTime != null">update_time,</if>-->
|
||||
<!-- <if test="updateBy != null">update_by,</if>-->
|
||||
<!-- <if test="space != null">space,</if>-->
|
||||
<!-- </trim>-->
|
||||
<!-- <trim prefix="values (" suffix=")" suffixOverrides=",">-->
|
||||
<!-- <if test="name != null and name != ''">#{name},</if>-->
|
||||
<!-- <if test="icon != null">#{icon},</if>-->
|
||||
<!-- <if test="type != null">#{type},</if>-->
|
||||
<!-- <if test="createBy != null">#{createBy},</if>-->
|
||||
<!-- <if test="createTime != null">#{createTime},</if>-->
|
||||
<!-- <if test="updateTime != null">#{updateTime},</if>-->
|
||||
<!-- <if test="updateBy != null">#{updateBy},</if>-->
|
||||
<!-- <if test="space != null">#{space},</if>-->
|
||||
<!-- </trim>-->
|
||||
<!-- </insert>-->
|
||||
|
||||
<update id="updateGSites" parameterType="GSites">
|
||||
update g_sites
|
||||
@ -75,7 +75,7 @@
|
||||
</update>
|
||||
|
||||
<delete id="deleteGSitesById" parameterType="Long">
|
||||
delete from g_sites where id = #{id}
|
||||
delete from g_site_groups where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGSitesByIds" parameterType="String">
|
||||
|
Reference in New Issue
Block a user