Spaces:
Paused
Paused
shanshel6
feat: enhance air restriction logic, fix aiMetadata null issue, and improve bulk import detection
073446b Download server/scripts/check_current_prices.js from shanshal66/chinak: direct link, hf CLI and curl.
- Browser
- Download file 614 Bytes
-
https://huggingface.co/spaces/shanshal66/chinak/resolve/main/server/scripts/check_current_prices.js
- Command line
-
hf download hf://spaces/shanshal66/chinak/server/scripts/check_current_prices.js
-
curl -L -o check_current_prices.js https://huggingface.co/spaces/shanshal66/chinak/resolve/main/server/scripts/check_current_prices.js
614 Bytes
| import prisma from '../prismaClient.js'; | |
| async function main() { | |
| try { | |
| const products = await prisma.product.findMany({ | |
| take: 5, | |
| select: { | |
| id: true, | |
| name: true, | |
| price: true, | |
| basePriceRMB: true, | |
| domesticShippingFee: true | |
| } | |
| }); | |
| console.log('Current Data Sample:'); | |
| products.forEach(p => { | |
| console.log(`ID: ${p.id} | Base (Cost): ${p.basePriceRMB} | Domestic: ${p.domesticShippingFee} | Price (Selling): ${p.price}`); | |
| }); | |
| } catch (error) { | |
| console.error(error); | |
| } finally { | |
| await prisma.$disconnect(); | |
| } | |
| } | |
| main(); | |