Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
golang_asynctask
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
92811381
authored
May 08, 2021
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
up
parent
171eb959
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
app/service/crm/cron_sendmsg/cron_sendmsg_service.go
app/service/crm/cron_sendmsg/cron_sendmsg_service.go
View file @
92811381
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment