wangchuanjin 2 سال پیش
والد
کامیت
9e1bad0054
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      service/user.go

+ 4 - 4
service/user.go

@@ -181,10 +181,10 @@ func UserUpdates(this *UserIdReq) bool {
 
 func UserDels(this *UserIdReq) bool {
 	return entity.BaseMysql.ExecTx("", func(tx *sql.Tx) bool {
-		_, e1 := entity.BaseMysql.ExecBySqlByTx(tx, `insert into select * base_user_backup from base_user where id=?`, this.Id)
-		_, e2 := entity.BaseMysql.ExecBySqlByTx(tx, `insert into select * base_position_backup from base_position where user_id=?`, this.Id)
-		_, e3 := entity.BaseMysql.ExecBySqlByTx(tx, `insert into select a.* base_person_backup from base_person a inner join base_user b on (b.id=? and a.id=b.person_id)`, this.Id)
-		_, e4 := entity.BaseMysql.ExecBySqlByTx(tx, `insert into select a.* base_account_backup from base_account a inner join base_user b on (b.id=? and a.person_id=b.person_id)`, this.Id)
+		_, e1 := entity.BaseMysql.ExecBySqlByTx(tx, `insert into base_user_backup select * from base_user where id=?`, this.Id)
+		_, e2 := entity.BaseMysql.ExecBySqlByTx(tx, `insert into base_position_backup select * from base_position where user_id=?`, this.Id)
+		_, e3 := entity.BaseMysql.ExecBySqlByTx(tx, `insert into base_person_backup select a.* from base_person a inner join base_user b on (b.id=? and a.id=b.person_id)`, this.Id)
+		_, e4 := entity.BaseMysql.ExecBySqlByTx(tx, `insert into base_account_backup select a.* from base_account a inner join base_user b on (b.id=? and a.person_id=b.person_id)`, this.Id)
 		d1 := entity.BaseMysql.UpdateOrDeleteBySqlByTx(tx, `delete a from base_person a inner join base_user b on (b.id=? and a.id=b.person_id)`, this.Id)
 		d2 := entity.BaseMysql.UpdateOrDeleteBySqlByTx(tx, `delete a from base_account a inner join base_user b on (b.id=? and a.person_id=b.person_id)`, this.Id)
 		d3 := entity.BaseMysql.UpdateOrDeleteBySqlByTx(tx, `delete from base_user where id=?`, this.Id)