|
@@ -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, `select * into base_user_backup from base_user where id=?`, this.Id)
|
|
|
- _, e2 := entity.BaseMysql.ExecBySqlByTx(tx, `select * into base_position_backup from base_position where user_id=?`, this.Id)
|
|
|
- _, e3 := entity.BaseMysql.ExecBySqlByTx(tx, `select a.* into 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, `select a.* into 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 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)
|
|
|
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)
|