You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
1.1 KiB
24 lines
1.1 KiB
|
19 hours ago
|
# -*- coding: utf-8 -*-
|
||
|
|
"""票 04 F-15 证据核查:本轮 Job 落的待发形态(升级链 vs 重复写)"""
|
||
|
|
import pymysql
|
||
|
|
|
||
|
|
conn = pymysql.connect(host='8.129.84.155', user='root', password='Itc@123456',
|
||
|
|
database='crm', charset='utf8mb4', autocommit=True,
|
||
|
|
cursorclass=pymysql.cursors.DictCursor)
|
||
|
|
cur = conn.cursor()
|
||
|
|
cur.execute("SELECT notice_status, notice_type, plan_notify_time, payload_json "
|
||
|
|
"FROM customer_pending_notice WHERE customer_id='750844481363771392' "
|
||
|
|
"ORDER BY plan_notify_time")
|
||
|
|
rows = cur.fetchall()
|
||
|
|
print('total:', len(rows))
|
||
|
|
import json as J
|
||
|
|
for r in rows:
|
||
|
|
p = J.loads(r['payload_json'] or '{}')
|
||
|
|
print(' status=', r['notice_status'], 'plan=', r['plan_notify_time'],
|
||
|
|
'seq=', p.get('remindSeq'), 'overdueDays=', p.get('overdueDays'))
|
||
|
|
seqs = [J.loads(r['payload_json'] or '{}').get('remindSeq') for r in rows]
|
||
|
|
plans = [str(r['plan_notify_time']) for r in rows]
|
||
|
|
print('seq 连续且 plan 无重复(r1 升级链行为):',
|
||
|
|
seqs == sorted(seqs) and len(set(plans)) == len(plans))
|
||
|
|
conn.close()
|