积分灵兰币控制负数

This commit is contained in:
wuchunlei
2025-05-07 14:23:56 +08:00
parent 1c049763d8
commit b6cf9efc7a
2 changed files with 10 additions and 0 deletions

View File

@@ -631,6 +631,9 @@ public class MyUserController {
public R pointChange(@RequestParam Map<String, String> params){
String pointType = params.get("pointType");
String pointAmount = params.get("pointAmount");
if (Integer.valueOf(pointAmount)<=0){
return R.error("变动金额不能为负数");
}
String id = params.get("id");
MyUserEntity byId = userService.getById(id);
int i = 0;