|
@@ -24,13 +24,9 @@
|
|
<result column="href_target_" property="hrefTarget" />
|
|
<result column="href_target_" property="hrefTarget" />
|
|
<result column="order_" property="order" />
|
|
<result column="order_" property="order" />
|
|
<result column="memo_" property="memo" />
|
|
<result column="memo_" property="memo" />
|
|
- <result column="tenant_id_" property="tenantId" />
|
|
|
|
<result column="attribute1_" property="attribute1" />
|
|
<result column="attribute1_" property="attribute1" />
|
|
<result column="attribute2_" property="attribute2" />
|
|
<result column="attribute2_" property="attribute2" />
|
|
<result column="subject_id_list_" property="subjectIdList" />
|
|
<result column="subject_id_list_" property="subjectIdList" />
|
|
- <result column="organ_id_list_" property="organIdList" />
|
|
|
|
- <result column="subject_name_" property="subjectName" />
|
|
|
|
- <result column="organ_name_list_" property="organNameList" />
|
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<resultMap type="com.yonge.cooleshow.cms.dto.SysNewsInformationDto" id="SysNewsInformationDto" extends="SysNewsInformation">
|
|
<resultMap type="com.yonge.cooleshow.cms.dto.SysNewsInformationDto" id="SysNewsInformationDto" extends="SysNewsInformation">
|
|
@@ -47,9 +43,6 @@
|
|
<if test="subType != null">
|
|
<if test="subType != null">
|
|
and sni.sub_type_ = #{subType}
|
|
and sni.sub_type_ = #{subType}
|
|
</if>
|
|
</if>
|
|
- <if test="tenantId != null">
|
|
|
|
- and sni.tenant_id_ = #{tenantId}
|
|
|
|
- </if>
|
|
|
|
<if test="status != null">
|
|
<if test="status != null">
|
|
and sni.status_ = #{status, typeHandler=com.yonge.cooleshow.common.dal.CustomEnumTypeHandler}
|
|
and sni.status_ = #{status, typeHandler=com.yonge.cooleshow.common.dal.CustomEnumTypeHandler}
|
|
</if>
|
|
</if>
|
|
@@ -62,12 +55,6 @@
|
|
<if test="subjectId != null">
|
|
<if test="subjectId != null">
|
|
and find_in_set(#{subjectId},sni.subject_id_list_)
|
|
and find_in_set(#{subjectId},sni.subject_id_list_)
|
|
</if>
|
|
</if>
|
|
- <if test="organId != null">
|
|
|
|
- and (find_in_set(#{organId},sni.organ_id_list_) or sni.organ_id_list_ is null)
|
|
|
|
- </if>
|
|
|
|
- <if test="organIdList != null">
|
|
|
|
- and INTE_ARRAY(#{organIdList},sni.organ_id_list_)
|
|
|
|
- </if>
|
|
|
|
<if test="excludeIds!=null and excludeIds.size()>0">
|
|
<if test="excludeIds!=null and excludeIds.size()>0">
|
|
AND sni.id_ NOT IN
|
|
AND sni.id_ NOT IN
|
|
<foreach collection="excludeIds" item="excludeId" open="(" close=")" separator=",">
|
|
<foreach collection="excludeIds" item="excludeId" open="(" close=")" separator=",">
|
|
@@ -99,8 +86,8 @@
|
|
|
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
<!-- 向数据库增加一条记录 -->
|
|
<insert id="insert" parameterType="com.yonge.cooleshow.cms.dal.entity.SysNewsInformation" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
<insert id="insert" parameterType="com.yonge.cooleshow.cms.dal.entity.SysNewsInformation" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
- INSERT INTO sys_news_information (id_,title_,content_,cover_image_,video_cover_image_,type_,online_time_,offline_time_,sub_type_,status_,create_time_,update_time_,link_url_,href_target_,order_,del_flag_,memo_,tenant_id_,attribute1_,attribute2_,subject_id_list_,organ_id_list_)
|
|
|
|
- VALUES(#{id},#{title},#{content},#{coverImage},#{videoCoverImage},#{type},#{onlineTime},#{offlineTime},#{subType},#{status, typeHandler=com.yonge.cooleshow.common.dal.CustomEnumTypeHandler},now(),now(),#{linkUrl},#{hrefTarget},#{order},0,#{memo},#{tenantId},#{attribute1},#{attribute2},#{subjectIdList},#{organIdList})
|
|
|
|
|
|
+ INSERT INTO sys_news_information (id_,title_,content_,cover_image_,video_cover_image_,type_,online_time_,offline_time_,sub_type_,status_,create_time_,update_time_,link_url_,href_target_,order_,del_flag_,memo_,attribute1_,attribute2_,subject_id_list_)
|
|
|
|
+ VALUES(#{id},#{title},#{content},#{coverImage},#{videoCoverImage},#{type},#{onlineTime},#{offlineTime},#{subType},#{status, typeHandler=com.yonge.cooleshow.common.dal.CustomEnumTypeHandler},now(),now(),#{linkUrl},#{hrefTarget},#{order},0,#{memo},#{attribute1},#{attribute2},#{subjectIdList})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -113,9 +100,6 @@
|
|
<if test="title != null">
|
|
<if test="title != null">
|
|
title_ = #{title},
|
|
title_ = #{title},
|
|
</if>
|
|
</if>
|
|
- <if test="tenantId != null">
|
|
|
|
- tenant_id_ = #{tenantId},
|
|
|
|
- </if>
|
|
|
|
<if test="updateTime != null">
|
|
<if test="updateTime != null">
|
|
update_time_ = NOW(),
|
|
update_time_ = NOW(),
|
|
</if>
|
|
</if>
|
|
@@ -160,9 +144,6 @@
|
|
<if test="subjectIdList != null">
|
|
<if test="subjectIdList != null">
|
|
subject_id_list_ = #{subjectIdList},
|
|
subject_id_list_ = #{subjectIdList},
|
|
</if>
|
|
</if>
|
|
- <if test="organIdList != null">
|
|
|
|
- organ_id_list_ = #{organIdList},
|
|
|
|
- </if>
|
|
|
|
</set>
|
|
</set>
|
|
WHERE id_ = #{id}
|
|
WHERE id_ = #{id}
|
|
</update>
|
|
</update>
|
|
@@ -222,9 +203,6 @@
|
|
<if test="search != null">
|
|
<if test="search != null">
|
|
and sni.title_ like '%' #{search} '%'
|
|
and sni.title_ like '%' #{search} '%'
|
|
</if>
|
|
</if>
|
|
- <if test="tenantId != null">
|
|
|
|
- and sni.tenant_id_ = #{tenantId}
|
|
|
|
- </if>
|
|
|
|
<if test="excludeIds!=null and excludeIds.size()>0">
|
|
<if test="excludeIds!=null and excludeIds.size()>0">
|
|
AND sni.id_ NOT IN
|
|
AND sni.id_ NOT IN
|
|
<foreach collection="excludeIds" item="excludeId" open="(" close=")" separator=",">
|
|
<foreach collection="excludeIds" item="excludeId" open="(" close=")" separator=",">
|
|
@@ -234,9 +212,6 @@
|
|
<if test="subjectId != null">
|
|
<if test="subjectId != null">
|
|
and find_in_set(#{subjectId},sni.subject_id_list_)
|
|
and find_in_set(#{subjectId},sni.subject_id_list_)
|
|
</if>
|
|
</if>
|
|
- <if test="organId != null">
|
|
|
|
- and (find_in_set(#{organId},sni.organ_id_list_) or sni.organ_id_list_ is null)
|
|
|
|
- </if>
|
|
|
|
<if test="clientName != 'manage'">
|
|
<if test="clientName != 'manage'">
|
|
<choose>
|
|
<choose>
|
|
<when test="memo != null and memo != ''">
|
|
<when test="memo != null and memo != ''">
|
|
@@ -271,15 +246,9 @@
|
|
<if test="search != null">
|
|
<if test="search != null">
|
|
and sni.title_ like '%' #{search} '%'
|
|
and sni.title_ like '%' #{search} '%'
|
|
</if>
|
|
</if>
|
|
- <if test="tenantId != null">
|
|
|
|
- and sni.tenant_id_ = #{tenantId}
|
|
|
|
- </if>
|
|
|
|
<if test="subjectId != null">
|
|
<if test="subjectId != null">
|
|
and find_in_set(#{subjectId},sni.subject_id_list_)
|
|
and find_in_set(#{subjectId},sni.subject_id_list_)
|
|
</if>
|
|
</if>
|
|
- <if test="organId != null">
|
|
|
|
- and (find_in_set(#{organId},sni.organ_id_list_) or sni.organ_id_list_ is null)
|
|
|
|
- </if>
|
|
|
|
<if test="clientName != 'manage'">
|
|
<if test="clientName != 'manage'">
|
|
<choose>
|
|
<choose>
|
|
<when test="memo != null and memo != ''">
|
|
<when test="memo != null and memo != ''">
|