Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

CnChunfeng / crm_server

  • This project
    • Loading...
  • Sign in
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 d0024b16 authored 3 years ago by 朱继来's avatar 朱继来
Browse files
Options
  • _('Browse Files')
  • Download
  • Email Patches
  • Plain Diff

调整关联表

parent 21f50562
Hide whitespace changes
Inline Side-by-side
Showing with 22 additions and 8 deletions
  • cmd/task/find_goods/main.go
  • internal/model/invoice_com_user.go
cmd/task/find_goods/main.go
View file @ d0024b16
......@@ -132,6 +132,18 @@ func setFindGoods(status, task_id, task_type, task_display_degree int) {
// 分配客服,添加日志
db.Exec("insert into lie_salesman (user_id, sale_id, assign_time, update_time) values (?, ?, ?, ?)", feedback.Outter_Uid, salesman.Sale_Id, current_time, current_time)
db.Exec("insert into lie_action_log (user_id, type, event, remark, create_time) values (?, ?, ?, ?, ?)", feedback.Outter_Uid, 2, "快速找料监听", "从客服池指派客服,客服ID:"+ strconv.Itoa(salesman.Sale_Id), current_time)
// 修改新的关联表 lie_invoice_com_user
var invUserId int
db.Get(&invUserId, "select id from lie_invoice_com_user where user_id = ?", feedback.User_Id)
if invUserId == 0 {
db.Exec("INSERT INTO `lie_invoice_com_user` ( `user_id`, `sale_id`, `create_time`, `update_time`) VALUES (?,?,?,?)",
feedback.User_Id, salesman.Sale_Id, current_time, current_time)
} else {
db.Exec("update `lie_invoice_com_user` set sale_id= ?, status = ?, update_time = ? where user_id = ?",
salesman.Sale_Id, 0, current_time, feedback.User_Id)
}
}
db.Exec("insert into lie_task_info (user_id, task_id, task_type, task_display_degree, sale_id, create_time, update_time) value (?, ?, ?, ?, " +
......
This diff is collapsed. Click to expand it.
internal/model/invoice_com_user.go
View file @ d0024b16
package model
type InvoiceComUser struct {
Id int `json:"id" db:"id"`
Com_Id int `json:"com_id" db:"com_id"`
User_Id int `json:"user_id" db:"user_id"`
Sale_Id int `json:"sale_id" db:"sale_id"`
Status int `json:"status" db:"status"`
Sale_Type int `json:"sale_type" db:"sale_type"`
Create_Time int `json:"create_time" db:"create_time"`
Update_Time int `json:"update_time" db:"update_time"`
Id int `json:"id" db:"id"`
Com_Id int `json:"com_id" db:"com_id"`
User_Id int `json:"user_id" db:"user_id"`
Sale_Id int `json:"sale_id" db:"sale_id"`
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"`
}
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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