|
@@ -1,5 +1,7 @@
|
|
|
package com.fjhx.base.system;
|
|
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
+import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
import com.fjhx.tenant.entity.tenant.po.TenantInfo;
|
|
|
import com.fjhx.tenant.service.tenant.TenantInfoService;
|
|
@@ -14,6 +16,7 @@ import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import com.ruoyi.framework.web.service.SysLoginService;
|
|
|
import com.ruoyi.framework.web.service.SysPermissionService;
|
|
|
import com.ruoyi.system.service.ISysMenuService;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -21,6 +24,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
import java.util.Set;
|
|
@@ -30,6 +34,7 @@ import java.util.Set;
|
|
|
*
|
|
|
* @author ruoyi
|
|
|
*/
|
|
|
+@Slf4j
|
|
|
@DS(BaseSourceConstant.BASE)
|
|
|
@RestController
|
|
|
public class SysLoginController {
|
|
@@ -59,6 +64,8 @@ public class SysLoginController {
|
|
|
@PostMapping("/login")
|
|
|
public AjaxResult login(@RequestBody LoginBody loginBody) {
|
|
|
String tenantId = request.getHeader("tenantId");
|
|
|
+ log.error("调用方法:login,tenantId:{},date:{},data;{}",
|
|
|
+ tenantId, DateUtil.formatDateTime(new Date()), JSONObject.toJSONString(loginBody));
|
|
|
|
|
|
TenantInfo tenantInfo = tenantInfoService.getOne(q -> q.eq(TenantInfo::getTenantId, tenantId));
|
|
|
if (tenantInfo == null) {
|