|
@@ -11,6 +11,7 @@
|
|
|
<result column="mobile_no_" property="mobileNo"/>
|
|
|
<result column="title_" property="title"/>
|
|
|
<result column="content_" property="content"/>
|
|
|
+ <result column="url_" property="url"/>
|
|
|
<result column="user_id_" property="userId"/>
|
|
|
<result column="username_" property="username"/>
|
|
|
<result column="create_time_" property="createTime"/>
|
|
@@ -31,14 +32,17 @@
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.SysSuggestion" useGeneratedKeys="true" keyColumn="id"
|
|
|
keyProperty="id">
|
|
|
- INSERT INTO sys_suggestion (id_,mobile_no_,title_,content_,user_id_,create_time_,client_type_,type_)
|
|
|
- VALUES(#{id},#{mobileNo},#{title},#{content},#{userId},now(),#{clientType},#{type, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
|
|
|
+ INSERT INTO sys_suggestion (mobile_no_,title_,content_,user_id_,create_time_,client_type_,type_,url_)
|
|
|
+ VALUES(#{mobileNo},#{title},#{content},#{userId},now(),#{clientType},#{type, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{url})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
<update id="update" parameterType="com.ym.mec.biz.dal.entity.SysSuggestion">
|
|
|
UPDATE sys_suggestion
|
|
|
<set>
|
|
|
+ <if test="url != null">
|
|
|
+ url_ = #{url},
|
|
|
+ </if>
|
|
|
<if test="clientType != null">
|
|
|
client_type_ = #{clientType},
|
|
|
</if>
|