|
|
@@ -129,34 +129,43 @@ public interface FsTagUpdateQueueMapper {
|
|
|
|
|
|
|
|
|
@Update("<script>" +
|
|
|
- "<foreach collection='list' item='item' separator=';'>" +
|
|
|
"UPDATE fs_tag_update_queue" +
|
|
|
"<set>" +
|
|
|
- "<if test='item.courseLogId != null'>course_log_id = #{item.courseLogId},</if>" +
|
|
|
- "<if test='item.isFirst != null'>is_first = #{item.isFirst},</if>" +
|
|
|
- "<if test='item.courseId != null'>course_id = #{item.courseId},</if>" +
|
|
|
- "<if test='item.tagId != null'>tag_id = #{item.tagId},</if>" +
|
|
|
- "<if test='item.tagName != null'>tag_name = #{item.tagName},</if>" +
|
|
|
- "<if test='item.operationType != null'>operation_type = #{item.operationType},</if>" +
|
|
|
- "<if test='item.videoId != null'>video_id = #{item.videoId},</if>" +
|
|
|
- "<if test='item.status != null'>status = #{item.status},</if>" +
|
|
|
- "<if test='item.retryCount != null'>retry_count = #{item.retryCount},</if>" +
|
|
|
- "<if test='item.corpId != null'>corp_id = #{item.corpId},</if>" +
|
|
|
- "<if test='item.qwUserId != null'>qw_user_id = #{item.qwUserId},</if>" +
|
|
|
- "<if test='item.qwExternalContactId != null'>qw_external_contact_id = #{item.qwExternalContactId},</if>" +
|
|
|
- "<if test='item.failMsg != null'>fail_msg = #{item.failMsg},</if>" +
|
|
|
- "<if test='item.payload != null'>payload = #{item.payload},</if>" +
|
|
|
- "<if test='item.response != null'>response = #{item.response},</if>" +
|
|
|
- "<if test='item.createTime != null'>create_time = #{item.createTime},</if>" +
|
|
|
- "<if test='item.updateTime != null'>update_time = #{item.updateTime},</if>" +
|
|
|
- "<if test='item.updateBy != null'>update_by = #{item.updateBy},</if>" +
|
|
|
- "<if test='item.createBy != null'>create_by = #{item.createBy},</if>" +
|
|
|
- "<if test='item.logType != null'>log_type = #{item.logType},</if>" +
|
|
|
- "<if test='item.nextExecuteTime != null'>next_execute_time = #{item.nextExecuteTime},</if>" +
|
|
|
+ "<if test='courseLogId != null'>course_log_id = #{courseLogId},</if>" +
|
|
|
+ "<if test='isFirst != null'>is_first = #{isFirst},</if>" +
|
|
|
+ "<if test='courseId != null'>course_id = #{courseId},</if>" +
|
|
|
+ "<if test='tagId != null'>tag_id = #{tagId},</if>" +
|
|
|
+ "<if test='tagName != null'>tag_name = #{tagName},</if>" +
|
|
|
+ "<if test='operationType != null'>operation_type = #{operationType},</if>" +
|
|
|
+ "<if test='videoId != null'>video_id = #{videoId},</if>" +
|
|
|
+ "<if test='status != null'>status = #{status},</if>" +
|
|
|
+ "<if test='retryCount != null'>retry_count = #{retryCount},</if>" +
|
|
|
+ "<if test='corpId != null'>corp_id = #{corpId},</if>" +
|
|
|
+ "<if test='qwUserId != null'>qw_user_id = #{qwUserId},</if>" +
|
|
|
+ "<if test='qwExternalContactId != null'>qw_external_contact_id = #{qwExternalContactId},</if>" +
|
|
|
+ "<if test='failMsg != null'>fail_msg = #{failMsg},</if>" +
|
|
|
+ "<if test='payload != null'>payload = #{payload},</if>" +
|
|
|
+ "<if test='response != null'>response = #{response},</if>" +
|
|
|
+ "<if test='createTime != null'>create_time = #{createTime},</if>" +
|
|
|
+ "<if test='updateTime != null'>update_time = #{updateTime},</if>" +
|
|
|
+ "<if test='updateBy != null'>update_by = #{updateBy},</if>" +
|
|
|
+ "<if test='createBy != null'>create_by = #{createBy},</if>" +
|
|
|
+ "<if test='logType != null'>log_type = #{logType},</if>" +
|
|
|
+ "<if test='nextExecuteTime != null'>next_execute_time = #{nextExecuteTime},</if>" +
|
|
|
"</set>" +
|
|
|
- " WHERE id = #{item.id}" +
|
|
|
- "</foreach>" +
|
|
|
+ " WHERE id = #{id}" +
|
|
|
"</script>")
|
|
|
- int batchUpdateSelective(@Param("list") List<FsTagUpdateQueue> list);
|
|
|
+ int updateSelectiveById(FsTagUpdateQueue record);
|
|
|
+
|
|
|
+ default int batchUpdateSelective(@Param("list") List<FsTagUpdateQueue> list) {
|
|
|
+ if (list == null || list.isEmpty()) {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ int count = 0;
|
|
|
+ for (FsTagUpdateQueue item : list) {
|
|
|
+ count += updateSelectiveById(item);
|
|
|
+ }
|
|
|
+ return count;
|
|
|
+ }
|
|
|
|
|
|
}
|