1.修改批量更新员工主播的方式

2.JDBC连接添加allowMultiQueries=true参数
This commit is contained in:
2025-07-28 15:56:21 +08:00
parent 0aff2d013f
commit 02603f4a4e
5 changed files with 21 additions and 8 deletions

View File

@@ -28,4 +28,6 @@ public interface EmployeeHostsMapper extends BaseMapperX<EmployeeHostsDO> {
IPage<EmployeeHostsDO> selectPageWithXMLWithSelf(IPage<EmployeeHostsDO> page, @Param("req") EmployeeHostsPageReqVO reqVO);
IPage<EmployeeHostsDO> selectPageWithXML(IPage<EmployeeHostsDO> page, @Param("req") EmployeeHostsPageReqVO reqVO);
void batchUpdate(ArrayList<EmployeeHostsDO> employeeHostsDOS);
}

View File

@@ -154,7 +154,7 @@ public class EmployeeHostsServiceImpl implements EmployeeHostsService {
EmployeeHostsDO updateObj = BeanUtils.toBean(employeeHostsSaveReqVO, EmployeeHostsDO.class);
employeeHostsDOS.add(updateObj);
}
employeeHostsMapper.updateBatch(employeeHostsDOS);
employeeHostsMapper.batchUpdate(employeeHostsDOS);
}
}

View File

@@ -303,4 +303,15 @@
</otherwise>
</choose>
</select>
<update id="batchUpdate">
<foreach collection="list" item="item" separator=";">
UPDATE server_employee_hosts as seh
SET
user_id = #{item.userId,jdbcType=BIGINT},
operation_status = #{item.operationStatus,jdbcType=INTEGER}
WHERE
seh.id = #{item.id}
</foreach>
</update>
</mapper>