From 2169d3300ddefadf6ef2cefb70f9f37c08003fc5 Mon Sep 17 00:00:00 2001 From: wj <1285151836@qq.com> Date: Fri, 19 May 2023 16:45:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B9=B3=E5=8F=B0=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/auth/LoginController.java | 25 +++++++++++++------ .../com/glxp/api/entity/auth/AuthLicense.java | 2 ++ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/auth/LoginController.java b/src/main/java/com/glxp/api/controller/auth/LoginController.java index 968534f1..1207bf06 100644 --- a/src/main/java/com/glxp/api/controller/auth/LoginController.java +++ b/src/main/java/com/glxp/api/controller/auth/LoginController.java @@ -11,6 +11,7 @@ import com.glxp.api.entity.auth.*; import com.glxp.api.entity.system.CompanyEntity; import com.glxp.api.entity.system.SysPdaKeyEntity; import com.glxp.api.exception.JsonException; +import com.glxp.api.req.auth.FilterInvWarehouseRequest; import com.glxp.api.req.auth.LoginRequest; import com.glxp.api.req.auth.PCLoginRequest; import com.glxp.api.req.auth.UpdatePasswordRequest; @@ -75,12 +76,12 @@ public class LoginController extends BaseController { AuthAdmin authAdmin = authAdminService.findByUserName(loginRequest.getUsername()); if (authAdmin == null) { - UserRegisterEntity userRegisterEntity=userRegisterService.selectByUserName(loginRequest.getUsername()); - if(userRegisterEntity!=null){ - throw new JsonException(ResultEnum.DATA_NOT, "该账号未通过审核!"); - }else { - throw new JsonException(ResultEnum.DATA_NOT, "该账号未注册!"); - } + UserRegisterEntity userRegisterEntity = userRegisterService.selectByUserName(loginRequest.getUsername()); + if (userRegisterEntity != null) { + throw new JsonException(ResultEnum.DATA_NOT, "该账号未通过审核!"); + } else { + throw new JsonException(ResultEnum.DATA_NOT, "该账号未注册!"); + } } if (!PasswordUtils.authAdminPwd(loginRequest.getPassword()).equals(authAdmin.getPassWord())) { @@ -226,9 +227,9 @@ public class LoginController extends BaseController { LoginUserInfoResponse loginUserInfoResponse = new LoginUserInfoResponse(); BeanUtils.copyProperties(authAdmin, loginUserInfoResponse); CompanyEntity companyEntity = companyService.findCompany(authAdmin.getCustomerId()); - if("110".equals(authAdmin.getCustomerId())){ + if ("110".equals(authAdmin.getCustomerId())) { loginUserInfoResponse.setCompanyName(authAdmin.getEmployeeName()); - }else{ + } else { loginUserInfoResponse.setCompanyName(companyEntity.getCompanyName()); } loginUserInfoResponse.setLocDeptName(deptService.getInvName(loginUserInfoResponse.getLocDeptCode())); @@ -305,6 +306,8 @@ public class LoginController extends BaseController { return ResultVOUtils.error(ResultEnum.DATA_CHANGE); } + //------------------------------------------UDIMS接口----------------------------------------------------------- + /** * 平台验证 * @@ -342,6 +345,12 @@ public class LoginController extends BaseController { authLicenseDao.romveByCustomerId(authAdmin.getCustomerId() + ""); authLicenseDao.save(authLicense); } + FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest(); + filterInvWarehouseRequest.setSpUse(true); + List invList = invWarehouseService.findInvListByUser(filterInvWarehouseRequest); + Map res = new WeakHashMap<>(2); + res.put("license", authLicense); + res.put("invList", invList); return ResultVOUtils.success(authLicense); } diff --git a/src/main/java/com/glxp/api/entity/auth/AuthLicense.java b/src/main/java/com/glxp/api/entity/auth/AuthLicense.java index 0ebdae9d..a46898fe 100644 --- a/src/main/java/com/glxp/api/entity/auth/AuthLicense.java +++ b/src/main/java/com/glxp/api/entity/auth/AuthLicense.java @@ -1,10 +1,12 @@ package com.glxp.api.entity.auth; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import java.util.Date; @Data +@TableName("auth_license") public class AuthLicense { private String id; // 名称