Commit e97b030c by 朱继来

调整修改客服

parent 5272379f
Showing with 13 additions and 1 deletions
......@@ -118,8 +118,20 @@ func handle(userId,saleId int)(result bool) {
dao.GetDb().Exec("update `lie_invoice_com_user` set sale_id= ?, status = ?, update_time = ? where user_id = ?", saleId, 0, timeNow, userId)
}
var sale_name string
dao.GetCmsDb().QueryRowx("select name from user_info where userId = ?", saleId).Scan(&sale_name)
remark := "分配客服,客服ID:"+ strconv.Itoa(saleId) + "客服名称:" + sale_name
// 公司审核申请人为空时,修改申请人
res, _ := dao.GetDb().Exec("update lie_invoice_com_apply set apply_admin = ?, apply_admin_id = ?, update_time = ? where user_id = ? and status = ? and apply_admin_id = ?",
sale_name, saleId, timeNow, userId, -1, 0)
if res == nil {
remark += ",并修改公司审核申请人"
}
dao.GetDb().Exec("update lie_user set is_free = ?, free_time = ? where user_id = ?", 0, 0, crmUserId)
_,err := dao.GetDb().Exec("insert into lie_action_log (user_id, type, event, remark, create_time) values (?, ?, ?, ?, ?)", crmUserId, 2, "用户下单", "分配客服,客服ID:"+ strconv.Itoa(saleId), timeNow)
_,err := dao.GetDb().Exec("insert into lie_action_log (user_id, type, event, remark, create_time) values (?, ?, ?, ?, ?)", crmUserId, 2, "用户下单", remark, timeNow)
fmt.Println(err)
return true
}
......
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