|
@@ -244,7 +244,7 @@ func Merge(wId, pId string, choose map[string]int, noteFunc ...func(string)) err
|
|
if (savePositions == nil || len(*savePositions) == 0) && (delPositions != nil && len(*delPositions) > 0) {
|
|
if (savePositions == nil || len(*savePositions) == 0) && (delPositions != nil && len(*delPositions) > 0) {
|
|
ok := public.BaseService.ExecTx("合并舍弃用户的企业身份", func(tx *sql.Tx) bool {
|
|
ok := public.BaseService.ExecTx("合并舍弃用户的企业身份", func(tx *sql.Tx) bool {
|
|
ok1 := public.BaseService.UpdateOrDeleteBySqlByTx(tx, `update base_account a inner join base_user b on (b.id=? and a.type=1 and a.person_id=b.person_id) set a.person_id=(select person_id from base_user where id=?)`, delBsId, saveBsId)
|
|
ok1 := public.BaseService.UpdateOrDeleteBySqlByTx(tx, `update base_account a inner join base_user b on (b.id=? and a.type=1 and a.person_id=b.person_id) set a.person_id=(select person_id from base_user where id=?)`, delBsId, saveBsId)
|
|
- ok2 := public.BaseService.UpdateOrDeleteBySqlByTx(tx, `update base_position set user_id=? where user_id=? and type=1`, delBsId, saveBsId)
|
|
|
|
|
|
+ ok2 := public.BaseService.UpdateOrDeleteBySqlByTx(tx, `update base_position set user_id=? where user_id=? and type=1`, saveBsId, delBsId)
|
|
return ok1 > -1 && ok2 > -1
|
|
return ok1 > -1 && ok2 > -1
|
|
})
|
|
})
|
|
log.Println("需要保留的用户没有企业身份,把舍弃的用户企业身份和过来", saveId, saveBsId, delId, delBsId, ok)
|
|
log.Println("需要保留的用户没有企业身份,把舍弃的用户企业身份和过来", saveId, saveBsId, delId, delBsId, ok)
|