查询项目信息接口,完善接口逻辑逻辑等
This commit is contained in:
@ -14,10 +14,14 @@
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="space" column="space" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="spaceValue" column="space_value" />
|
||||
<result property="dataDevices" column="data_devices" />
|
||||
<result property="videoDevices" column="video_devices" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGSitesVo">
|
||||
select id, name, icon, type, create_by, create_time, update_time, update_by, space from g_sites
|
||||
select id, name, icon, type, create_by, create_time, update_time, update_by, space, project_id, space_value, data_devices, video_devices from g_sites
|
||||
</sql>
|
||||
|
||||
<select id="selectGSitesList" parameterType="GSites" resultMap="GSitesResult">
|
||||
@ -26,9 +30,11 @@
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="icon != null and icon != ''"> and icon = #{icon}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="projectId != null and projectId != ''"> and space = #{projectId}</if>
|
||||
<if test="space != null and space != ''"> and space = #{space}</if>
|
||||
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="spaceValue != null and spaceValue != ''"> and space_value = #{spaceValue}</if>
|
||||
<if test="dataDevices != null and dataDevices != ''"> and data_devices = #{dataDevices}</if>
|
||||
<if test="videoDevices != null and videoDevices != ''"> and video_devices = #{videoDevices}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -48,7 +54,10 @@
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="space != null">space,</if>
|
||||
<if test="spaceValue != null">spaceValue,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="spaceValue != null">space_value,</if>
|
||||
<if test="dataDevices != null">data_devices,</if>
|
||||
<if test="videoDevices != null">video_devices,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
@ -59,11 +68,14 @@
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="space != null">#{space},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="spaceValue != null">#{spaceValue},</if>
|
||||
<if test="dataDevices != null">#{dataDevices},</if>
|
||||
<if test="videoDevices != null">#{videoDevices},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGSites" parameterType="GSitesEditDto">
|
||||
<update id="updateGSites" parameterType="GSites">
|
||||
update g_sites
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
@ -74,13 +86,16 @@
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="space != null">space = #{space},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="spaceValue != null">space_value = #{spaceValue},</if>
|
||||
<if test="dataDevices != null">data_devices = #{dataDevices},</if>
|
||||
<if test="videoDevices != null">video_devices = #{videoDevices},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGSitesById" parameterType="Long">
|
||||
delete from g_site_groups where id = #{id}
|
||||
delete from g_sites where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGSitesByIds" parameterType="String">
|
||||
|
Reference in New Issue
Block a user