Commit ae2cde7e authored by xiandafu's avatar xiandafu
Browse files

bug fix

parent 2a25575e
......@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.ibeetl</groupId>
<artifactId>admin-console</artifactId>
<version>1.1</version>
<version>1.1.1</version>
<packaging>jar</packaging>
<parent>
<groupId>com.ibeetl</groupId>
......@@ -16,7 +16,7 @@
<dependency>
<groupId>com.ibeetl</groupId>
<artifactId>admin-core</artifactId>
<version>1.1</version>
<version>1.1.1</version>
</dependency>
</dependencies>
......
......@@ -11,8 +11,8 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
# 1,1 是管理员密码,相当于启动后就登录,方便测试,系统需要取消这俩个配置
user.id=1
user.orgId=1
#user.id=1
#user.orgId=1
#打开审计功能,开发模式应该关闭
audit.enable=false
spring.session.store-type=HASH_MAP
......
......@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.ibeetl</groupId>
<artifactId>admin-core</artifactId>
<version>1.1</version>
<version>1.1.1</version>
<packaging>jar</packaging>
<properties>
<maven.test.skip>true</maven.test.skip>
......@@ -63,7 +63,7 @@
<parent>
<groupId>com.ibeetl</groupId>
<artifactId>admin</artifactId>
<version>1.1</version>
<version>1.1.1</version>
</parent>
......
......@@ -37,14 +37,18 @@ public class CoreUserService {
query.setCode(userName);
query.setPassword(passwordEncryptService.password(password));
query.setState(GeneralStateEnum.ENABLE.getValue());
CoreUser user =userDao.getSQLManager().templateOne(query);
// SysUser user = userDao.templateOne(query);
if(user==null){
return null;
CoreUser user =userDao.createLambdaQuery().andEq(CoreUser::getCode,userName).
andEq(CoreUser::getPassword, passwordEncryptService.password(password)).single();
if(user==null) {
throw new PlatformException("用户"+userName+"不存在或者密码错误");
}
if(user.getDelFlag()==DelFlagEnum.DELETED.getValue()||user.getState()==GeneralStateEnum.DISABLE.getValue()){
throw new PlatformException("用户"+userName+"已经删除或者失效");
if(!user.getState().equals(GeneralStateEnum.ENABLE.getValue())){
throw new PlatformException("用户"+userName+"已经失效");
}
if(user.getDelFlag()==DelFlagEnum.DELETED.getValue()) {
throw new PlatformException("用户"+userName+"已经删除");
}
List<CoreOrg> orgs = getUserOrg(user.getId(),user.getOrgId());
UserLoginInfo loginInfo = new UserLoginInfo();
......
......@@ -3,6 +3,8 @@ package com.ibeetl.admin.core.web;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.beetl.ext.simulate.WebSimulate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
......@@ -16,10 +18,11 @@ import org.springframework.web.bind.annotation.RequestMapping;
public class SimulateController {
@Autowired
WebSimulate webSimulate;
Log log = LogFactory.getLog(SimulateController.class);
@RequestMapping("/**/*.do")
public void simluateWeb(HttpServletRequest request, HttpServletResponse response) {
response.setContentType("text/html;charset=UTF-8");
log.info("没有配置 url "+request.getRequestURI()+",使用模拟MVC功能使用前后端分离");
webSimulate.execute(request, response);
}
......
......@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.ibeetl</groupId>
<artifactId>admin</artifactId>
<version>1.1</version>
<version>1.1.1</version>
<packaging>pom</packaging>
<properties>
<java.version>1.8</java.version>
......@@ -17,7 +17,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
<version>2.0.1.RELEASE</version>
</parent>
<!-- Add typical dependencies for a web application -->
<dependencies>
......@@ -62,7 +62,7 @@
<dependency>
<groupId>com.ibeetl</groupId>
<artifactId>beetl-framework-starter</artifactId>
<version>1.1.40.RELEASE</version>
<version>1.1.45.RELEASE</version>
</dependency>
<dependency>
<groupId>com.trigersoft</groupId>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment