|
@@ -4,9 +4,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.diagbot.annotation.SysLogger;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.entity.User;
|
|
|
-import com.diagbot.exception.CommonErrorCode;
|
|
|
-import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.facade.UserFacade;
|
|
|
+import com.diagbot.vo.UserImgVerVO;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -36,9 +35,9 @@ public class UserController {
|
|
|
@PostMapping("/registry")
|
|
|
@SysLogger("registry")
|
|
|
@Transactional
|
|
|
- public RespDTO createUser(@RequestBody User user){
|
|
|
+ public RespDTO createUser(@RequestBody UserImgVerVO userImgVerVO){
|
|
|
//参数判读省略,判读该用户在数据库是否已经存在省略
|
|
|
- userFacade.createUser(user);
|
|
|
+ User user = userFacade.createUser(userImgVerVO);
|
|
|
// throw new CommonException(ErrorCode.FAIL);
|
|
|
return RespDTO.onSuc(user);
|
|
|
}
|
|
@@ -73,16 +72,16 @@ public class UserController {
|
|
|
return RespDTO.onSuc(user);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "注册事务", notes = "username和password为必选项")
|
|
|
- @PostMapping("/registryTran")
|
|
|
- @SysLogger("registryTran")
|
|
|
- @Transactional
|
|
|
- public RespDTO createUserTran(@RequestBody User user){
|
|
|
- //参数判读省略,判读该用户在数据库是否已经存在省略
|
|
|
- userFacade.createUser(user);
|
|
|
- throw new CommonException(CommonErrorCode.FAIL);
|
|
|
-// return RespDTO.onSuc(user);
|
|
|
- }
|
|
|
+// @ApiOperation(value = "注册事务", notes = "username和password为必选项")
|
|
|
+// @PostMapping("/registryTran")
|
|
|
+// @SysLogger("registryTran")
|
|
|
+// @Transactional
|
|
|
+// public RespDTO createUserTran(@RequestBody User user){
|
|
|
+// //参数判读省略,判读该用户在数据库是否已经存在省略
|
|
|
+// userFacade.createUser(user);
|
|
|
+// throw new CommonException(CommonErrorCode.FAIL);
|
|
|
+//// return RespDTO.onSuc(user);
|
|
|
+// }
|
|
|
|
|
|
// @Autowired
|
|
|
// private AmqpTemplate rabbitTemplate;
|