Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
data_report
/
data-report
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 a6350c70
authored
Sep 18, 2026
by
范富荣
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改通用+权益门店组配置
1 parent
93213dda
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
data-process/common_equity_processor.py
data-process/config.py
data-process/common_equity_processor.py
View file @
a6350c7
...
@@ -294,17 +294,19 @@ class CommonEquityProcessor:
...
@@ -294,17 +294,19 @@ class CommonEquityProcessor:
def
_fetch_stores
(
self
):
def
_fetch_stores
(
self
):
"""Step1: 基础门店列表 (dj_smartcarlife)"""
"""Step1: 基础门店列表 (dj_smartcarlife)"""
group_id
=
Config
.
COMMON_EQUITY_GROUP_ID
eng
=
_engine
(
'BIZ_SQL_DATABASE_URL'
)
eng
=
_engine
(
'BIZ_SQL_DATABASE_URL'
)
sql
=
sa_text
(
sql
=
sa_text
(
"SELECT sr.merchant_id, sr.merchant_name, sm.province_name "
"SELECT sr.merchant_id, sr.merchant_name, sm.province_name "
"FROM pg_group_store_rel sr "
"FROM pg_group_store_rel sr "
"LEFT JOIN dj_car_life_service_merchant sm "
"LEFT JOIN dj_car_life_service_merchant sm "
" ON sm.merchant_id = sr.merchant_id AND sm.deleted_flag = 'N' "
" ON sm.merchant_id = sr.merchant_id AND sm.deleted_flag = 'N' "
"WHERE sr.deleted_flag = 'N'"
"WHERE sr.deleted_flag = 'N' "
" AND sr.group_id = :group_id"
)
)
result
=
{}
result
=
{}
with
eng
.
connect
()
as
conn
:
with
eng
.
connect
()
as
conn
:
for
r
in
conn
.
execute
(
sql
)
.
fetchall
():
for
r
in
conn
.
execute
(
sql
,
{
'group_id'
:
group_id
}
)
.
fetchall
():
mid
=
r
[
0
]
mid
=
r
[
0
]
if
mid
:
if
mid
:
result
[
mid
]
=
{
result
[
mid
]
=
{
...
...
data-process/config.py
View file @
a6350c7
...
@@ -96,6 +96,7 @@ class Config:
...
@@ -96,6 +96,7 @@ class Config:
# ---------- 通用+权益:直营判定基准商户号 ----------
# ---------- 通用+权益:直营判定基准商户号 ----------
COMMON_EQUITY_PARTNER_MERCHANT_ID
=
int
(
os
.
getenv
(
'COMMON_EQUITY_PARTNER_MERCHANT_ID'
,
'44206988'
))
COMMON_EQUITY_PARTNER_MERCHANT_ID
=
int
(
os
.
getenv
(
'COMMON_EQUITY_PARTNER_MERCHANT_ID'
,
'44206988'
))
COMMON_EQUITY_GROUP_ID
=
int
(
os
.
getenv
(
'COMMON_EQUITY_GROUP_ID'
,
'12'
))
# ---------- 业务系统 SQL 数据源(嘀加 dj_smartcarlife 库)----------
# ---------- 业务系统 SQL 数据源(嘀加 dj_smartcarlife 库)----------
BIZ_SQL_ENABLED
=
os
.
getenv
(
'BIZ_SQL_ENABLED'
,
'true'
)
.
lower
()
==
'true'
BIZ_SQL_ENABLED
=
os
.
getenv
(
'BIZ_SQL_ENABLED'
,
'true'
)
.
lower
()
==
'true'
...
...
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