main
黄海 10 months ago
parent 0715426810
commit 7657647b1d

@ -47,7 +47,7 @@ public class BaseApplication extends JFinalConfig {
/**
*
*/
Prop PropKit;
public static Prop PropKit;
@Override
public void configConstant(Constants me) {

@ -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;

@ -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);

@ -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
-- 获取指定学段下的学科

@ -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

@ -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

@ -9,5 +9,5 @@ route:
# 白名单
whitelist:
- /ds-base/doLogin
- /ds-resource/doLogin
- /dsBase/doLogin
- /dsResource/doLogin

@ -1,6 +1,6 @@
# true 值支持热加载
undertow.devMode=false
undertow.port=8001
undertow.port=8000
undertow.host=0.0.0.0
# 目录名称

Loading…
Cancel
Save