|
@@ -20,6 +20,7 @@
|
|
|
<result column="href_target_" property="hrefTarget" />
|
|
|
<result column="order_" property="order" />
|
|
|
<result column="memo_" property="memo" />
|
|
|
+ <result column="tenant_id_" property="tenantId" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="queryCondition">
|
|
@@ -28,6 +29,9 @@
|
|
|
<if test="type != null">
|
|
|
and type_ = #{type}
|
|
|
</if>
|
|
|
+ <if test="tenantId != null">
|
|
|
+ and tenant_id_ = #{tenantId}
|
|
|
+ </if>
|
|
|
<if test="status != null">
|
|
|
and status_ = #{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
</if>
|
|
@@ -52,8 +56,8 @@
|
|
|
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
|
<insert id="insert" parameterType="com.ym.mec.cms.dal.entity.SysNewsInformation" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
- INSERT INTO sys_news_information (id_,title_,content_,cover_image_,type_,status_,create_time_,update_time_,link_url_,href_target_,order_,del_flag_,memo_)
|
|
|
- VALUES(#{id},#{title},#{content},#{coverImage},#{type},#{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},now(),now(),#{linkUrl},#{hrefTarget},#{order},0,#{memo})
|
|
|
+ INSERT INTO sys_news_information (id_,title_,content_,cover_image_,type_,status_,create_time_,update_time_,link_url_,href_target_,order_,del_flag_,memo_,tenant_id_)
|
|
|
+ VALUES(#{id},#{title},#{content},#{coverImage},#{type},#{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},now(),now(),#{linkUrl},#{hrefTarget},#{order},0,#{memo},#{tenantId})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -66,6 +70,9 @@
|
|
|
<if test="title != null">
|
|
|
title_ = #{title},
|
|
|
</if>
|
|
|
+ <if test="tenantId != null">
|
|
|
+ tenant_id_ = #{tenantId},
|
|
|
+ </if>
|
|
|
<if test="updateTime != null">
|
|
|
update_time_ = NOW(),
|
|
|
</if>
|
|
@@ -147,6 +154,9 @@
|
|
|
<if test="search != null">
|
|
|
and title_ like '%' #{search} '%'
|
|
|
</if>
|
|
|
+ <if test="tenantId != null">
|
|
|
+ and tenant_id_ = #{tenantId}
|
|
|
+ </if>
|
|
|
<choose>
|
|
|
<when test="memo != null and memo != ''">
|
|
|
and memo_ = #{memo}
|
|
@@ -175,6 +185,9 @@
|
|
|
<if test="search != null">
|
|
|
and title_ like '%' #{search} '%'
|
|
|
</if>
|
|
|
+ <if test="tenantId != null">
|
|
|
+ and tenant_id_ = #{tenantId}
|
|
|
+ </if>
|
|
|
<choose>
|
|
|
<when test="memo != null and memo != ''">
|
|
|
and memo_ = #{memo}
|