Commit c2beb00f by 朱继来

查询bom_id是否存在

parent aaed198b
Showing with 10 additions and 0 deletions
......@@ -161,6 +161,16 @@ func consume(bom BomOrder) {
client_account = account.Email
}
// 查询bom_id是否存在
var extend_id int
dao.GetLiexinBomDb().Get(&extend_id,"select id from lie_bom_extend where bom_id = ?", bom.BomId)
if extend_id != 0 { // 存在
logger.Info("bom_id already exists ")
service.DingAlert(configs.Ding_crm_token, "bom_crm队列任务,bom_id已存在", "")
return
}
// 添加到lie_bom_extend表
curr_time := time.Now().Unix()
_, err = dao.GetLiexinBomDb().Exec("insert into lie_bom_extend (kefu_id, kefu_name, bom_id, bom_sn, user_id, user_name, create_time, update_time) values (?,?,?,?,?,?,?,?)",
......
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