Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CnChunfeng
/
crm_server
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
7712c104
authored
Sep 18, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
重置剩余领取用户字段
parent
2b22949e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
1 deletions
cmd/task/update_follow_count/main.go
internal/model/invoice_com_user.go
cmd/task/update_follow_count/main.go
0 → 100644
View file @
7712c104
package
main
/**
每天零点重置剩余领取用户字段 follow_user_count
*/
import
(
"crm-server/internal/dao"
"flag"
"fmt"
"github.com/ichunt2019/logger"
)
// 日志目录
var
LogDir
string
// 解析命令行参数
func
initArgs
()
{
flag
.
StringVar
(
&
LogDir
,
"logDir"
,
""
,
"日志目录"
)
flag
.
Parse
()
}
func
main
()
{
initArgs
()
logConfig
:=
make
(
map
[
string
]
string
)
logConfig
[
"log_path"
]
=
LogDir
+
"/task/update_follow_count"
logConfig
[
"log_chan_size"
]
=
"100"
logger
.
InitLogger
(
"file"
,
logConfig
)
logger
.
Init
()
db
:=
dao
.
GetNewDb
()
_
,
err
:=
db
.
Exec
(
"update lie_employee_card set follow_user_count = follow_user_limit"
)
defer
db
.
Close
()
if
err
!=
nil
{
fmt
.
Println
(
"设置失败:"
+
err
.
Error
())
logger
.
Info
(
"重置剩余领取用户字段失败: "
,
err
.
Error
())
return
}
fmt
.
Println
(
"设置成功"
)
}
\ No newline at end of file
internal/model/invoice_com_user.go
View file @
7712c104
...
...
@@ -8,7 +8,6 @@ type InvoiceComUser struct {
Status
int
`json:"status" db:"status"`
Department_Id
int
`json:"department_id" db:"department_id"`
Sale_Type
int
`json:"sale_type" db:"sale_type"`
Follow_Type
int
`json:"follow_type" db:"follow_type"`
Create_Time
int
`json:"create_time" db:"create_time"`
Update_Time
int
`json:"update_time" db:"update_time"`
}
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