Commit 284d45c1 by 朱继来

添加快速找料、多次搜索脚本

parent fef41f89
package main
/**
快速找料任务
1. 当存在注册任务时,不生成快速找料任务
2. 任务未结束前,此任务唯一,不重复生成
3. 不设置截止时间
*/
import (
"crm-server/cmd/task/common"
_"crm-server/cmd/task/common"
"crm-server/configs"
"crm-server/internal/dao"
"crm-server/internal/model"
"crm-server/internal/service"
"flag"
"fmt"
"github.com/ichunt2019/logger"
"strconv"
"strings"
"time"
"github.com/robfig/cron"
)
// 日志目录
var LogDir string
// 解析命令行参数
func initArgs() {
flag.StringVar(&LogDir, "logDir", "", "日志目录")
flag.Parse()
}
func main () {
initArgs()
logConfig := make(map[string]string)
logConfig["log_path"] = LogDir+"/task/find_goods"
logConfig["log_chan_size"] = "100"
logger.InitLogger("file",logConfig)
logger.Init()
// 查看未下单任务是否开启
task_setup := common.GetTaskSetup(4)
task_setup_details := common.GetTaskSetupDetails(task_setup.Id)
var cron_time string
if task_setup_details.TaskExecTimeType == 1 {
str := strings.Split(task_setup_details.TsakExecTime, ":")
cron_time = "0 " + str[1] + " " + str[0] + " * * *"
fmt.Println(cron_time)
} else {
cron_time = "0 " + task_setup_details.TsakExecTime + " * * * *"
}
c := cron.New()
c.AddFunc(cron_time, func() {
go setFindGoods(task_setup.Status, task_setup.Id, task_setup.TaskType, task_setup.TaskDisplayDegree)
})
c.Start()
select {
}
}
func setFindGoods(status, task_id, task_type, task_display_degree int) {
if status == 0 || status == -1 { // 数据不存在或未开启则直接中断
return
}
// 获取快速找料的用户
row, err := dao.GetDb().Queryx("select * from lie_feedback where type = ? and is_add_task = ? order by id desc limit 100", 7, 0)
if err != nil {
logger.Info("获取快速找料用户失败: ", err.Error())
return
}
for row.Next() {
var feedback model.Feedback
row.StructScan(&feedback)
// 判断该用户是否存在注册领取任务记录或快速找料任务,若存在则跳过
var task_info model.TaskInfo
dao.GetDb().Get(&task_info, "select * from lie_task_info where user_id = ? and status = ? and (task_type = ? or task_type = ?) limit 1", feedback.User_Id, 1, 1, 4)
if task_info.Id != 0 {
continue
}
current_time := time.Now().Unix() // 当前时间
// 查看用户是否分配
var salesman model.Salesman
dao.GetDb().Get(&salesman, "select * from lie_salesman where user_id = ?", feedback.User_Id)
dao.GetDb().Exec("insert into lie_task_info (user_id, task_id, task_type, task_display_degree, sale_id, create_time, update_time) value (?, ?, ?, ?, " +
"?, ?, ?)", feedback.User_Id, task_id, task_type, task_display_degree, salesman.Sale_Id, current_time, current_time)
dao.GetDb().Exec("update lie_feedback set is_add_task = ? where id = ?", 1, feedback.Id)
service.DingAlert(configs.Ding_crm_task_token, "任务告警:快速找料任务脚本添加任务记录成功,CRM用户ID:"+strconv.Itoa(feedback.User_Id), "")
}
}
\ No newline at end of file
...@@ -38,28 +38,28 @@ func main () { ...@@ -38,28 +38,28 @@ func main () {
task_setup_details := common.GetTaskSetupDetails(task_setup.Id) task_setup_details := common.GetTaskSetupDetails(task_setup.Id)
// 定时执行 // 定时执行
//task_exec_time, _ := strconv.Atoi(task_setup_details.TsakExecTime) task_exec_time, _ := strconv.Atoi(task_setup_details.TsakExecTime)
//ticker := time.NewTicker(time.Minute * time.Duration(task_exec_time)) ticker := time.NewTicker(time.Minute * time.Duration(task_exec_time))
ticker := time.NewTicker(time.Second * 5) //ticker := time.NewTicker(time.Second * 5)
for { for {
select { select {
case <- ticker.C: case <- ticker.C:
fmt.Println("ticker...") fmt.Println("ticker...")
if task_setup.Status == -1 { // 未开启则直接中断 go setHaveOrderTask(task_setup.Status, task_setup.Id, task_setup.TaskType, task_setup.TaskDisplayDegree, task_setup_details.TaskEndTime)
return
}
go setHaveOrderTask(task_setup.Id, task_setup.TaskType, task_setup.TaskDisplayDegree, task_setup_details.TaskEndTime)
default: default:
time.Sleep(time.Microsecond * 100) time.Sleep(time.Microsecond * 100)
} }
} }
} }
func setHaveOrderTask(task_id, task_type, task_display_degree int, task_end_time int64) { func setHaveOrderTask(status, task_id, task_type, task_display_degree int, task_end_time int64) {
if status == 0 || status == -1 { // 数据不存在或未开启则直接中断
return
}
// 获取未释放且未下单用户 // 获取未释放且未下单用户
row, err := dao.GetDb().Queryx("select u.user_id, u.copy_ctime from lie_user as u left join lie_user_extend as ue on u.user_id = ue.user_id where " + row, err := dao.GetDb().Queryx("select u.user_id, u.copy_ctime from lie_user as u left join lie_user_extend as ue on u.user_id = ue.user_id where " +
"u.is_free = ? and u.is_add_task = ? and ue.no_create_order = ? order by user_id desc limit 1000", 0, 0, 2) "u.is_free = ? and u.is_add_task = ? and ue.no_create_order = ? order by user_id desc limit 1000", 0, 0, 2)
...@@ -94,7 +94,7 @@ func setHaveOrderTask(task_id, task_type, task_display_degree int, task_end_time ...@@ -94,7 +94,7 @@ func setHaveOrderTask(task_id, task_type, task_display_degree int, task_end_time
dao.GetDb().Get(&salesman, "select * from lie_salesman where user_id = ?", user.User_id) dao.GetDb().Get(&salesman, "select * from lie_salesman where user_id = ?", user.User_id)
// 大于150天,则添加到任务信息表 // 大于150天,则添加到任务信息表
dao.GetDb().Exec("delete from lie_task_info where user_id = ?", user.User_id) dao.GetDb().Exec("delete from lie_task_info where user_id = ? and task_type = ?", user.User_id, 3)
end_time := current_time + task_end_time * 60 end_time := current_time + task_end_time * 60
dao.GetDb().Exec("insert into lie_task_info (user_id, task_id, task_type, task_display_degree, sale_id, end_time, create_time, update_time) value (?, ?, ?, ?, " + dao.GetDb().Exec("insert into lie_task_info (user_id, task_id, task_type, task_display_degree, sale_id, end_time, create_time, update_time) value (?, ?, ?, ?, " +
......
package main
/**
多次搜索任务
1. 任务未结束前,此任务唯一,不重复生成
2. 不设置截止时间
*/
import (
"crm-server/cmd/task/common"
"crm-server/configs"
"crm-server/internal/dao"
"crm-server/internal/model"
"crm-server/internal/service"
"flag"
"fmt"
"github.com/ichunt2019/logger"
"github.com/robfig/cron"
"strconv"
"strings"
"time"
)
// 日志目录
var LogDir string
// 解析命令行参数
func initArgs() {
flag.StringVar(&LogDir, "logDir", "", "日志目录")
flag.Parse()
}
func main () {
initArgs()
logConfig := make(map[string]string)
logConfig["log_path"] = LogDir+"/task/multi_search"
logConfig["log_chan_size"] = "100"
logger.InitLogger("file",logConfig)
logger.Init()
// 查看未下单任务是否开启
task_setup := common.GetTaskSetup(5)
task_setup_details := common.GetTaskSetupDetails(task_setup.Id)
var cron_time string
if task_setup_details.TaskExecTimeType == 1 {
str := strings.Split(task_setup_details.TsakExecTime, ":")
cron_time = "0 " + str[1] + " " + str[0] + " * * *"
fmt.Println(cron_time)
} else {
cron_time = "0 " + task_setup_details.TsakExecTime + " * * * *"
}
c := cron.New()
c.AddFunc(cron_time, func() {
go setMultiSearch(task_setup.Status, task_setup.Id, task_setup.TaskType, task_setup.TaskDisplayDegree)
})
c.Start()
select {
}
}
func setMultiSearch(status, task_id, task_type, task_display_degree int) {
if status == 0 || status == -1 { // 数据不存在或未开启则直接中断
return
}
// 获取快速找料的用户
row, err := dao.GetDb().Queryx("select * from lie_feedback where type = ? and is_add_task = ? order by id desc limit 100", 6, 0)
if err != nil {
logger.Info("获取多次搜索用户失败: ", err.Error())
return
}
for row.Next() {
var feedback model.Feedback
row.StructScan(&feedback)
var task_info model.TaskInfo
dao.GetDb().Get(&task_info, "select * from lie_task_info where user_id = ? and status = ? and task_type = ? limit 1", feedback.User_Id, 1, 5)
if task_info.Id != 0 {
continue
}
current_time := time.Now().Unix() // 当前时间
// 查看用户是否分配
var salesman model.Salesman
dao.GetDb().Get(&salesman, "select * from lie_salesman where user_id = ?", feedback.User_Id)
dao.GetDb().Exec("insert into lie_task_info (user_id, task_id, task_type, task_display_degree, sale_id, create_time, update_time) value (?, ?, ?, ?, " +
"?, ?, ?)", feedback.User_Id, task_id, task_type, task_display_degree, salesman.Sale_Id, current_time, current_time)
dao.GetDb().Exec("update lie_feedback set is_add_task = ? where id = ?", 1, feedback.Id)
service.DingAlert(configs.Ding_crm_task_token, "任务告警:多次搜索任务脚本添加任务记录成功,CRM用户ID:"+strconv.Itoa(feedback.User_Id), "")
}
}
\ No newline at end of file
...@@ -38,31 +38,31 @@ func main () { ...@@ -38,31 +38,31 @@ func main () {
task_setup_details := common.GetTaskSetupDetails(task_setup.Id) task_setup_details := common.GetTaskSetupDetails(task_setup.Id)
// 定时执行 // 定时执行
//task_exec_time, _ := strconv.Atoi(task_setup_details.TsakExecTime) task_exec_time, _ := strconv.Atoi(task_setup_details.TsakExecTime)
//ticker := time.NewTicker(time.Minute * time.Duration(task_exec_time)) ticker := time.NewTicker(time.Minute * time.Duration(task_exec_time))
ticker := time.NewTicker(time.Second * 5) //ticker := time.NewTicker(time.Second * 5)
for { for {
select { select {
case <- ticker.C: case <- ticker.C:
fmt.Println("ticker...") fmt.Println("ticker...")
if task_setup.Status == -1 { // 未开启则直接中断 go setNoOrderTask(task_setup.Status, task_setup.Id, task_setup.TaskType, task_setup.TaskDisplayDegree, task_setup_details.TaskEndTime)
return
}
go setNoOrderTask(task_setup.Id, task_setup.TaskType, task_setup.TaskDisplayDegree, task_setup_details.TaskEndTime)
default: default:
time.Sleep(time.Microsecond * 100) time.Sleep(time.Microsecond * 100)
} }
} }
} }
func setNoOrderTask(task_id, task_type, task_display_degree int, task_end_time int64) { func setNoOrderTask(status, task_id, task_type, task_display_degree int, task_end_time int64) {
if status == 0 || status == -1 { // 数据不存在或未开启则直接中断
return
}
// 获取未释放且未下单用户 // 获取未释放且未下单用户
row, err := dao.GetDb().Queryx("select u.user_id, u.copy_ctime from lie_user as u left join lie_user_extend as ue on u.user_id = ue.user_id where " + row, err := dao.GetDb().Queryx("select u.user_id, u.copy_ctime from lie_user as u left join lie_user_extend as ue on u.user_id = ue.user_id where " +
"u.is_free = ? u.is_add_task = ? and ue.no_create_order = ? order by user_id desc limit 5", 0, 0, 1) "u.is_free = ? u.is_add_task = ? and ue.no_create_order = ? order by user_id desc limit 1000", 0, 0, 1)
if err != nil { if err != nil {
logger.Info("获取未下单用户失败: ", err.Error()) logger.Info("获取未下单用户失败: ", err.Error())
...@@ -99,7 +99,7 @@ func setNoOrderTask(task_id, task_type, task_display_degree int, task_end_time i ...@@ -99,7 +99,7 @@ func setNoOrderTask(task_id, task_type, task_display_degree int, task_end_time i
} }
// 大于23天,则添加到任务信息表 // 大于23天,则添加到任务信息表
dao.GetDb().Exec("delete from lie_task_info where user_id = ?", user.User_id) dao.GetDb().Exec("delete from lie_task_info where user_id = ? and task_type = ?", user.User_id, 2)
end_time := current_time + task_end_time * 60 end_time := current_time + task_end_time * 60
dao.GetDb().Exec("insert into lie_task_info (user_id, task_id, task_type, task_display_degree, sale_id, end_time, create_time, update_time) value (?, ?, ?, ?, " + dao.GetDb().Exec("insert into lie_task_info (user_id, task_id, task_type, task_display_degree, sale_id, end_time, create_time, update_time) value (?, ?, ?, ?, " +
......
...@@ -4,13 +4,10 @@ go 1.12 ...@@ -4,13 +4,10 @@ go 1.12
require ( require (
github.com/bilibili/kratos v0.0.0-20191025092737-e14170de04ba github.com/bilibili/kratos v0.0.0-20191025092737-e14170de04ba
github.com/gogo/protobuf v1.3.0
github.com/golang/protobuf v1.3.2
github.com/ichunt2019/logger v1.0.5 github.com/ichunt2019/logger v1.0.5
github.com/jmoiron/sqlx v1.2.0 github.com/jmoiron/sqlx v1.2.0
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
github.com/pkg/errors v0.8.1 github.com/pkg/errors v0.8.1
github.com/robfig/cron v1.2.0
github.com/streadway/amqp v0.0.0-20200108173154-1c71cc93ed71 github.com/streadway/amqp v0.0.0-20200108173154-1c71cc93ed71
golang.org/x/net v0.0.0-20191011234655-491137f69257
google.golang.org/grpc v1.24.0
) )
...@@ -31,6 +31,7 @@ github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d/go.mod h1:URriBxXwVq5ijiJ1 ...@@ -31,6 +31,7 @@ github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d/go.mod h1:URriBxXwVq5ijiJ1
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM=
github.com/cznic/strutil v0.0.0-20181122101858-275e90344537/go.mod h1:AHHPPPXTw0h6pVabbcbyGRK1DckRn7r/STdZEeIDzZc= github.com/cznic/strutil v0.0.0-20181122101858-275e90344537/go.mod h1:AHHPPPXTw0h6pVabbcbyGRK1DckRn7r/STdZEeIDzZc=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
...@@ -109,12 +110,15 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv ...@@ -109,12 +110,15 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv
github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/leodido/go-urn v1.1.0 h1:Sm1gr51B1kKyfD2BlRcLSiEkffoG96g6TPv6eRoEiB8= github.com/leodido/go-urn v1.1.0 h1:Sm1gr51B1kKyfD2BlRcLSiEkffoG96g6TPv6eRoEiB8=
github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw=
github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
...@@ -149,6 +153,7 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE ...@@ -149,6 +153,7 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
...@@ -162,9 +167,12 @@ github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkp ...@@ -162,9 +167,12 @@ github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkp
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE=
github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/samuel/go-zookeeper v0.0.0-20180130194729-c4fab1ac1bec/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/samuel/go-zookeeper v0.0.0-20180130194729-c4fab1ac1bec/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
...@@ -183,6 +191,7 @@ github.com/streadway/amqp v0.0.0-20200108173154-1c71cc93ed71/go.mod h1:AZpEONHx3 ...@@ -183,6 +191,7 @@ github.com/streadway/amqp v0.0.0-20200108173154-1c71cc93ed71/go.mod h1:AZpEONHx3
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161/go.mod h1:wM7WEvslTq+iOEAMDLSzhVuOt5BRZ05WirO+b09GHQU= github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161/go.mod h1:wM7WEvslTq+iOEAMDLSzhVuOt5BRZ05WirO+b09GHQU=
github.com/templexxx/xor v0.0.0-20181023030647-4e92f724b73b/go.mod h1:5XA7W9S6mni3h5uvOC75dA3m9CCCaS83lltmc0ukdi4= github.com/templexxx/xor v0.0.0-20181023030647-4e92f724b73b/go.mod h1:5XA7W9S6mni3h5uvOC75dA3m9CCCaS83lltmc0ukdi4=
...@@ -223,7 +232,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn ...@@ -223,7 +232,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191011234655-491137f69257/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191011234655-491137f69257/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
...@@ -265,21 +273,23 @@ golang.org/x/tools v0.0.0-20190912185636-87d9f09c5d89/go.mod h1:b+2E5dAYhXwXZwtn ...@@ -265,21 +273,23 @@ golang.org/x/tools v0.0.0-20190912185636-87d9f09c5d89/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I=
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=
google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.24.0 h1:vb/1TCsVn3DcJlQ0Gs1yB1pKI6Do2/QNwxdKqmc/b0s= google.golang.org/grpc v1.24.0 h1:vb/1TCsVn3DcJlQ0Gs1yB1pKI6Do2/QNwxdKqmc/b0s=
google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a/go.mod h1:KF9sEfUPAXdG8Oev9e99iLGnl2uJMjc5B+4y3O7x610= gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a/go.mod h1:KF9sEfUPAXdG8Oev9e99iLGnl2uJMjc5B+4y3O7x610=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM=
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
gopkg.in/go-playground/validator.v9 v9.29.1 h1:SvGtYmN60a5CVKTOzMSyfzWDeZRxRuGvRQyEAKbw1xc= gopkg.in/go-playground/validator.v9 v9.29.1 h1:SvGtYmN60a5CVKTOzMSyfzWDeZRxRuGvRQyEAKbw1xc=
gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ=
......
package model package model
type Feedback struct { type Feedback struct {
User_Id int `json:"user_id"` Id int `json:"id" db:"id"`
Outter_Uid int `json:"outter_uid"` User_Id int `json:"user_id" db:"user_id"`
Ip int `json:"ip"` Outter_Uid int `json:"outter_uid" db:"outter_uid"`
Type int `json:"type"` Ip int `json:"ip" db:"ip"`
Mobile string `json:"mobile"` Type int `json:"type" db:"type"`
Content string `json:"content"` Mobile string `json:"mobile" db:"mobile"`
Source string `json:"source"` Content string `json:"content" db:"content"`
Pf int `json:"pf"` Source string `json:"source" db:"source"`
Status int `json:"status"` Pf int `json:"pf" db:"pf"`
Sale_Id int `json:"sale_id"` Status int `json:"status" db:"status"`
Bom_Url string `json:"bom_url"` Sale_Id int `json:"sale_id" db:"sale_id"`
Responses string `json:"responses"` Bom_Url string `json:"bom_url" db:"bom_url"`
Contact_Name string `json:"contact_name"` Responses string `json:"responses" db:"responses"`
Company_Name string `json:"company_name"` Contact_Name string `json:"contact_name" db:"contact_name"`
Company_Type int `json:"company_type"` Company_Name string `json:"company_name" db:"company_name"`
Note string `json:"note"` Company_Type int `json:"company_type" db:"company_type"`
Create_Time int `json:"create_time"` Note string `json:"note" db:"note"`
Create_Time int64 `json:"create_time" db:"create_time"`
Is_add_task int `json:"is_add_task" db:"is_add_task"`
} }
/* /*
CREATE TABLE `lie_feedback` ( CREATE TABLE `lie_feedback` (
...@@ -49,4 +47,4 @@ CREATE TABLE `lie_feedback` ( ...@@ -49,4 +47,4 @@ CREATE TABLE `lie_feedback` (
KEY `user_id` (`user_id`) KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='意见反馈表'; ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='意见反馈表';
*/ */
\ No newline at end of file
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