management/guns-admin/pom.xml
@@ -72,15 +72,6 @@ <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency> <!--设置共享session--> <dependency> <groupId>org.springframework.session</groupId> <artifactId>spring-session-data-redis</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <!-- 导入Excel数据依赖 start --> <dependency> @@ -137,14 +128,14 @@ </dependency> <!--需要分布式session的话需要放开注释--> <!--<dependency>--> <!--<groupId>org.springframework.session</groupId>--> <!--<artifactId>spring-session-data-redis</artifactId>--> <!--</dependency>--> <!--<dependency>--> <!--<groupId>org.springframework.boot</groupId>--> <!--<artifactId>spring-boot-starter-data-redis</artifactId>--> <!--</dependency>--> <dependency> <groupId>org.springframework.session</groupId> <artifactId>spring-session-data-redis</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <dependency> <groupId>com.github.penggle</groupId> @@ -215,10 +206,6 @@ <groupId>org.apache.httpcomponents</groupId> <artifactId>httpmime</artifactId> <version>4.5.6</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <dependency> <groupId>org.projectlombok</groupId> management/guns-admin/src/main/java/com/stylefeng/guns/config/SpringSessionConfig.java
@@ -1,16 +1,13 @@ package com.stylefeng.guns.config; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession; /** * spring session配置 * * @author fengshuonan * @date 2017-07-13 21:05 */ @EnableRedisHttpSession(maxInactiveIntervalInSeconds = 28800) //session过期时间 如果部署多机环境,需要打开注释 @ConditionalOnProperty(prefix = "guns", name = "spring-session-open", havingValue = "true") //@EnableRedisHttpSession(maxInactiveIntervalInSeconds = 28800) //session过期时间 如果部署多机环境,需要打开注释 //@ConditionalOnProperty(prefix = "guns", name = "spring-session-open", havingValue = "true") public class SpringSessionConfig { } management/guns-admin/src/main/java/com/stylefeng/guns/config/web/WebConfig.java
@@ -206,7 +206,7 @@ registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.loginUrl", "https://testsso1.teamshub.com/login"); registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.validateUrl", "https://testsso1.teamshub.com/serviceValidate"); registrationBean.addInitParameter("com.oncon.md.loginUrl", "https://testsso1.teamshub.com/sso-session/login"); registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.serverName", "http://127.0.0.1:8010"); registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.serverName", "http://192.168.110.80:810"); } if("test".equals(activeProfile)){ registrationBean.setFilter(onconMDCasFilter); management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBranchOfficeController.java
@@ -624,6 +624,8 @@ user.setEnterId(Long.valueOf(enterCode)); user.setEmpnew(empnew); userService.insert(user); tBranchOffice.setSysUserId(user.getId()); tBranchOfficeService.updateById(tBranchOffice); //编写异步延迟处理中台账号延迟创建的问题 if(0 == empId){ Timer timer = new Timer(); management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java
@@ -662,47 +662,44 @@ tDriver.setBalance(BigDecimal.ZERO); tDriver.setBackgroundBalance(BigDecimal.ZERO); tDriver.setCommission(BigDecimal.ZERO); if(2 == tDriver.getApprovalStatus()){ ShiroUser user = shiroExtUtil.getUser(); User user2 = userService.selectById(user.getId()); Integer objectId = user.getObjectId(); TBranchOffice tBranchOffice = branchOfficeService.selectById(objectId); List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(tDriver.getPhone(), tBranchOffice.getEnterCode()); Long empId = null; Integer empnew = null; if(null == userInfoByPhone || userInfoByPhone.size() == 0){ SaveStaffNodeRequest request = new SaveStaffNodeRequest(); request.setMobile(user2.getPhone()); request.setEntercode(tBranchOffice.getEnterCode()); request.setEmpName(tDriver.getName()); request.setEmpNickname(tDriver.getName()); request.setLoginNo(tDriver.getPhone()); request.setEmpSex(tDriver.getSex() == 1 ? "男" : "女"); request.setMphone(tDriver.getPhone()); request.setEmail(tDriver.getPhone() + "@qyt.com"); request.setDeptId(0); request.setPositionId(1); request.setSuperLevel(0); request.setHideMobile(0); ResultUtil<SaveStaffNode> resultUtil = EmployeeUtil.saveStaffNode(request); if(200 != resultUtil.getStatus()){ return new ErrorTip(resultUtil.getStatus(), resultUtil.getMsg()); } SaveStaffNode saveStaffNode = resultUtil.getData(); empId = saveStaffNode.getEmpId(); empnew = 1; }else{ empId = userInfoByPhone.get(0).getEmpId(); empnew = 0; } tDriver.setApprovalStatus(2); TBranchOffice tBranchOffice1 = branchOfficeService.selectById(tDriver.getBranchOfficeId()); tDriver.setEmpId(empId); tDriver.setEntercode(tBranchOffice1.getEnterCode()); tDriver.setEnterId(Long.valueOf(tBranchOffice1.getEnterCode())); tDriver.setEmpnew(empnew); TBranchOffice tBranchOffice = branchOfficeService.selectById(tDriver.getBranchOfficeId()); User user2 = userService.selectById(tBranchOffice.getSysUserId()); List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(tDriver.getPhone(), tBranchOffice.getEnterCode()); Long empId = null; Integer empnew = null; if(null == userInfoByPhone || userInfoByPhone.size() == 0){ SaveStaffNodeRequest request = new SaveStaffNodeRequest(); request.setMobile(user2.getPhone()); request.setEntercode(tBranchOffice.getEnterCode()); request.setEmpName(tDriver.getName()); request.setEmpNickname(tDriver.getName()); request.setLoginNo(tDriver.getPhone()); request.setEmpSex(tDriver.getSex() == 1 ? "男" : "女"); request.setMphone(tDriver.getPhone()); request.setEmail(tDriver.getPhone() + "@qyt.com"); request.setDeptId(0); request.setPositionId(1); request.setSuperLevel(0); request.setHideMobile(0); ResultUtil<SaveStaffNode> resultUtil = EmployeeUtil.saveStaffNode(request); if(200 != resultUtil.getStatus()){ return new ErrorTip(resultUtil.getStatus(), resultUtil.getMsg()); } SaveStaffNode saveStaffNode = resultUtil.getData(); empId = saveStaffNode.getEmpId(); empnew = 1; }else{ empId = userInfoByPhone.get(0).getEmpId(); empnew = 0; } TBranchOffice tBranchOffice1 = branchOfficeService.selectById(tDriver.getBranchOfficeId()); tDriver.setEmpId(empId); tDriver.setEntercode(tBranchOffice1.getEnterCode()); tDriver.setEnterId(Long.valueOf(tBranchOffice1.getEnterCode())); tDriver.setEmpnew(empnew); tDriverService.insert(tDriver); return SUCCESS_TIP; @@ -836,10 +833,10 @@ if(!b){ return "司机姓名和身份证号不匹配"; } Object o = tDriverService.addOrUpdate(tDriver); if(Objects.nonNull(o)){ return o; } // Object o = tDriverService.addOrUpdate(tDriver); // if(Objects.nonNull(o)){ // return o; // } tDriver.setName(tDriver.getName().replace(" ","")); tDriver.setEmergencyContact(tDriver.getEmergencyContact().replace(" ","")); tDriverService.updateById(tDriver); management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/DeptController.java
@@ -59,7 +59,6 @@ /** * 跳转到修改部门 */ @Permission @RequestMapping("/dept_update/{deptId}") public String deptUpdate(@PathVariable Integer deptId, Model model) { Dept dept = deptService.selectById(deptId); @@ -85,7 +84,6 @@ */ @BussinessLog(value = "添加部门", key = "simplename", dict = DeptDict.class) @RequestMapping(value = "/add") @Permission @ResponseBody public Object add(Dept dept) { if (ToolUtil.isOneEmpty(dept, dept.getSimplename())) { @@ -102,7 +100,6 @@ * 获取所有部门列表 */ @RequestMapping(value = "/list") @Permission @ResponseBody public Object list(String condition) { List<Map<String, Object>> list = this.deptService.list(condition); @@ -113,7 +110,6 @@ * 部门详情 */ @RequestMapping(value = "/detail/{deptId}") @Permission @ResponseBody public Object detail(@PathVariable("deptId") Integer deptId) { return deptService.selectById(deptId); @@ -124,7 +120,6 @@ */ @BussinessLog(value = "修改部门", key = "simplename", dict = DeptDict.class) @RequestMapping(value = "/update") @Permission @ResponseBody public Object update(Dept dept) { if (ToolUtil.isEmpty(dept) || dept.getId() == null) { @@ -141,7 +136,6 @@ */ @BussinessLog(value = "删除部门", key = "deptId", dict = DeptDict.class) @RequestMapping(value = "/delete") @Permission @ResponseBody public Object delete(@RequestParam Integer deptId) { management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/DictController.java
@@ -123,7 +123,6 @@ */ @BussinessLog(value = "删除字典记录", key = "dictId", dict = DictMap.class) @RequestMapping(value = "/delete") @Permission(Const.ADMIN_NAME) @ResponseBody public Object delete(@RequestParam Integer dictId) { management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/RoleController.java
@@ -71,7 +71,6 @@ /** * 跳转到修改角色 */ @Permission @RequestMapping(value = "/role_edit/{roleId}") public String roleEdit(@PathVariable Integer roleId, Model model) { if (ToolUtil.isEmpty(roleId)) { @@ -88,7 +87,6 @@ /** * 跳转到角色分配 */ @Permission @RequestMapping(value = "/role_assign/{roleId}") public String roleAssign(@PathVariable("roleId") Integer roleId, Model model) { if (ToolUtil.isEmpty(roleId)) { @@ -102,7 +100,6 @@ /** * 获取角色列表 */ @Permission @RequestMapping(value = "/list") @ResponseBody public Object list(@RequestParam(required = false) String roleName, management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/UserMgrController.java
@@ -107,7 +107,6 @@ * 跳转到角色分配页面 */ //@RequiresPermissions("/mgr/role_assign") //利用shiro自带的权限检查 @Permission @RequestMapping("/role_assign/{userId}") public String roleAssign(@PathVariable Integer userId, Model model) { if (ToolUtil.isEmpty(userId)) { @@ -122,7 +121,6 @@ /** * 跳转到编辑管理员页面 */ @Permission @RequestMapping("/user_edit/{userId}") public String userEdit(@PathVariable Integer userId, Model model) { if (ToolUtil.isEmpty(userId)) { @@ -189,7 +187,6 @@ * 查询管理员列表 */ @RequestMapping("/list") @Permission @ResponseBody public Object list(@RequestParam(required = false) String name, @RequestParam(required = false) String createTime, @RequestParam(required = false) Integer deptid) { //创建日期 @@ -376,7 +373,6 @@ */ @RequestMapping("/delete") @BussinessLog(value = "删除管理员", key = "userId", dict = UserDict.class) @Permission @ResponseBody public Tip delete(@RequestParam Integer userId) { if (ToolUtil.isEmpty(userId)) { management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TBranchOffice.java
@@ -96,6 +96,10 @@ * 中台新增标识(0=否,1=是) */ private Integer enterNew; /** * 管理员id */ private Integer sysUserId; /** * 开户银行 @@ -320,6 +324,14 @@ this.enterNew = enterNew; } public Integer getSysUserId() { return sysUserId; } public void setSysUserId(Integer sysUserId) { this.sysUserId = sysUserId; } @Override protected Serializable pkVal() { return this.id; management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderServiceImpl.java
@@ -194,7 +194,7 @@ tSystemConfig.setBranchOfficeId(tDriver.getBranchOfficeId()); TSystemConfig tSystemConfig2 = systemConfigMapper.selectOne(tSystemConfig); if(Objects.nonNull(tSystemConfig1)){ if(Objects.nonNull(tSystemConfig2)){ JSONObject jsonObject2 = JSONObject.parseObject(tSystemConfig2.getContent()); Integer num24 = jsonObject2.getInteger("num4"); management/guns-admin/src/main/resources/application-dev.yml
@@ -1,5 +1,10 @@ server: port: 8010 port: 8011 servlet: path: /djadmin session: cookie: name: DAIJIASID guns: swagger-open: false #是否开启swagger (true/false) @@ -29,14 +34,15 @@ multipart: max-request-size: 100MB max-file-size: 100MB session: redis: 1: spring:daijia:session store-type: redis redis: host: 127.0.0.1 port: 6379 password: 123456 session: redis: namespace: spring:daijia:session store-type: redis timeout: 7200 mybatis-plus: type-aliases-package: com.stylefeng.guns.modular.system.model global-config: management/guns-admin/src/main/resources/application-prod.yml
@@ -1,5 +1,12 @@ server: port: 7070 servlet: path: /djadmin session: cookie: name: DAIJIASID tomcat: basedir: /etraffic/server/daijia/tomcat guns: swagger-open: false #是否开启swagger (true/false) @@ -29,6 +36,11 @@ multipart: max-request-size: 100MB max-file-size: 100MB session: redis: namespace: spring:daijia:session store-type: redis timeout: 7200 redis: host: 10.31.1.219 port: 6410 management/guns-admin/src/main/resources/application-test.yml
@@ -1,5 +1,12 @@ server: port: 8010 servlet: path: /djadmin session: cookie: name: DAIJIASID tomcat: basedir: /etraffic/server/daijia/tomcat guns: swagger-open: false #是否开启swagger (true/false) @@ -32,6 +39,8 @@ session: redis: namespace: spring:daijia:session store-type: redis timeout: 7200 redis: host: 10.88.154.24 port: 7560 @@ -82,6 +91,7 @@ qyt: socket_uri: http://10.88.188.138:6000 daijia_url: http://127.0.0.1:3000/daijia --- management/guns-admin/src/main/webapp/WEB-INF/view/common/_container.html
@@ -82,7 +82,7 @@ </style>--> <script type="text/javascript"> Feng.addCtx("${ctxPath}"); Feng.addCtx("${ctxPath}/djadmin"); Feng.sessionTimeoutRegistry(); //验证电话号码 var phoneReg = /^1(3|4|5|7|8|9)\d{9}$/; management/guns-admin/src/main/webapp/WEB-INF/view/common/_right.html
@@ -23,7 +23,7 @@ </button> <nav class="page-tabs J_menuTabs"> <div class="page-tabs-content"> <a href="javascript:;" class="active J_menuTab" data-id="${ctxPath}/blackboard">首页</a> <a href="javascript:;" class="active J_menuTab" data-id="${ctxPath}/djadmin/blackboard">首页</a> </div> </nav> <!--<nav class="page-tabs J_menuTabs"> @@ -50,7 +50,7 @@ <a href="logout" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a> </div> <div class="row J_mainContent" id="content-main"> <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="${ctxPath}/blackboard?type=${type}" frameborder="0" data-id="${ctxPath}/blackboard" seamless></iframe> <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="${ctxPath}/djadmin/blackboard?type=${type}" frameborder="0" data-id="${ctxPath}/djadmin/blackboard" seamless></iframe> </div> <div class="footer"> <div class="pull-right">© 2023 <a href="#" onclick="return false" target="_blank">黔云通代驾</a> management/guns-admin/src/main/webapp/WEB-INF/view/common/_tab.html
@@ -22,7 +22,7 @@ <li><a class="J_menuItem" href="${ctxPath}/mgr/user_info">个人资料</a></li> <li><a class="J_menuItem" href="${ctxPath}/mgr/user_chpwd">修改密码</a></li> <li class="divider"></li> <li><a href="${ctxPath}/logout">安全退出</a> <li><a href="${ctxPath}/djadmin/logout">安全退出</a> </li> </ul> </div> @@ -33,7 +33,7 @@ @for(title in titles){ @if(tool.isEmpty(title.children)){ <li> <a class="J_menuItem" href="${ctxPath}${title.url}" name="tabMenuItem"> <a class="J_menuItem" href="${ctxPath}/djadmin${title.url}" name="tabMenuItem"> <i class="fa ${title.icon}"></i> <span class="nav-label">${title.name}</span> </a> @@ -49,7 +49,7 @@ @for(subTitle in title.children){ @if(tool.isEmpty(subTitle.children)){ <li> <a class="J_menuItem" href="${ctxPath}${subTitle.url}" name="tabMenuItem">${subTitle.name}</a> <a class="J_menuItem" href="${ctxPath}/djadmin${subTitle.url}" name="tabMenuItem">${subTitle.name}</a> </li> @}else{ <li> @@ -57,7 +57,7 @@ <ul class="nav nav-third-level"> @for(thirdTitle in subTitle.children){ <li> <a class="J_menuItem" href="${ctxPath}${thirdTitle.url}" name="tabMenuItem">${thirdTitle.name}</a> <a class="J_menuItem" href="${ctxPath}/djadmin${thirdTitle.url}" name="tabMenuItem">${thirdTitle.name}</a> </li> @} </ul> management/guns-admin/src/main/webapp/WEB-INF/view/index.html
@@ -5,10 +5,10 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="renderer" content="webkit"> <title>黔云通代驾 - 主页</title> <link rel="shortcut icon" href="${ctxPath}/djadmin/djadmin/static/favicon1.ico"> <link href="${ctxPath}/djadmin/djadmin/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet"> <link href="${ctxPath}/djadmin/djadmin/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet"> <link href="${ctxPath}/djadmin/djadmin/static/css/style.css?v=4.1.0" rel="stylesheet"> <link rel="shortcut icon" href="${ctxPath}/djadmin/static/favicon1.ico"> <link href="${ctxPath}/djadmin/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet"> <link href="${ctxPath}/djadmin/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet"> <link href="${ctxPath}/djadmin/static/css/style.css?v=4.1.0" rel="stylesheet"> </head> <body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden"> @@ -29,9 +29,9 @@ </div> <!-- 全局js --> <script src="${ctxPath}/djadmin/djadmin/static/js/jquery.min.js?v=2.1.4"></script> <script src="${ctxPath}/djadmin/djadmin/static/js/bootstrap.min.js?v=3.3.6"></script> <script src="${ctxPath}/djadmin/djadmin/static/js/plugins/metisMenu/jquery.metisMenu.js"></script> <script src="${ctxPath}/djadmin/static/js/jquery.min.js?v=2.1.4"></script> <script src="${ctxPath}/djadmin/static/js/bootstrap.min.js?v=3.3.6"></script> <script src="${ctxPath}/djadmin/static/js/plugins/metisMenu/jquery.metisMenu.js"></script> <script src="${ctxPath}/djadmin/static/js/plugins/slimscroll/jquery.slimscroll.min.js"></script> <script src="${ctxPath}/djadmin/static/js/plugins/layer/layer.js"></script> management/guns-admin/src/main/webapp/WEB-INF/view/login.html
@@ -61,7 +61,7 @@ <h3 style="color: black;"><img src="${ctxPath}/djadmin/static/img/logo.png" width="30px" height="30px"/> 黔云通代驾管理后台</h3> <br/> <h4 style="color: red;">${tips!}</h4> <form class="m-t" role="form" action="${ctxPath}/login" method="post"> <form class="m-t" role="form" action="${ctxPath}/djadmin/login" method="post"> <div class="item"> <img src="${ctxPath}/djadmin/static/img/account.png" /> <input class="itemInput" type="text" name="username" id="username" placeholder="请输入您的账号" required="" value=""> @@ -77,7 +77,7 @@ <input class="form-control" type="text" name="kaptcha" id="verifyNumber" placeholder="验证码" required> </div> <div class="col-sm-4" style="padding-left: 0px; padding-right: 0px;"> <img src="${ctxPath}/kaptcha" id="kaptcha" width="100%" height="100%"/> <img src="${ctxPath}/djadmin/kaptcha" id="kaptcha" width="100%" height="100%"/> </div> </div> @} @@ -112,7 +112,7 @@ $("#verify").show() $("#kaptcha").on('click', function () { $("#kaptcha").attr('src', '${ctxPath}/kaptcha?' + Math.floor(Math.random() * 100)).fadeIn(); $("#kaptcha").attr('src', '${ctxPath}/djadmin/kaptcha?' + Math.floor(Math.random() * 100)).fadeIn(); }); }); var key = CryptoJS.enc.Utf8.parse("xqT86jictTPpHMem");