소스 검색

添加极光id的时候做非空校验

Yangzw 6 일 전
부모
커밋
a77d6a2655

+ 2 - 1
feifan-module-member/feifan-module-member-biz/src/main/java/cn/newfeifan/mall/module/member/controller/app/user/AppMemberUserController.java

@@ -63,7 +63,8 @@ public class AppMemberUserController {
     @PutMapping("/addRegisterId")
     @Operation(summary = "添加安卓的极光注册id")
     @PreAuthenticated
-    public CommonResult<Boolean> addRegisterId(@NotEmpty String registerId) {
+    public CommonResult<Boolean> addRegisterId(String registerId) {
+        if(registerId == null || registerId.trim().isEmpty()) return success(true);
         userService.addRegisterId(registerId);
         return success(true);
     }