Commit ae2cde7e authored by xiandafu's avatar xiandafu
Browse files

bug fix

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