|
|
@ -17,10 +17,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<result property="createTime" column="create_time" /> |
|
|
<result property="createTime" column="create_time" /> |
|
|
<result property="sceneBackground" column="scene_background" /> |
|
|
<result property="sceneBackground" column="scene_background" /> |
|
|
<result property="describe" column="describe" /> |
|
|
<result property="describe" column="describe" /> |
|
|
|
|
|
<result property="sort" column="sort" /> |
|
|
|
|
|
<result property="useTotal" column="use_total" /> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
|
|
|
|
|
|
<sql id="selectSceneManageVo"> |
|
|
<sql id="selectSceneManageVo"> |
|
|
select id, name, type, url, source_unit, is_open, status, is_delete, creator, create_time, scene_background, `describe` from scene_manage |
|
|
select id, name, type, url, source_unit, is_open, status, is_delete, creator, create_time, scene_background, `describe`, sort, use_total from scene_manage |
|
|
</sql> |
|
|
</sql> |
|
|
|
|
|
|
|
|
<select id="selectSceneManageList" parameterType="com.zdxt.knowledge.domain.SceneManage" resultMap="SceneManageResult"> |
|
|
<select id="selectSceneManageList" parameterType="com.zdxt.knowledge.domain.SceneManage" resultMap="SceneManageResult"> |
|
|
@ -62,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="createTime != null ">create_time,</if> |
|
|
<if test="createTime != null ">create_time,</if> |
|
|
<if test="sceneBackground != null and sceneBackground != ''">scene_background,</if> |
|
|
<if test="sceneBackground != null and sceneBackground != ''">scene_background,</if> |
|
|
<if test="describe != null and describe != '' ">`describe`,</if> |
|
|
<if test="describe != null and describe != '' ">`describe`,</if> |
|
|
|
|
|
<if test="sort != null and sort != '' ">`sort`,</if> |
|
|
</trim> |
|
|
</trim> |
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
<if test="name != null and name != ''">#{name},</if> |
|
|
<if test="name != null and name != ''">#{name},</if> |
|
|
@ -75,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="createTime != null ">#{createTime},</if> |
|
|
<if test="createTime != null ">#{createTime},</if> |
|
|
<if test="sceneBackground != null and sceneBackground != ''">#{sceneBackground},</if> |
|
|
<if test="sceneBackground != null and sceneBackground != ''">#{sceneBackground},</if> |
|
|
<if test="describe != null and describe != ''">#{describe},</if> |
|
|
<if test="describe != null and describe != ''">#{describe},</if> |
|
|
|
|
|
<if test="sort != null and sort != ''">#{sort},</if> |
|
|
</trim> |
|
|
</trim> |
|
|
</insert> |
|
|
</insert> |
|
|
|
|
|
|
|
|
@ -92,6 +96,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="createTime != null ">create_time = #{createTime},</if> |
|
|
<if test="createTime != null ">create_time = #{createTime},</if> |
|
|
<if test="sceneBackground != null and sceneBackground != ''">scene_background = #{sceneBackground},</if> |
|
|
<if test="sceneBackground != null and sceneBackground != ''">scene_background = #{sceneBackground},</if> |
|
|
<if test="describe != null and describe != ''">`describe` = #{describe},</if> |
|
|
<if test="describe != null and describe != ''">`describe` = #{describe},</if> |
|
|
|
|
|
<if test="sort != null and sort != ''">`sort` = #{sort},</if> |
|
|
|
|
|
<if test="useTotal != null and useTotal != ''">`use_total` = #{useTotal},</if> |
|
|
</trim> |
|
|
</trim> |
|
|
where id = #{id} |
|
|
where id = #{id} |
|
|
</update> |
|
|
</update> |
|
|
@ -107,11 +113,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
</foreach> |
|
|
</foreach> |
|
|
</update> |
|
|
</update> |
|
|
|
|
|
|
|
|
|
|
|
<select id="selectSceneManageByIds" parameterType="String" resultMap="SceneManageResult"> |
|
|
|
|
|
<include refid="selectSceneManageVo"/> |
|
|
|
|
|
<where> |
|
|
|
|
|
and is_delete = 1 |
|
|
|
|
|
and id in |
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
|
|
|
|
#{id} |
|
|
|
|
|
</foreach> |
|
|
|
|
|
</where> |
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
<insert id="batchInsertSceneManage"> |
|
|
<insert id="batchInsertSceneManage"> |
|
|
insert into scene_manage |
|
|
insert into scene_manage |
|
|
(`name`, `type`, source_unit, is_open, creator, create_time,scene_background, `describe`) values |
|
|
(`name`, `type`, source_unit, is_open, creator, create_time,scene_background, `describe`, `sort`) values |
|
|
<foreach collection="sceneManageList" item="sceneObj" separator=","> |
|
|
<foreach collection="sceneManageList" item="sceneObj" separator=","> |
|
|
(#{sceneObj.name},#{sceneObj.type},#{sceneObj.sourceUnit},#{sceneObj.isOpen},#{sceneObj.creator},#{sceneObj.createTime},#{sceneObj.sceneBackground},#{sceneObj.describe}) |
|
|
(#{sceneObj.name},#{sceneObj.type},#{sceneObj.sourceUnit},#{sceneObj.isOpen},#{sceneObj.creator},#{sceneObj.createTime},#{sceneObj.sceneBackground},#{sceneObj.describe},#{sceneObj.sort}) |
|
|
</foreach> |
|
|
</foreach> |
|
|
</insert> |
|
|
</insert> |
|
|
|
|
|
|
|
|
|