```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

feat(cool): 添加删除和更新操作的数据影响行数检查

- 在Controller的Delete方法中添加RowsAffected检查,当影响行数为0时返回"not found"错误
- 在Controller的Update方法中添加RowsAffected检查,当影响行数为0时返回"not found"错误
- 修改Service接口定义,将ServiceDelete和ServiceUpdate方法的返回值类型从interface{}改为sql
This commit is contained in:
昔念
2026-03-19 17:18:32 +08:00
parent 24bc74fc87
commit 9cc29eec35
6 changed files with 118 additions and 18 deletions

View File

@@ -184,7 +184,7 @@ func (c *BaseSysUserController) DuihuanGold(ctx context.Context, req *DuihuanGol
return
}
service.NewBaseSysUserService().DuihuanFreeGold(uint32(t.UserId), int64(req.Gold*100))
service.NewBaseSysUserService().DuihuanFreeGold(uint32(t.UserId), int64(req.Gold*100), int64(req.Gold*100))
res = cool.Ok(nil)
return
}