Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
dealaccountdata
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 49599825
authored
May 10, 2026
by
林冲
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
_process_effect_finance,修复 WHERE rule_audit_id = {old_audit_id} AND r…
…ule_id = {old_rule_id}
1 parent
f033a0c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
scene_refactor_data/scene_split_processor.py
scene_refactor_data/scene_split_processor.py
View file @
4959982
...
...
@@ -2650,16 +2650,28 @@ class SceneSplitProcessor:
scene_type
=
audit_record
[
4
]
rule_type
=
audit_record
[
5
]
# 查询原生效记录
# 先查询旧审核记录的 rule_id
old_rule_query
=
f
"""
SELECT rule_id
FROM {audit_table}
WHERE id = {old_audit_id} AND deleted_flag = 'N';
"""
old_rule_record
=
self
.
db
.
execute_query_one
(
old_rule_query
)
if
not
old_rule_record
:
self
.
logger
.
warning
(
f
" 未找到旧审核记录: old_audit_id={old_audit_id}"
)
error_count
+=
1
continue
old_rule_id
=
old_rule_record
[
0
]
# 查询原生效记录(使用旧审核记录的 rule_id)
query_sql
=
f
"""
SELECT id, merchant_id, merchant_name, rule_type, scene_type,
rule_id, division_rule_id, effect_start_date, effect_end_date,
rule_audit_id, created_by, created_date, updated_by, updated_date
FROM {table_name}
WHERE rule_audit_id = {old_audit_id}
AND deleted_flag = 'N'
order by id
limit 1;
WHERE rule_audit_id = {old_audit_id} AND rule_id = {old_rule_id}
AND deleted_flag = 'N' limit 1;
"""
records
=
self
.
db
.
execute_query
(
query_sql
)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment