"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const egg_1=require("egg");class UploadHistoryService extends egg_1.Service{async selectRange(e,a){const{app:b}=this,c=await b.mysql.query("SELECT upload_history.station AS stationId, ip, data, time, station.name AS stationName FROM upload_history, station WHERE upload_history.station = station.id ORDER BY upload_history.id DESC LIMIT ?, ?",[a,e]);return c}async selectBasicInRange(e,a){const{app:b}=this,c=await b.mysql.query("SELECT upload_history.station AS stationId, time, station.name AS stationName FROM upload_history, station WHERE upload_history.station = station.id ORDER BY upload_history.id DESC LIMIT ?, ?",[a,e]);return c}async add(f,a,b,c){const{app:d}=this;d.mysql.query("INSERT INTO upload_history (station, ip, data, time) VALUES (?, ?, ?, ?)",[f,a,b,c])}}exports.default=UploadHistoryService;