var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class OpCacheAPI extends APIBase {
    constructor() {
        super();
        this.cacheSve = system.getObject("service.common.cacheSve");
    }
    //返回
    async opCacheData(pobj, qobj, req) {
        if (pobj.action_type == "findAndCountAll") {
            return await this.cacheSve.findAndCountAll(pobj.body);
        } else if (pobj.action_type == "delCache") {
            return await this.cacheSve.delCache(pobj.body);
        } else if (pobj.action_type == "clearAllCache") {
            return await this.cacheSve.clearAllCache(pobj.body);
        } else {
            return system.getResultFail();
        }
    }
    exam() {
        return "xxx";
    }
    classDesc() {
        return {
            groupName: "",
            groupDesc: "",
            name: "",
            desc: "",
            exam: "",
        };
    }
    methodDescs() {
        return [
            {
                methodDesc: "",
                methodName: "",
                paramdescs: [
                    {
                        paramDesc: "",
                        paramName: "",
                        paramType: "",
                        defaultValue: null,
                    }
                ],
                rtnTypeDesc: "",
                rtnType: ""
            }
        ];
    }


    // exam() {
    //     return "";
    // }
    // classDesc() {
    //     return {
    //         groupName: "",
    //         groupDesc: "",
    //         name: "",
    //         desc: "",
    //         exam: "",
    //     };
    // }
    // methodDescs() {
    //     return [
    //         {
    //             methodDesc: "",
    //             methodName: "",
    //             paramdescs: [
    //                 {
    //                     paramDesc: "",
    //                     paramName: "",
    //                     paramType: "",
    //                     defaultValue: "",
    //                 }
    //             ],
    //             rtnTypeDesc: "",
    //             rtnType: ""
    //         }
    //     ];
    // }
}
module.exports = OpCacheAPI;