商户登录相关
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
package com.czg.controller;
|
||||
|
||||
import com.czg.dto.SysLoginDTO;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.service.AuthorizationService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -12,10 +16,19 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@RequestMapping("auth")
|
||||
public class AuthorizationController {
|
||||
private final AuthorizationService authorizationService;
|
||||
|
||||
public AuthorizationController(AuthorizationService authorizationService) {
|
||||
this.authorizationService = authorizationService;
|
||||
}
|
||||
|
||||
@GetMapping("captcha")
|
||||
public CzgResult<?> captcha() {
|
||||
return CzgResult.success(authorizationService.getCaptcha());
|
||||
}
|
||||
|
||||
@PostMapping("login")
|
||||
public void login() {
|
||||
StpKit.USER.checkLogin();
|
||||
System.out.println(1);
|
||||
public CzgResult<?> login(@Validated SysLoginDTO loginDTO) {
|
||||
return CzgResult.success(authorizationService.login(loginDTO));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.czg.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("shopInfo")
|
||||
public class ShopInfoController {
|
||||
}
|
||||
Reference in New Issue
Block a user