1234567891011121314151617181920 |
- 'use strict';
- const Service = require('egg').Service;
- class MessageService extends Service {
- async add( data ) {
- let mysql = this.app.mysql;
- data.add_time = mysql.literals.now;
-
- console.log( data );
-
- let ret = await mysql.insert("train_records_message", data);
- return {id: ret.insertId};
- }
- }
- module.exports = MessageService;
|