|
@@ -136,9 +136,11 @@ func createOtherOrder(param *CreateOtherOrderParams, code string) bool {
|
|
|
log.Printf("AutomaticallyCreatingEnt 自动创建企业信息失败:code:%s,err:%s", code, err.Error())
|
|
|
return false
|
|
|
} else {
|
|
|
- insertData["ent_id"] = entId
|
|
|
- param.UserId = fmt.Sprint(qutil.Int64All(userPositionId))
|
|
|
- insertData["user_id"] = userPositionId
|
|
|
+ if entId != 0 {
|
|
|
+ insertData["ent_id"] = entId
|
|
|
+ param.UserId = fmt.Sprint(qutil.Int64All(userPositionId))
|
|
|
+ insertData["user_id"] = userPositionId
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
insertData["buy_subject"] = 1
|
|
@@ -317,9 +319,12 @@ func createEntnicheOrder(param *CreateOtherOrderParams, code string) bool {
|
|
|
log.Printf("AutomaticallyCreatingEnt 自动创建企业信息失败:code:%s,err:%s", code, err.Error())
|
|
|
return false
|
|
|
} else {
|
|
|
- insertData["entId"] = entId
|
|
|
- insertData["user_id"] = userPositionId
|
|
|
- param.UserId = userPositionId
|
|
|
+ if entId != 0 {
|
|
|
+ insertData["entId"] = entId
|
|
|
+ insertData["user_id"] = userPositionId
|
|
|
+ param.UserId = userPositionId
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
} else {
|
|
|
insertData["buySubject"] = 1
|
|
@@ -417,9 +422,11 @@ func updateOtherOrder(param *CreateOtherOrderParams, code string, returnStatus i
|
|
|
log.Printf("AutomaticallyCreatingEnt 自动创建企业信息失败:code:%s,err:%s", code, err.Error())
|
|
|
return false
|
|
|
} else {
|
|
|
- insertData["entId"] = entId
|
|
|
- param.UserId = userPositionId
|
|
|
- insertData["user_id"] = userPositionId
|
|
|
+ if entId != 0 {
|
|
|
+ insertData["entId"] = entId
|
|
|
+ param.UserId = userPositionId
|
|
|
+ insertData["user_id"] = userPositionId
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
insertData["buySubject"] = 1
|
|
@@ -585,9 +592,11 @@ func updateEntnicheOrder(param *CreateOtherOrderParams, code string, returnStatu
|
|
|
log.Printf("AutomaticallyCreatingEnt 自动创建企业信息失败:code:%s,err:%s", code, err.Error())
|
|
|
return false
|
|
|
} else {
|
|
|
- insertData["entId"] = entId
|
|
|
- param.UserId = userPositionId
|
|
|
- insertData["user_id"] = userPositionId
|
|
|
+ if entId != 0 {
|
|
|
+ insertData["entId"] = entId
|
|
|
+ param.UserId = userPositionId
|
|
|
+ insertData["user_id"] = userPositionId
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
insertData["buySubject"] = 1
|
|
@@ -877,8 +886,10 @@ func createVipOrder(param *CreateOtherOrderParams, code string) (bool, string) {
|
|
|
}
|
|
|
if param.BuySubject == "2" {
|
|
|
insertData["buy_subject"] = 2
|
|
|
- insertData["ent_id"] = entId
|
|
|
- insertData["user_id"] = userPositionId
|
|
|
+ if entId != 0 {
|
|
|
+ insertData["ent_id"] = entId
|
|
|
+ insertData["user_id"] = userPositionId
|
|
|
+ }
|
|
|
} else {
|
|
|
insertData["buy_subject"] = 1
|
|
|
}
|
|
@@ -1229,9 +1240,11 @@ func updateVipOrder(param *CreateOtherOrderParams, code string, returnStatus int
|
|
|
delete(contractData, "contract_time")
|
|
|
}
|
|
|
if param.BuySubject == "2" {
|
|
|
- insertData["ent_id"] = entId
|
|
|
+ if entId != 0 {
|
|
|
+ insertData["ent_id"] = entId
|
|
|
+ insertData["user_id"] = userPositionId
|
|
|
+ }
|
|
|
insertData["buy_subject"] = 2
|
|
|
- insertData["user_id"] = userPositionId
|
|
|
} else {
|
|
|
insertData["buy_subject"] = 1
|
|
|
}
|