'use strict';

/**
 *
 *
 * @author Zhong
 * @date 2018/5/24
 * @version
 */

import BaseController from "../../common/base/base_controller";
//import sysSchedule from '../models/sys_model';
let sysSchedule = require('../models/sys_model');
let callback = function(req, res, err, message, data){
    res.json({error: err, message: message, data: data});
};
class SysTools extends BaseController{
    clearJunkData(req, res){
        sysSchedule.clearJunkData(function (err) {
            let msg = '清除成功';
            let errCode = 0;
            if(err){
                msg = '清除失败';
                errCode = 1;
            }
            callback(req, res, errCode, msg, null);
        });
    }
}

export {SysTools as default};