|
@@ -11,6 +11,7 @@
|
|
|
<result column="name_" property="name"/>
|
|
|
<result column="code_" property="code"/>
|
|
|
<result column="parent_subject_id_" property="parentSubjectId"/>
|
|
|
+ <result column="img_" property="img"/>
|
|
|
<result column="create_time_" property="createTime"/>
|
|
|
<result column="update_time_" property="updateTime"/>
|
|
|
<result column="del_flag_" property="delFlag" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
@@ -29,8 +30,8 @@
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.Subject" useGeneratedKeys="true" keyColumn="id"
|
|
|
keyProperty="id">
|
|
|
- INSERT INTO subject (id_,name_,code_,parent_subject_id_,create_time_,update_time_)
|
|
|
- VALUES(#{id},#{name},#{code},#{parentSubjectId},now(),now())
|
|
|
+ INSERT INTO subject (id_,name_,code_,parent_subject_id_,img_,create_time_,update_time_)
|
|
|
+ VALUES(#{id},#{name},#{code},#{parentSubjectId},#{img},now(),now())
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -46,6 +47,9 @@
|
|
|
<if test="code != null">
|
|
|
code_ = #{code},
|
|
|
</if>
|
|
|
+ <if test="img != null">
|
|
|
+ img_ = #{img},
|
|
|
+ </if>
|
|
|
<if test="updateTime != null">
|
|
|
update_time_ = NOW(),
|
|
|
</if>
|