feat(cool): 添加删除和更新操作的数据影响行数检查
- 在Controller的Delete方法中添加RowsAffected检查,当影响行数为0时返回"not found"错误
- 在Controller的Update方法中添加RowsAffected检查,当影响行数为0时返回"not found"错误
- 修改Service接口定义,将ServiceDelete和ServiceUpdate方法的返回值类型从interface{}改为sql
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user