zouxuan 5 年之前
父节点
当前提交
1445b61a5d
共有 1 个文件被更改,包括 4 次插入42 次删除
  1. 4 42
      mec-biz/src/main/resources/config/mybatis/TeacherFreeTimeMapper.xml

+ 4 - 42
mec-biz/src/main/resources/config/mybatis/TeacherFreeTimeMapper.xml

@@ -44,48 +44,10 @@
 
 	<!-- 根据主键查询一条记录 -->
 	<update id="update" parameterType="com.ym.mec.biz.dal.entity.TeacherFreeTime">
-		UPDATE teacher_free_time
-		<set>
-			<if test="monday != null">
-				monday_ = #{monday},
-			</if>
-			<if test="userId != null">
-				user_id_ = #{userId},
-			</if>
-			<if test="thursday != null">
-				thursday_ = #{thursday},
-			</if>
-			<if test="holiday != null">
-				holiday_ = #{holiday},
-			</if>
-			<if test="holiday == null">
-				holiday_ = null,
-			</if>
-			<if test="updateTime != null">
-				update_time_ = #{updateTime},
-			</if>
-			<if test="saturday != null">
-				saturday_ = #{saturday},
-			</if>
-			<if test="wednesday != null">
-				wednesday_ = #{wednesday},
-			</if>
-			<if test="friday != null">
-				friday_ = #{friday},
-			</if>
-			<if test="tuesday != null">
-				tuesday_ = #{tuesday},
-			</if>
-			<if test="sunday != null">
-				sunday_ = #{sunday},
-			</if>
-			<if test="totalTimes != null">
-				total_times_ = #{totalTimes},
-			</if>
-			<if test="totalTimes == null">
-				total_times_ = null,
-			</if>
-		</set>
+		UPDATE teacher_free_time SET
+		monday_ = #{monday},thursday_ = #{thursday},holiday_ = #{holiday},update_time_ = #{updateTime},
+		saturday_ = #{saturday},wednesday_ = #{wednesday},friday_ = #{friday},tuesday_ = #{tuesday},
+		sunday_ = #{sunday},total_times_ = #{totalTimes}
 		WHERE id_ = #{id}
 	</update>