Commit cea35bd3 by 朱继来

调整

parent 31c0a58c
...@@ -67,12 +67,15 @@ func GetLiexinDb()(*sqlx.DB) { ...@@ -67,12 +67,15 @@ func GetLiexinDb()(*sqlx.DB) {
} }
func GetLiexinOrderDb()(*sqlx.DB) { func GetLiexinOrderDb()(*sqlx.DB) {
dbConfig := configs.GetDBLiexinOrder() onceLiexinOrder.Do(func() {
db, err := sqlx.Open(dbConfig.Engine, fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8", dbConfig.User, dbConfig.Pass, dbConfig.Ip, dbConfig.Port, dbConfig.Table)) dbConfig := configs.GetDBLiexinOrder()
if err != nil { db, err := sqlx.Open(dbConfig.Engine, fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8", dbConfig.User, dbConfig.Pass, dbConfig.Ip, dbConfig.Port, dbConfig.Table))
log.Fatalln(err) if err != nil {
} log.Fatalln(err)
return db }
instanceLiexinOrder = db
})
return instanceLiexinOrder
} }
func GetLiexinBomDb()(*sqlx.DB) { func GetLiexinBomDb()(*sqlx.DB) {
......
...@@ -108,11 +108,11 @@ func InsertMemberUser(memberInfo model.MemberAddUserData)bool { ...@@ -108,11 +108,11 @@ func InsertMemberUser(memberInfo model.MemberAddUserData)bool {
// 若是线下用户,则新增跟进用户任务 // 若是线下用户,则新增跟进用户任务
if memberInfo.Sale_Id != 0 && (memberInfo.Channel_type == 2 || memberInfo.Channel_type == 3) { if memberInfo.Sale_Id != 0 && (memberInfo.Channel_type == 2 || memberInfo.Channel_type == 3) {
var task_setup model.TaskSetup var task_setup model.TaskSetup
dao.GetNewDb().Get(&task_setup, "select * from lie_task_setup where task_type = ?", 10) dao.GetDb().Get(&task_setup, "select * from lie_task_setup where task_type = ?", 10)
if task_setup.Id != 0 { if task_setup.Id != 0 {
var task_setup_details model.TaskSetupDetails var task_setup_details model.TaskSetupDetails
dao.GetNewDb().Get(&task_setup_details, "select * from lie_task_setup_details where task_id = ?", task_setup.Id) dao.GetDb().Get(&task_setup_details, "select * from lie_task_setup_details where task_id = ?", task_setup.Id)
var task_end_time int64 var task_end_time int64
task_end_time = curr_time + (task_setup_details.TaskEndTime * 60) task_end_time = curr_time + (task_setup_details.TaskEndTime * 60)
......
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