diff --git a/ds-base/src/main/java/com/dsideal/base/BaseApplication.java b/ds-base/src/main/java/com/dsideal/base/BaseApplication.java index b1100863..4bb12081 100644 --- a/ds-base/src/main/java/com/dsideal/base/BaseApplication.java +++ b/ds-base/src/main/java/com/dsideal/base/BaseApplication.java @@ -47,7 +47,7 @@ public class BaseApplication extends JFinalConfig { /** * 配置常量 */ - Prop PropKit; + public static Prop PropKit; @Override public void configConstant(Constants me) { diff --git a/ds-base/src/main/java/com/dsideal/base/Interceptor/IsLoginInterceptor.java b/ds-base/src/main/java/com/dsideal/base/Interceptor/IsLoginInterceptor.java index 6b71c27f..08d51a49 100644 --- a/ds-base/src/main/java/com/dsideal/base/Interceptor/IsLoginInterceptor.java +++ b/ds-base/src/main/java/com/dsideal/base/Interceptor/IsLoginInterceptor.java @@ -1,5 +1,6 @@ package com.dsideal.base.Interceptor; +import com.dsideal.base.BaseApplication; import com.dsideal.base.Util.CommonUtil; import com.jfinal.aop.Interceptor; import com.jfinal.aop.Invocation; @@ -45,7 +46,7 @@ public class IsLoginInterceptor implements Interceptor { loginMap.put("bureau_id", con.getCookie("bureau_id")); loginMap.put("org_code", con.getCookie("org_code")); //2、根据cookie中获取到的map,得到一个 share - String token = CommonUtil.Sign(loginMap, PropKit.get("CookieMd5SingPwd")); + String token = CommonUtil.Sign(loginMap, BaseApplication.PropKit.get("jwt.CookieMd5SingPwd")); //3、与cookie中的token进行对比 if (token.equals(con.getCookie("token"))) { isTrue = true; diff --git a/ds-base/src/main/java/com/dsideal/base/LoginPerson/Controller/LoginPersonController.java b/ds-base/src/main/java/com/dsideal/base/LoginPerson/Controller/LoginPersonController.java index 9ab479ae..32c1cd0f 100644 --- a/ds-base/src/main/java/com/dsideal/base/LoginPerson/Controller/LoginPersonController.java +++ b/ds-base/src/main/java/com/dsideal/base/LoginPerson/Controller/LoginPersonController.java @@ -1,8 +1,7 @@ package com.dsideal.base.LoginPerson.Controller; -import cn.hutool.captcha.CaptchaUtil; -import cn.hutool.captcha.LineCaptcha; import com.alibaba.fastjson.JSONObject; +import com.dsideal.base.BaseApplication; import com.dsideal.base.Interceptor.*; import com.dsideal.base.LoginPerson.Model.LoginPersonModel; import com.dsideal.base.Base.Model.BaseModel; @@ -16,10 +15,7 @@ import com.jfinal.kit.PropKit; import com.jfinal.kit.StrKit; import com.jfinal.plugin.activerecord.Page; import com.jfinal.plugin.activerecord.Record; -import com.jfinal.plugin.redis.Redis; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; import java.io.File; import java.util.HashMap; import java.util.Map; @@ -100,7 +96,7 @@ public class LoginPersonController extends Controller { _map.put("bureau_id", loginMap.get("bureau_id")); _map.put("org_code", loginMap.get("org_code")); - String token = CommonUtil.Sign(_map, PropKit.get("CookieMd5SingPwd")); + String token = CommonUtil.Sign(_map, BaseApplication.PropKit.get("jwt.CookieMd5SingPwd")); CookieUtil.set(getResponse(), "identity_id", loginMap.get("identity_id").toString(), false, true); CookieUtil.set(getResponse(), "person_id", loginMap.get("person_id").toString(), false, true); CookieUtil.set(getResponse(), "bureau_id", loginMap.get("bureau_id").toString(), false, true); @@ -238,7 +234,7 @@ public class LoginPersonController extends Controller { @IsSysAdminInterface({"1"}) public void getPrintCityManagerForExcel() { //模板文件 - String excelPath = PathKit.getRootClassPath() + PropKit.get("excelExportTemplatePathSuffix").replace("\\", "/"); + String excelPath = PathKit.getRootClassPath() + BaseApplication.PropKit.get("excel.excelExportTemplatePathSuffix").replace("\\", "/"); String filePath = excelPath + "getPrintCityManager.json"; //转成 json对象 JSONObject jo = FileUtil.readJsonFile(filePath); @@ -275,7 +271,7 @@ public class LoginPersonController extends Controller { @IsSysAdminInterface({"1", "2"}) public void getPrintCityBureauForExcel() { //模板文件 - String excelPath = PathKit.getRootClassPath() + PropKit.get("excelExportTemplatePathSuffix").replace("\\", "/"); + String excelPath = PathKit.getRootClassPath() + BaseApplication.PropKit.get("excel.excelExportTemplatePathSuffix").replace("\\", "/"); String filePath = excelPath + "getPrintCityBureau.json"; //转成 json对象 JSONObject jo = FileUtil.readJsonFile(filePath); @@ -312,7 +308,7 @@ public class LoginPersonController extends Controller { @IsSysAdminInterface({"1", "2", "3"}) public void getPrintAreaManagerForExcel() { //模板文件 - String excelPath = PathKit.getRootClassPath() + PropKit.get("excelExportTemplatePathSuffix").replace("\\", "/"); + String excelPath = PathKit.getRootClassPath() + BaseApplication.PropKit.get("excel.excelExportTemplatePathSuffix").replace("\\", "/"); String filePath = excelPath + "getPrintAreaManager.json"; //转成 json对象 JSONObject jo = FileUtil.readJsonFile(filePath); @@ -351,7 +347,7 @@ public class LoginPersonController extends Controller { @EmptyInterface({"area_id"}) public void getPrintAreaBureauForExcel(String area_id) { //模板文件 - String excelPath = PathKit.getRootClassPath() + PropKit.get("excelExportTemplatePathSuffix").replace("\\", "/"); + String excelPath = PathKit.getRootClassPath() + BaseApplication.PropKit.get("excel.excelExportTemplatePathSuffix").replace("\\", "/"); String filePath = excelPath + "getPrintAreaBureau.json"; //转成 json对象 JSONObject jo = FileUtil.readJsonFile(filePath); diff --git a/ds-base/src/main/resource/Sql/dm.sql b/ds-base/src/main/resource/Sql/dm.sql index ec35e6ae..1db967d6 100644 --- a/ds-base/src/main/resource/Sql/dm.sql +++ b/ds-base/src/main/resource/Sql/dm.sql @@ -28,7 +28,7 @@ -- 获取学段字典 #sql("getDmStage") - select stage_id,stage_name from t_dm_stage where b_use=1 order by sort_id + select stage_id,stage_name from t_dm_stage order by stage_id #end -- 获取指定学段下的学科 diff --git a/ds-base/src/main/resource/undertow_dev.properties b/ds-base/src/main/resource/undertow_dev.properties index 8329bab6..db033b3a 100644 --- a/ds-base/src/main/resource/undertow_dev.properties +++ b/ds-base/src/main/resource/undertow_dev.properties @@ -3,10 +3,10 @@ undertow.devMode=true undertow.port=8001 undertow.host=0.0.0.0 #undertow.resourcePath =/root/dsBase/WebRoot,classpath:static -undertow.resourcePath =D:/dsWork/dsExam/ds-base/WebRoot,classpath:static +undertow.resourcePath =D:/dsWork/dsProject/ds-base/WebRoot,classpath:static # 目录名称 -undertow.contextPath=/ +undertow.contextPath=/dsBase # 设定I/O线程数. server.undertow.io-threads=8 diff --git a/ds-base/src/main/resource/undertow_pro.properties b/ds-base/src/main/resource/undertow_pro.properties index 5d8aafbd..dbe0be27 100644 --- a/ds-base/src/main/resource/undertow_pro.properties +++ b/ds-base/src/main/resource/undertow_pro.properties @@ -5,7 +5,7 @@ undertow.host=0.0.0.0 undertow.resourcePath =/root/WebRoot,classpath:static # 目录名称 -undertow.contextPath=/ +undertow.contextPath=/dsBase # 设定I/O线程数. server.undertow.io-threads=8 diff --git a/ds-gw/src/main/resources/application_dev.yaml b/ds-gw/src/main/resources/application_dev.yaml index c92cf14d..abf494d8 100644 --- a/ds-gw/src/main/resources/application_dev.yaml +++ b/ds-gw/src/main/resources/application_dev.yaml @@ -9,5 +9,5 @@ route: # 白名单 whitelist: - - /ds-base/doLogin - - /ds-resource/doLogin + - /dsBase/doLogin + - /dsResource/doLogin diff --git a/ds-gw/src/main/resources/undertow_pro.properties b/ds-gw/src/main/resources/undertow_pro.properties index 7a63f650..eb94762a 100644 --- a/ds-gw/src/main/resources/undertow_pro.properties +++ b/ds-gw/src/main/resources/undertow_pro.properties @@ -1,6 +1,6 @@ # true 值支持热加载 undertow.devMode=false -undertow.port=8001 +undertow.port=8000 undertow.host=0.0.0.0 # 目录名称