多级目录管理以及站点管理接口完成,图例管理基本接口
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
<result property="parentId" column="group_id" />
|
||||
<result property="parentName" column="group_name" />
|
||||
<result property="siteId" column="id" />
|
||||
<result property="siteName" column="name" />
|
||||
<result property="name" column="name" />
|
||||
<result property="icon" column="icon" />
|
||||
<result property="type" column="type" />
|
||||
<result property="space" column="space" />
|
||||
|
@ -4,15 +4,79 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fastbee.ggroup.mapper.GLegendMapper">
|
||||
|
||||
<resultMap type="GLegend" id="GGroupsResult">
|
||||
<resultMap type="GLegend" id="GLegendResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="icon" column="icon" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="icon" column="icon"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="type" column="type" />
|
||||
<result property="name" column="name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGLegendVo">
|
||||
select id, icon, create_time, create_by, update_time, update_by, type, name from g_legend
|
||||
</sql>
|
||||
|
||||
<select id="selectGLegendList" parameterType="GLegend" resultMap="GLegendResult">
|
||||
<include refid="selectGLegendVo"/>
|
||||
<where>
|
||||
<if test="icon != null and icon != ''"> and icon = #{icon}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGLegendById" parameterType="Long" resultMap="GLegendResult">
|
||||
<include refid="selectGLegendVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertGLegend" parameterType="GLegend" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into g_legend
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="icon != null">icon,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="name != null">name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="icon != null">#{icon},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGLegend" parameterType="GLegend">
|
||||
update g_legend
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="icon != null">icon = #{icon},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGLegendById" parameterType="Long">
|
||||
delete from g_legend where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGLegendByIds" parameterType="String">
|
||||
delete from g_legend where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user