Browse Source

调整顺序

wangchuanjin 2 years ago
parent
commit
636a4b4d8e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      entity/merge.go

+ 1 - 1
entity/merge.go

@@ -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) {
 			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)
-				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
 			})
 			log.Println("需要保留的用户没有企业身份,把舍弃的用户企业身份和过来", saveId, saveBsId, delId, delBsId, ok)