"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const egg_1=require("egg"),moment=require("moment");class RecordService extends egg_1.Service{async add(g,a,b,c){const{mysql:d}=this.app,e=await d.query("INSERT INTO record (user, type, value, ip, time) VALUES (?, ?, ?, ?, ?)",[g,b,c,a,moment().format("YYYY-MM-DD HH:mm:ss")]);return 1===e.affectedRows}async get(){const{mysql:c}=this.app,a=await c.query("SELECT user, type, value, ip, time FROM record ORDER BY time DESC");return a}}exports.default=RecordService;