|
@@ -11,7 +11,7 @@
|
|
|
<result column="title_" property="title" />
|
|
|
<result column="content_" property="content" />
|
|
|
<result column="cover_image_" property="coverImage" />
|
|
|
- <result column="type_" property="type" />
|
|
|
+ <result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
<result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler" />
|
|
|
<result column="create_time_" property="createTime" />
|
|
|
<result column="update_time_" property="updateTime" />
|
|
@@ -20,7 +20,7 @@
|
|
|
<sql id="queryCondition">
|
|
|
<where>
|
|
|
<if test="type != null">
|
|
|
- and type_ = #{type}
|
|
|
+ and type_ = #{type, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
and status_ = #{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
@@ -48,7 +48,8 @@
|
|
|
SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
|
|
|
</selectKey>
|
|
|
-->
|
|
|
- INSERT INTO sys_news_information (id_,title_,content_,cover_image_,type_,status_,create_time_,update_time_) VALUES(#{id},#{title},#{content},#{coverImage},#{type},#{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{createTime},#{updateTime})
|
|
|
+ INSERT INTO sys_news_information (id_,title_,content_,cover_image_,type_,status_,create_time_,update_time_)
|
|
|
+ VALUES(#{id},#{title},#{content},#{coverImage},#{type, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},now(),now)
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -58,9 +59,6 @@
|
|
|
<if test="status != null">
|
|
|
status_ = #{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
</if>
|
|
|
- <if test="id != null">
|
|
|
- id_ = #{id},
|
|
|
- </if>
|
|
|
<if test="title != null">
|
|
|
title_ = #{title},
|
|
|
</if>
|
|
@@ -74,10 +72,7 @@
|
|
|
cover_image_ = #{coverImage},
|
|
|
</if>
|
|
|
<if test="type != null">
|
|
|
- type_ = #{type},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time_ = #{createTime},
|
|
|
+ type_ = #{type, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
</if>
|
|
|
</set>
|
|
|
WHERE id_ = #{id}
|