新增图例接口添加查重逻辑,添加站点接口修改json文件校验逻辑等,其他修改等

This commit is contained in:
mi9688
2024-10-15 16:46:38 +08:00
parent 29a8d107b4
commit d5fa35e6dd
22 changed files with 163 additions and 574 deletions

View File

@ -11,20 +11,24 @@
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="type" column="type" />
<result property="name" column="name" />
<result property="projectId" column="project_id" />
<result property="category" column="category" />
<result property="description" column="description" />
</resultMap>
<sql id="selectGLegendVo">
select id, icon, create_time, create_by, update_time, update_by, type, name from g_legend
select id, icon, create_time, create_by, update_time, update_by, name, project_id, category, description 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>
<if test="projectId != null "> and project_id = #{projectId}</if>
<if test="category != null and category != ''"> and category = #{category}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
</where>
</select>
@ -41,8 +45,10 @@
<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>
<if test="projectId != null">project_id,</if>
<if test="category != null">category,</if>
<if test="description != null">description,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="icon != null">#{icon},</if>
@ -50,8 +56,10 @@
<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>
<if test="projectId != null">#{projectId},</if>
<if test="category != null">#{category},</if>
<if test="description != null">#{description},</if>
</trim>
</insert>
@ -63,8 +71,10 @@
<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>
<if test="projectId != null">project_id = #{projectId},</if>
<if test="category != null">category = #{category},</if>
<if test="description != null">description = #{description},</if>
</trim>
where id = #{id}
</update>

View File

@ -1,82 +0,0 @@
<?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.GLegendTypeMapper">
<resultMap type="GLegendType" id="GLegendTypeResult">
<result property="id" column="id" />
<result property="typeName" column="type_name" />
<result property="description" column="description" />
<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="category" column="category" />
</resultMap>
<sql id="selectGLegendTypeVo">
select id, type_name, description, create_time, create_by, update_time, update_by, category from g_legend_type
</sql>
<select id="selectGLegendTypeList" parameterType="GLegendType" resultMap="GLegendTypeResult">
<include refid="selectGLegendTypeVo"/>
<where>
<if test="typeName != null and typeName != ''"> and type_name like concat('%', #{typeName}, '%')</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="category != null and category != ''"> and category = #{category}</if>
</where>
</select>
<select id="selectGLegendTypeById" parameterType="Long" resultMap="GLegendTypeResult">
<include refid="selectGLegendTypeVo"/>
where id = #{id}
</select>
<insert id="insertGLegendType" parameterType="GLegendType" useGeneratedKeys="true" keyProperty="id">
insert into g_legend_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="typeName != null and typeName != ''">type_name,</if>
<if test="description != null">description,</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="category != null">category,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="typeName != null and typeName != ''">#{typeName},</if>
<if test="description != null">#{description},</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="category != null">#{category},</if>
</trim>
</insert>
<update id="updateGLegendType" parameterType="GLegendType">
update g_legend_type
<trim prefix="SET" suffixOverrides=",">
<if test="typeName != null and typeName != ''">type_name = #{typeName},</if>
<if test="description != null">description = #{description},</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="category != null">category = #{category},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteGLegendTypeById" parameterType="Long">
delete from g_legend_type where id = #{id}
</delete>
<delete id="deleteGLegendTypeByIds" parameterType="String">
delete from g_legend_type where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>