|
@@ -52,7 +52,7 @@ func (rpc *JyUser) AddUserInfo(info *CompletionUserInfo, res *Resp) error {
|
|
|
"type": 1,
|
|
|
"person_id": 0,
|
|
|
}
|
|
|
- accountId := BaseMysql.Insert(BaseAccount, entMap)
|
|
|
+ accountId := BaseMysql.InsertBySqlByTx(tx, BaseAccount, entMap)
|
|
|
if accountId == 0 {
|
|
|
return false
|
|
|
}
|
|
@@ -78,7 +78,7 @@ func (rpc *JyUser) AddUserInfo(info *CompletionUserInfo, res *Resp) error {
|
|
|
"create_time": time.Now().Local(),
|
|
|
"update_time": time.Now().Local(),
|
|
|
}
|
|
|
- personId = BaseMysql.Insert(BasePerson, personMap)
|
|
|
+ personId = BaseMysql.InsertBySqlByTx(tx, BasePerson, personMap)
|
|
|
if personId == 0 {
|
|
|
return false
|
|
|
}
|
|
@@ -89,7 +89,7 @@ func (rpc *JyUser) AddUserInfo(info *CompletionUserInfo, res *Resp) error {
|
|
|
"type": 1,
|
|
|
"person_id": personId,
|
|
|
}
|
|
|
- entAccountId = BaseMysql.Insert(BaseAccount, entMap)
|
|
|
+ entAccountId = BaseMysql.InsertBySqlByTx(tx, BaseAccount, entMap)
|
|
|
if entAccountId == 0 {
|
|
|
return false
|
|
|
}
|
|
@@ -99,7 +99,7 @@ func (rpc *JyUser) AddUserInfo(info *CompletionUserInfo, res *Resp) error {
|
|
|
"type": 0,
|
|
|
"person_id": personId,
|
|
|
}
|
|
|
- userAccountId = BaseMysql.Insert(BaseAccount, entUserMap)
|
|
|
+ userAccountId = BaseMysql.InsertBySqlByTx(tx, BaseAccount, entUserMap)
|
|
|
if userAccountId == 0 {
|
|
|
return false
|
|
|
}
|
|
@@ -111,7 +111,7 @@ func (rpc *JyUser) AddUserInfo(info *CompletionUserInfo, res *Resp) error {
|
|
|
"create_time": time.Now().Local(),
|
|
|
"update_time": time.Now().Local(),
|
|
|
}
|
|
|
- userId = BaseMysql.Insert(UserTable, userMap)
|
|
|
+ userId = BaseMysql.InsertBySqlByTx(tx, UserTable, userMap)
|
|
|
if userId == 0 {
|
|
|
return false
|
|
|
}
|
|
@@ -158,7 +158,7 @@ func (rpc *JyUser) AddUserInfo(info *CompletionUserInfo, res *Resp) error {
|
|
|
"account_name": accountName,
|
|
|
"type": 0,
|
|
|
}
|
|
|
- userPositionId = BaseMysql.Insert(BasePosition, userPositionMap)
|
|
|
+ userPositionId = BaseMysql.InsertBySqlByTx(tx, BasePosition, userPositionMap)
|
|
|
if userPositionId == 0 {
|
|
|
return false
|
|
|
}
|
|
@@ -174,7 +174,7 @@ func (rpc *JyUser) AddUserInfo(info *CompletionUserInfo, res *Resp) error {
|
|
|
"account_name": accountName,
|
|
|
"type": 1,
|
|
|
}
|
|
|
- entPositionId = BaseMysql.Insert(BasePosition, entPositionMap)
|
|
|
+ entPositionId = BaseMysql.InsertBySqlByTx(tx, BasePosition, entPositionMap)
|
|
|
if entPositionId == 0 {
|
|
|
return false
|
|
|
}
|
|
@@ -197,7 +197,7 @@ func (rpc *JyUser) AddUserInfo(info *CompletionUserInfo, res *Resp) error {
|
|
|
"type": 1,
|
|
|
"person_id": personId,
|
|
|
}
|
|
|
- entAccountId = BaseMysql.Insert(BaseAccount, entMap)
|
|
|
+ entAccountId = BaseMysql.InsertBySqlByTx(tx, BaseAccount, entMap)
|
|
|
if entAccountId == 0 {
|
|
|
return false
|
|
|
}
|
|
@@ -235,7 +235,7 @@ func (rpc *JyUser) AddUserInfo(info *CompletionUserInfo, res *Resp) error {
|
|
|
"account_name": accountName,
|
|
|
"type": 1,
|
|
|
}
|
|
|
- entPositionId = BaseMysql.Insert(BasePosition, positionMap)
|
|
|
+ entPositionId = BaseMysql.InsertBySqlByTx(tx, BasePosition, positionMap)
|
|
|
if entPositionId == 0 {
|
|
|
return false
|
|
|
}
|