zjh
2023-10-13 906328ba3f842f5f86cb5bd60e09a8a7f6d2ac93
ltkj-framework/src/main/java/com/ltkj/framework/web/service/SysLoginService.java
@@ -140,12 +140,13 @@
            Long userId =loginUser.getUser().getUserId();
            SysUser user = userService.getById(userId);
            if(null !=user && null !=user.getDeptId()){
//                loginUser.getUser().setOrgId(user.getOrgId());
                if(!SecurityUtils.isAdmin(user.getUserId())){
                    SysDept sysDept = deptService.getById(user.getDeptId());
                    if (null != sysDept) {
                        DictHosp dictHosp = hospService.getById(sysDept.getHospId());
                        if(null !=dictHosp && dictHosp.getSecretKey() !=null && dictHosp.getExpirationTime() !=null){
                        if(null !=dictHosp){
                            loginUser.setHospName(dictHosp.getHospAreaName());
                            if(!SecurityUtils.isAdmin(user.getUserId())){
                                if(dictHosp.getSecretKey() != null && dictHosp.getExpirationTime() != null){
                            if (!SecurityUtils.matchesMallMerchantSecretKey(secret,dictHosp.getHospAreaId(),dictHosp.getAreaid(),
                                    dictHosp.getExpirationTime(),dictHosp.getSecretKey())) {
                                throw new SecretKeyException("商家已过期请续费使用");
@@ -156,12 +157,12 @@
                            }else {
                                loginUser.setMessage(null);
                            }
                        }else {
                            throw new SecretKeyException("请缴费使用");
                        }
                    }
                }
                }
            }else {
                throw new CustomException("请绑定商家");