|
@@ -1120,7 +1120,7 @@ def get_photo_records(page: int = 1, size: int = 5):
|
|
|
.outerjoin(DeviceConfig, PhotoRecord.action_id == DeviceConfig.id)
|
|
.outerjoin(DeviceConfig, PhotoRecord.action_id == DeviceConfig.id)
|
|
|
.where(PhotoRecord.goods_art_no.in_(current_goods_art_nos))
|
|
.where(PhotoRecord.goods_art_no.in_(current_goods_art_nos))
|
|
|
.where(PhotoRecord.delete_time == None)
|
|
.where(PhotoRecord.delete_time == None)
|
|
|
- .order_by(PhotoRecord.goods_art_no, asc("id")) # 按货号分组并按ID倒序
|
|
|
|
|
|
|
+ .order_by(asc("image_index")) # 按货号分组并按ID倒序
|
|
|
)
|
|
)
|
|
|
all_items = session.exec(query).mappings().all()
|
|
all_items = session.exec(query).mappings().all()
|
|
|
|
|
|