Commit 171eb959 by 孙龙

up

parent 5e2bb0c3
...@@ -2,23 +2,28 @@ package cron_sendmsg ...@@ -2,23 +2,28 @@ package cron_sendmsg
import ( import (
"errors" "errors"
"fmt"
cfg "github.com/ichunt2019/cfg/lib" cfg "github.com/ichunt2019/cfg/lib"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"golang-asynctask/app/dao/crm/cron_sendmsg" "golang-asynctask/app/dao/crm/cron_sendmsg"
comfunc "golang-asynctask/util/lib" comfunc "golang-asynctask/util/lib"
"net/http" "net/http"
"net/url" "net/url"
"time"
) )
func SendMsg() (err error){ func SendMsg() (err error){
//fmt.Println("66666") fmt.Println("66666")
currentTime := time.Now().Format("2006-01-02") //currentTime := time.Now().Format("2006-01-02")
//println(currentTime) //println(currentTime)
//currentTime = "2021-05-06" //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 " + 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 " "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,currentTime) res,err :=cron_sendmsg.Dao.GetDb("crm").QueryString(sql)
if err != nil{ if err != nil{
return err 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