File tree Expand file tree Collapse file tree
src/main/java/io/github/talelin/latticy Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424import io .github .talelin .latticy .vo .UserPermissionVO ;
2525import org .springframework .beans .factory .annotation .Autowired ;
2626import org .springframework .validation .annotation .Validated ;
27- import org .springframework .web .bind .annotation .*;
27+ import org .springframework .web .bind .annotation .GetMapping ;
28+ import org .springframework .web .bind .annotation .PostMapping ;
29+ import org .springframework .web .bind .annotation .PutMapping ;
30+ import org .springframework .web .bind .annotation .RequestBody ;
31+ import org .springframework .web .bind .annotation .RequestMapping ;
32+ import org .springframework .web .bind .annotation .RestController ;
2833
2934import java .util .List ;
3035import java .util .Map ;
@@ -56,7 +61,7 @@ public class UserController {
5661 */
5762 @ PostMapping ("/register" )
5863 @ AdminRequired
59- public CreatedVO < String > register (@ RequestBody @ Validated RegisterDTO validator ) {
64+ public CreatedVO register (@ RequestBody @ Validated RegisterDTO validator ) {
6065 userService .createUser (validator );
6166 return new CreatedVO (11 );
6267 }
Original file line number Diff line number Diff line change @@ -43,26 +43,12 @@ public UnifyResponseVO(T message) {
4343 this .request = RequestUtil .getSimpleRequest ();
4444 }
4545
46- public UnifyResponseVO (HttpStatus httpStatus ) {
47- this .code = Code .SUCCESS .getCode ();
48- this .message = (T ) Code .SUCCESS .getDescription ();
49- this .request = RequestUtil .getSimpleRequest ();
50- ResponseUtil .setCurrentResponseHttpStatus (httpStatus .value ());
51- }
52-
5346 public UnifyResponseVO (int code , T message ) {
5447 this .code = code ;
5548 this .message = message ;
5649 this .request = RequestUtil .getSimpleRequest ();
5750 }
5851
59- public UnifyResponseVO (int code , HttpStatus httpStatus ) {
60- this .code = code ;
61- this .message = (T ) Code .SUCCESS .getDescription ();
62- this .request = RequestUtil .getSimpleRequest ();
63- ResponseUtil .setCurrentResponseHttpStatus (httpStatus .value ());
64- }
65-
6652 public UnifyResponseVO (T message , HttpStatus httpStatus ) {
6753 this .code = Code .SUCCESS .getCode ();
6854 this .message = message ;
You can’t perform that action at this time.
0 commit comments