对于没有图片的案子(照片同步出现问题)不再做处理
This commit is contained in:
@@ -245,9 +245,11 @@ def photo_mask(pk_phhd, name, id_card_num):
|
||||
def main():
|
||||
while 1:
|
||||
session = MysqlSession()
|
||||
phhds = session.query(ZxPhhd.pk_phhd, ZxPhhd.cXm, ZxPhhd.cSfzh).filter(
|
||||
ZxPhhd.paint_flag == "1"
|
||||
).limit(PHHD_BATCH_SIZE).all()
|
||||
phhds = (session.query(ZxPhhd.pk_phhd, ZxPhhd.cXm, ZxPhhd.cSfzh)
|
||||
.join(ZxPhrec, ZxPhhd.pk_phhd == ZxPhrec.pk_phhd, isouter=True)
|
||||
.filter(ZxPhhd.paint_flag == "1")
|
||||
.filter(ZxPhrec.pk_phrec.isnot(None))
|
||||
.distinct().limit(PHHD_BATCH_SIZE).all())
|
||||
# 将状态改为正在涂抹中
|
||||
pk_phhd_values = [phhd.pk_phhd for phhd in phhds]
|
||||
update_flag = (update(ZxPhhd).where(ZxPhhd.pk_phhd.in_(pk_phhd_values)).values(paint_flag="2"))
|
||||
|
||||
Reference in New Issue
Block a user