Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
A
aidso-data
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yaowentong
aidso-data
Commits
f4a87988
Commit
f4a87988
authored
Jun 26, 2026
by
Yaowentong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
千问电商数据修复
parent
7feb7340
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
59 deletions
+39
-59
base_config.py
aidso_geo/config/base_config.py
+2
-1
dashboard.py
aidso_geo/core/routes/dashboard.py
+1
-52
queue_monitor.js
aidso_geo/core/static/dashboard/queue_monitor.js
+9
-2
doubao_android_data_process.py
aidso_geo/models/doubao_android_data_process.py
+1
-3
qianwen_android_data_process.py
aidso_geo/models/qianwen_android_data_process.py
+26
-1
No files found.
aidso_geo/config/base_config.py
View file @
f4a87988
...
...
@@ -190,6 +190,8 @@ if __name__ == '__main__':
'TYQWA:geo:batch:list'
,
'WXYY:geo:stream_batch:list'
,
'WXYY:geo:batch:list'
,
'XHSA:geo:stream_batch:list'
,
'XHSA:geo:batch:list'
,
'geo:task_commit:list'
]
t
=
init_redis
()
...
...
@@ -213,4 +215,3 @@ if __name__ == '__main__':
aidso_geo/core/routes/dashboard.py
View file @
f4a87988
...
...
@@ -3,7 +3,6 @@ from datetime import datetime
from
flask
import
jsonify
,
Blueprint
,
render_template
,
request
import
requests
from
aidso_geo.config.base_config
import
init_redis
from
aidso_geo.utils
import
bh_utils
dashboard_app
=
Blueprint
(
"dashboard"
,
__name__
)
...
...
@@ -16,7 +15,7 @@ def queue_status():
platforms
=
[
"BDAI"
,
"DB"
,
"DOUBA"
,
"DP"
,
"DPA"
,
"DYAI"
,
"KIMI"
,
"TXYB"
,
"TXYBA"
,
"TYQW"
,
"TYQWA"
,
"WXYY"
"KIMI"
,
"TXYB"
,
"TXYBA"
,
"TYQW"
,
"TYQWA"
,
"WXYY"
,
"XHSA"
]
for
platform
in
platforms
:
...
...
@@ -83,56 +82,6 @@ def get_req_trend():
}),
500
@
dashboard_app
.
route
(
"/api/third/usage/latest"
,
methods
=
[
"GET"
])
def
third_usage_latest
():
latest_rows
=
bh_utils
.
query_data
(
"""
select sync_time
from geo_third_usage_snapshot
where sync_time is not null and sync_time != ''
order by sync_time desc
limit 1
"""
)
if
latest_rows
is
None
:
return
jsonify
({
"code"
:
500
,
"msg"
:
"query latest sync_time failed"
,
"data"
:
[]
}),
500
if
not
latest_rows
:
return
jsonify
({
"code"
:
200
,
"msg"
:
"ok"
,
"sync_time"
:
""
,
"data"
:
[]
})
sync_time
=
latest_rows
[
0
]
.
get
(
"sync_time"
)
data
=
bh_utils
.
query_data
(
"""
select channel, pt, daily_limit, total_limit, today_used, total_used,
today_remain, total_remain, sync_time, insertime
from geo_third_usage_snapshot
where sync_time =
%
s
order by channel asc
"""
,
(
sync_time
,))
if
data
is
None
:
return
jsonify
({
"code"
:
500
,
"msg"
:
"query third usage snapshot failed"
,
"sync_time"
:
sync_time
,
"data"
:
[]
}),
500
return
jsonify
({
"code"
:
200
,
"msg"
:
"ok"
,
"sync_time"
:
sync_time
,
"data"
:
data
})
def
normalize_date_to_datetime
(
value
,
default_time
):
date_value
=
value
.
replace
(
"T"
,
" "
)
.
strip
()[:
10
]
datetime
.
strptime
(
date_value
,
"
%
Y-
%
m-
%
d"
)
...
...
aidso_geo/core/static/dashboard/queue_monitor.js
View file @
f4a87988
...
...
@@ -2,8 +2,11 @@ const API_URL = "/api/queue/status";
const
STATS_API_URL
=
"/api/queue/platformStats"
;
const
platforms
=
[
"BDAI"
,
"DB"
,
"DOUBA"
,
"DP"
,
"DPA"
,
"DYAI"
,
"KIMI"
,
"TXYB"
,
"TXYBA"
,
"TYQW"
,
"TYQWA"
,
"WXYY"
"KIMI"
,
"TXYB"
,
"TXYBA"
,
"TYQW"
,
"TYQWA"
,
"WXYY"
,
"XHSA"
];
const
PLATFORM_NAME_MAP
=
{
XHSA
:
"小红书手机版"
};
let
currentPanel
=
"queue"
;
let
loadedPanels
=
{
queue
:
false
,
trend
:
false
};
let
trendChartMode
=
"platform"
;
...
...
@@ -123,12 +126,16 @@ const API_URL = "/api/queue/status";
return
getStatsItems
(
responseData
)
.
map
(
item
=>
({
time
:
normalizeStatDate
(
item
[
"时间"
]
||
item
.
time
||
item
.
date
||
item
.
begin
||
""
),
platform
:
item
[
"平台"
]
||
item
.
platform
||
item
.
name
||
"未知平台"
,
platform
:
getPlatformDisplayName
(
item
[
"平台"
]
||
item
.
platform
||
item
.
name
||
"未知平台"
)
,
count
:
Number
(
item
[
"数量"
]
||
item
.
count
||
item
.
value
||
0
)
}))
.
filter
(
item
=>
item
.
time
&&
Number
.
isFinite
(
item
.
count
));
}
function
getPlatformDisplayName
(
platform
)
{
return
PLATFORM_NAME_MAP
[
String
(
platform
||
""
).
trim
()]
||
platform
;
}
function
normalizeStatDate
(
value
)
{
return
String
(
value
||
""
).
slice
(
0
,
10
);
}
...
...
aidso_geo/models/doubao_android_data_process.py
View file @
f4a87988
...
...
@@ -34,8 +34,6 @@ def doubao_mobile_process_original_data(data):
try
:
json_content
=
json
.
loads
(
payload
)
except
(
IndexError
,
json
.
JSONDecodeError
):
continue
...
...
@@ -330,7 +328,7 @@ if __name__ == '__main__':
# file_path = 'geo/c7eb465e-f385-4aa2-89c4-a7cf11897f45/KIMI/1(1).txt'
data_list
=
bh_utils
.
query_data
(
f
"select * from geo_commit_task where taskId = '
8f605073-841a-4e8f-ac4b-1a686d5e9c4f
' and platform = 'DOUBA'"
)
f
"select * from geo_commit_task where taskId = '
27721b42-3368-4526-b092-d3157aaa617a
' and platform = 'DOUBA'"
)
...
...
aidso_geo/models/qianwen_android_data_process.py
View file @
f4a87988
...
...
@@ -155,7 +155,7 @@ def qianwen_android_process_original_data(data):
if
mime_type
==
'multi_load/iframe'
and
(
multi_load_type
==
'taoassistant_fold_product_feeds'
or
multi_load_type
==
'taoassistant_single_product'
)
and
status
==
'complete'
:
for
mu
in
multi_load
:
if
mu
.
get
(
'type'
)
in
(
'taoassistant_fold_product_feeds'
,
'taoassistant_single_product'
)
:
if
mu
.
get
(
'type'
)
==
'taoassistant_fold_product_feeds'
:
source_seq
=
mu
.
get
(
'source_seq'
)
jump_url
=
next
(
(
...
...
@@ -202,6 +202,31 @@ def qianwen_android_process_original_data(data):
"source_seq"
:
source_seq
,
"auctionURL"
:
pro
.
get
(
'auctionURL'
),
})
if
mu
.
get
(
'type'
)
==
'taoassistant_single_product'
:
mu_content
=
mu
.
get
(
'content'
,{})
mu_content_cardData
=
mu_content
.
get
(
'cardData'
,{})
mu_content_cardData_data
=
mu_content_cardData
.
get
(
'data'
,{})
if
mu_content_cardData_data
:
source_seq
=
mu_content
.
get
(
'cardId'
)
or
mu_content
.
get
(
'businessId'
)
price
=
(
mu_content_cardData_data
.
get
(
'priceShowWithIcon'
)
or
{})
.
get
(
'price'
)
or
mu_content_cardData_data
.
get
(
'itemPrice'
)
or
''
taobao_list
.
append
({
"title"
:
mu_content_cardData_data
.
get
(
'title'
),
"shop_name"
:
next
(
(
item
.
get
(
'text'
,
''
)
for
item
in
mu_content_cardData_data
.
get
(
'structuredShopInfo'
,
{})
.
get
(
'infoList'
,
[])
if
item
.
get
(
'sourceType'
)
==
'shop_name'
),
''
),
"pic_path"
:
mu_content_cardData_data
.
get
(
'pic_path'
,
''
),
"price"
:
price
,
"jump_url"
:
mu_content_cardData_data
.
get
(
'auctionURL'
),
"source_seq"
:
source_seq
,
"auctionURL"
:
mu_content_cardData_data
.
get
(
'auctionURL'
),
})
if
taobao_list
:
response_content
+=
'render_ecom_card_widget_taobao_start:'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment