Commit d0024b16 by 朱继来

调整关联表

parent 21f50562
...@@ -132,6 +132,18 @@ func setFindGoods(status, task_id, task_type, task_display_degree int) { ...@@ -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_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) 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 (?, ?, ?, ?, " + db.Exec("insert into lie_task_info (user_id, task_id, task_type, task_display_degree, sale_id, create_time, update_time) value (?, ?, ?, ?, " +
......
...@@ -6,7 +6,9 @@ type InvoiceComUser struct { ...@@ -6,7 +6,9 @@ type InvoiceComUser struct {
User_Id int `json:"user_id" db:"user_id"` User_Id int `json:"user_id" db:"user_id"`
Sale_Id int `json:"sale_id" db:"sale_id"` Sale_Id int `json:"sale_id" db:"sale_id"`
Status int `json:"status" db:"status"` Status int `json:"status" db:"status"`
Department_Id int `json:"department_id" db:"department_id"`
Sale_Type int `json:"sale_type" db:"sale_type"` 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"` Create_Time int `json:"create_time" db:"create_time"`
Update_Time int `json:"update_time" db:"update_time"` Update_Time int `json:"update_time" db:"update_time"`
} }
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