|
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.validation.Valid;
|
|
|
+import javax.validation.constraints.NotEmpty;
|
|
|
|
|
|
import static cn.newfeifan.mall.framework.common.pojo.CommonResult.success;
|
|
|
import static cn.newfeifan.mall.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
|
@@ -32,6 +33,13 @@ public class AppMemberUserController {
|
|
|
@Resource
|
|
|
private MemberLevelService levelService;
|
|
|
|
|
|
+ @GetMapping("/verifyUsername")
|
|
|
+ @Operation(summary = "校验用户名是否重复")
|
|
|
+ public CommonResult<Boolean> verifyUsername(@NotEmpty(message = "用户名不能为空") @RequestParam(value = "username") String username) {
|
|
|
+ return success(userService.selectCountByUsername(username) == 0);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@GetMapping("/get")
|
|
|
@Operation(summary = "获得基本信息")
|
|
|
@PreAuthenticated
|