"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const egg_1=require("egg");class ServerService extends egg_1.Service{async honorStation(g,a,b,c){const{mysql:d}=this.app,e=await d.query("SELECT * FROM honor WHERE type = ? AND time_type = ? AND time_value = ?",[b,c,a]);if(Array.isArray(e)&&0<e.length){const e=await d.query("UPDATE honor SET station_id = ? WHERE type = ? AND time_type = ? AND time_value = ?",[g,b,c,a]);return Array.isArray(e)&&e.length&&1===e[0].affectedRows}else{const e=await d.query("INSERT INTO honor (station_id, type, time_type, time_value) VALUES (?, ?, ?, ?)",[g,b,c,a]);return Array.isArray(e)&&e.length}}}exports.default=ServerService;