|
@@ -8,6 +8,7 @@ import cn.rankin.common.utils.util.HttpUtil;
|
|
|
import cn.rankin.data.api.app.dto.DeviceLoginDTO;
|
|
|
import cn.rankin.data.api.app.dto.LoginInfoDTO;
|
|
|
import cn.rankin.data.api.app.vo.UserInfoVo;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -16,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.validation.Valid;
|
|
|
-
|
|
|
+@Slf4j
|
|
|
@RestController
|
|
|
@RequestMapping(value = "/token")
|
|
|
public class LoginController {
|
|
@@ -30,6 +31,8 @@ public class LoginController {
|
|
|
loginInfoDTO.setIp(ip);
|
|
|
loginInfoDTO.setTerminal(request.getHeader("terminal"));
|
|
|
loginInfoDTO.setMerchant(request.getHeader("merchant"));
|
|
|
+
|
|
|
+ log.info("login request header : ip={},terminal={},merchant={}",ip , request.getHeader("terminal"), request.getHeader("merchant"));
|
|
|
return userService.login(loginInfoDTO);
|
|
|
}
|
|
|
|
|
@@ -37,6 +40,7 @@ public class LoginController {
|
|
|
public APIResult<UserInfoVo> refresh(HttpServletRequest request, @RequestBody DeviceLoginDTO deviceLoginDTO) {
|
|
|
String deviceCode = deviceLoginDTO.getDeviceCode();
|
|
|
String merchant = request.getHeader("merchant");
|
|
|
+ log.info("refresh request header : deviceCode={}, merchant={}", deviceCode, merchant);
|
|
|
return userService.refresh(deviceCode, merchant, Boolean.TRUE);
|
|
|
}
|
|
|
|