解决发布审批单页面数据重复导致业务处理失败的问题分析与解决方案
使用操作 357
发布审批单页面,提示数据重复,业务处理失败
-
### 界面设计器发布报错提示数据重复的修复sql
## 查出异常记录
SELECT id,version from designer_ui_designer_view_layout AS a
WHERE a.version!=(
SELECT MAX(b.version)+1
FROM designer_ui_designer_view_layout_history AS b
WHERE b.layout_id = a.id
);## 修正异常记录
UPDATE designer_ui_designer_view_layout AS a
SET version = (
SELECT MAX(b.version)+1
FROM designer_ui_designer_view_layout_history AS b
WHERE b.layout_id = a.id
)
WHERE a.version!=(
SELECT MAX(b.version)+1
FROM designer_ui_designer_view_layout_history AS b
WHERE b.layout_id = a.id
);8个月前