mirror of
https://gitee.com/log4j/pig.git
synced 2024-12-23 05:00:23 +08:00
✨ Introducing new features. 用户注册增加开关
This commit is contained in:
parent
1ec839c959
commit
80fdc8f295
@ -0,0 +1,41 @@
|
||||
package com.pig4cloud.pig.admin.controller;
|
||||
|
||||
import com.pig4cloud.pig.admin.api.dto.UserDTO;
|
||||
import com.pig4cloud.pig.admin.service.SysUserService;
|
||||
import com.pig4cloud.pig.common.core.util.R;
|
||||
import com.pig4cloud.pig.common.log.annotation.SysLog;
|
||||
import com.pig4cloud.pig.common.security.annotation.Inner;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2022/3/30
|
||||
*
|
||||
* 客户端注册功能 register.user = false
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/register")
|
||||
@RequiredArgsConstructor
|
||||
@ConditionalOnProperty(name = "register.user", matchIfMissing = true)
|
||||
public class RegisterController {
|
||||
|
||||
private final SysUserService userService;
|
||||
|
||||
/**
|
||||
* 注册用户
|
||||
* @param userDto 用户信息
|
||||
* @return success/false
|
||||
*/
|
||||
@Inner(value = false)
|
||||
@SysLog("注册用户")
|
||||
@PostMapping("/user")
|
||||
public R<Boolean> registerUser(@RequestBody UserDTO userDto) {
|
||||
return userService.registerUser(userDto);
|
||||
}
|
||||
|
||||
}
|
@ -216,16 +216,4 @@ public class UserController {
|
||||
return userService.importUser(excelVOList, bindingResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册用户
|
||||
* @param userDto 用户信息
|
||||
* @return success/false
|
||||
*/
|
||||
@Inner(value = false)
|
||||
@SysLog("注册用户")
|
||||
@PostMapping("/registerUser")
|
||||
public R<Boolean> registerUser(@RequestBody UserDTO userDto) {
|
||||
return userService.registerUser(userDto);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user