|
@@ -44,9 +44,6 @@
|
|
|
<if test="userId != null">
|
|
|
user_id_ = #{userId},
|
|
|
</if>
|
|
|
- <if test="id != null">
|
|
|
- id_ = #{id},
|
|
|
- </if>
|
|
|
<if test="serialNo != null">
|
|
|
serial_no_ = #{serialNo},
|
|
|
</if>
|
|
@@ -68,6 +65,33 @@
|
|
|
</set>
|
|
|
WHERE id_ = #{id}
|
|
|
</update>
|
|
|
+
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
+ <foreach collection="list" item="item" index="index" open="" close="" separator=";">
|
|
|
+ UPDATE teacher_contracts
|
|
|
+ <set>
|
|
|
+ <if test="item.userId != null">
|
|
|
+ user_id_ = #{item.userId},
|
|
|
+ </if>
|
|
|
+ <if test="item.serialNo != null">
|
|
|
+ serial_no_ = #{item.serialNo},
|
|
|
+ </if>
|
|
|
+ <if test="item.url != null">
|
|
|
+ url_ = #{item.url},
|
|
|
+ </if>
|
|
|
+ <if test="item.contractNo != null">
|
|
|
+ contract_no_ = #{item.contractNo},
|
|
|
+ </if>
|
|
|
+ <if test="item.type != null">
|
|
|
+ type_ = #{item.type},
|
|
|
+ </if>
|
|
|
+ <if test="item.createTime != null">
|
|
|
+ create_time_ = #{item.createTime},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ WHERE id_ = #{item.id} and tenant_id_ = #{item.tenantId}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
|
|
|
<!-- 根据主键删除一条记录 -->
|
|
|
<delete id="delete">
|
|
@@ -95,4 +119,8 @@
|
|
|
<select id="queryBySerialNo" resultMap="TeacherContracts">
|
|
|
SELECT * FROM teacher_contracts where serial_no_ = #{serialNo}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="queryNotUrlList" resultMap="TeacherContracts">
|
|
|
+ SELECT * FROM teacher_contracts where url_ is null or url_ = ''
|
|
|
+ </select>
|
|
|
</mapper>
|