Commit 92811381 by 孙龙

up

parent 171eb959
......@@ -2,28 +2,28 @@ package cron_sendmsg
import (
"errors"
"fmt"
cfg "github.com/ichunt2019/cfg/lib"
"github.com/tidwall/gjson"
"golang-asynctask/app/dao/crm/cron_sendmsg"
comfunc "golang-asynctask/util/lib"
"net/http"
"net/url"
"time"
)
func SendMsg() (err error){
fmt.Println("66666")
//currentTime := time.Now().Format("2006-01-02")
//fmt.Println("66666")
currentTime := time.Now().Format("2006-01-02")
//println(currentTime)
//currentTime = "2021-05-06"
//sql := "select count(id) as applyNums,apply_admin_id as sale_id,sale_type from lie_invoice_com_apply " +
// "where apply_type = 3 and apply_admin_id != 0 and FROM_UNIXTIME(create_time,'%Y-%m-%d') = ? group by apply_admin_id "
//res,err :=cron_sendmsg.Dao.GetDb("crm").QueryString(sql,currentTime)
sql := "select count(id) as applyNums,apply_admin_id as sale_id,sale_type from lie_invoice_com_apply " +
"where apply_type = 3 and status = -1 and apply_admin_id != 0 and FROM_UNIXTIME(create_time,'%Y-%m-%d') = ? group by apply_admin_id "
res,err :=cron_sendmsg.Dao.GetDb("crm").QueryString(sql,currentTime)
sql := "select count(id) as applyNums,apply_admin_id as sale_id,sale_type from lie_invoice_com_apply " +
"where apply_type = 3 and status = -1 and apply_admin_id != 0 group by apply_admin_id "
res,err :=cron_sendmsg.Dao.GetDb("crm").QueryString(sql)
//sql := "select count(id) as applyNums,apply_admin_id as sale_id,sale_type from lie_invoice_com_apply " +
// "where apply_type = 3 and status = -1 and apply_admin_id != 0 group by apply_admin_id "
//res,err :=cron_sendmsg.Dao.GetDb("crm").QueryString(sql)
if err != nil{
return err
}
......
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