Commit cff660c5 by 朱继来

CRM添加客户交接邮件通知

parent 55869d46
package main
import (
"flag"
"fmt"
"github.com/ichunt2019/logger"
"go-queue-server/util"
"io/ioutil"
"net/http"
"strings"
)
/**
公海池重点客户提醒 每月15号8点30分执行一次
*/
var ConfigDir string
var LogDir string
// 解析命令行参数
func initArgs() {
flag.StringVar(&ConfigDir, "configDir", "", "配置文件")
flag.StringVar(&LogDir, "logDir", "", "日志目录")
flag.Parse()
}
func main() {
initArgs()
//初始化配置文件
util.Init(ConfigDir)
logConfig := make(map[string]string)
logConfig["log_path"] = LogDir + "crm/important_client_send_mail"
logConfig["log_chan_size"] = "1000"
logger.InitLogger("file", logConfig)
logger.Init()
url := util.Configs.Crm_domain.CrmUrl + "/open/importantClientSendMail"
resp, err := http.Post(url, "application/x-www-form-urlencoded", strings.NewReader(""))
if err != nil {
fmt.Println(err.Error())
logger.Error("请求crm公海池重点客户提醒接口失败")
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
package main
import (
"flag"
"fmt"
"github.com/ichunt2019/logger"
"go-queue-server/util"
"io/ioutil"
"net/http"
"strings"
)
/**
未回访重点客户通知 每月20号8点30分执行一次
*/
var ConfigDir string
var LogDir string
// 解析命令行参数
func initArgs() {
flag.StringVar(&ConfigDir, "configDir", "", "配置文件")
flag.StringVar(&LogDir, "logDir", "", "日志目录")
flag.Parse()
}
func main() {
initArgs()
//初始化配置文件
util.Init(ConfigDir)
logConfig := make(map[string]string)
logConfig["log_path"] = LogDir + "crm/no_feedback_client_send_mail"
logConfig["log_chan_size"] = "1000"
logger.InitLogger("file", logConfig)
logger.Init()
url := util.Configs.Crm_domain.CrmUrl + "/open/noFeedbackClientSendMail"
resp, err := http.Post(url, "application/x-www-form-urlencoded", strings.NewReader(""))
if err != nil {
fmt.Println(err.Error())
logger.Error("请求crm未回访重点客户通知接口失败")
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
package main
import (
"flag"
"fmt"
"github.com/ichunt2019/logger"
"go-queue-server/util"
"io/ioutil"
"net/http"
"strings"
)
/**
离职业务员名下客户交接超期通知 每天早上8点10分执行
*/
var ConfigDir string
var LogDir string
// 解析命令行参数
func initArgs() {
flag.StringVar(&ConfigDir, "configDir", "", "配置文件")
flag.StringVar(&LogDir, "logDir", "", "日志目录")
flag.Parse()
}
func main() {
initArgs()
//初始化配置文件
util.Init(ConfigDir)
logConfig := make(map[string]string)
logConfig["log_path"] = LogDir + "crm/unemploy_client_send_mail"
logConfig["log_chan_size"] = "1000"
logger.InitLogger("file", logConfig)
logger.Init()
url := util.Configs.Crm_domain.CrmUrl + "/open/unemployClientSendMail"
resp, err := http.Post(url, "application/x-www-form-urlencoded", strings.NewReader(""))
if err != nil {
fmt.Println(err.Error())
logger.Error("请求crm离职业务员名下客户交接超期通知接口失败")
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment