//tag规则 release-v188.21.*
//商标监控风险推送
const TaskBase = require("../../task.base");
const system = require("../../../system");
var settings = require("../../../../config/settings");
class TmMonitorMsgTask extends TaskBase {
    constructor() {
        super(TaskBase.getServiceName(TmMonitorMsgTask));
        this.restclient = system.getObject("util.restClient");
    }
    /**
     * 每天9点检查一次
     * @param {*} taskName
     */
    formatedTaskName (taskName) {
        console.log("formatedTaskName", taskName)
        return taskName + "|i|5"
    }
    async subDoTask () {
        console.log("--------------");
        console.log("TestTask1.....");
        var obj = {
            "actionType":"msgPushTask",
        }
        try {
            let urldev = "https://oapidev.gongsibao.com/open-task/"+ "api/action/tmMonitor/springBoard";
            let urlprod = "https://oapi.gongsibao.com/open-task/"+ "api/action/tmMonitor/springBoard";
            var rtndev = await this.restclient.execPost(obj, urldev);
            var rtn = await this.restclient.execPost(obj, urlprod);
            console.log(rtndev);
            console.log(rtn);
            return system.getResultSuccess();
        } catch (error) {
            console.log(error);
            return null;
        }
    }
}
module.exports = TmMonitorMsgTask;
