Prechádzať zdrojové kódy

feat:新建租户区分行业,解决租户新增租户的账号不能登录问题,租户信息不限制是否激活,登录信息返回租户所属行业信息

hmc 1 rok pred
rodič
commit
7c5acb9081

+ 3 - 0
zkqy-admin/src/main/java/com/zkqy/ZkqyServletInitializer.java

@@ -2,6 +2,7 @@ package com.zkqy;
 
 import org.springframework.boot.builder.SpringApplicationBuilder;
 import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+import org.springframework.core.io.Resource;
 
 /**
  * web容器中进行部署
@@ -15,4 +16,6 @@ public class ZkqyServletInitializer extends SpringBootServletInitializer
     {
         return application.sources(ZkqyApplication.class);
     }
+
+
 }

+ 1 - 1
zkqy-admin/src/main/java/com/zkqy/web/controller/homepagestatistics/StatisticsController.java

@@ -48,7 +48,7 @@ public class StatisticsController {
     @GetMapping("/getLoginInformationStatistics")
     public AjaxResult getLoginInformationStatistics(){
         SysLogininfor sysLogininfor=new SysLogininfor();
-        sysLogininfor.setTenantId( SecurityUtils.getLoginUser().getTenantId());
+        sysLogininfor.setTenantId(SecurityUtils.getLoginUser().getTenantId());
         sysLogininfor.setWhichApplication("1");
         List<Map> loginInformationStatistics = logininforService.getLoginInformationStatistics(sysLogininfor);
 

+ 14 - 9
zkqy-admin/src/main/java/com/zkqy/web/controller/system/SysLoginController.java

@@ -7,9 +7,7 @@ import com.zkqy.common.core.domain.entity.DataSource;
 import com.zkqy.common.core.domain.entity.SysTenant;
 import com.zkqy.common.utils.StringUtils;
 import com.zkqy.framework.web.service.TokenService;
-import com.zkqy.system.service.IDataSourceService;
-import com.zkqy.system.service.ILoginPageConfigurationService;
-import com.zkqy.system.service.ISysTenantService;
+import com.zkqy.system.service.*;
 import com.zkqy.system.service.impl.SysTenantServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -23,7 +21,6 @@ import com.zkqy.common.core.domain.model.LoginBody;
 import com.zkqy.common.utils.SecurityUtils;
 import com.zkqy.framework.web.service.SysLoginService;
 import com.zkqy.framework.web.service.SysPermissionService;
-import com.zkqy.system.service.ISysMenuService;
 import org.springframework.web.client.RestTemplate;
 
 import javax.annotation.Resource;
@@ -43,6 +40,9 @@ public class SysLoginController {
     @Autowired
     private ISysMenuService menuService;
 
+    @Autowired
+    private ISysDictDataService dictDataService;
+
     @Autowired
     private SysPermissionService permissionService;
 
@@ -102,10 +102,10 @@ public class SysLoginController {
 //            return AjaxResult.error("用户不存在!");
 //        }
         // 校验租户是否过期
-        String checkTenantExpirationTimeMsg = loginService.checkTenantExpirationTime(loginBody);
-        if (!checkTenantExpirationTimeMsg.isEmpty()) {
-            return AjaxResult.error(checkTenantExpirationTimeMsg);
-        }
+//        String checkTenantExpirationTimeMsg = loginService.checkTenantExpirationTime(loginBody);
+//        if (!checkTenantExpirationTimeMsg.isEmpty()) {
+//            return AjaxResult.error(checkTenantExpirationTimeMsg);
+//        }
         ajax.put(Constants.TOKEN, token);
         return ajax;
     }
@@ -141,7 +141,7 @@ public class SysLoginController {
     /**
      * 登录方法
      *
-     * @param tenantCode 登录信息
+     * @param loginInfo 登录信息
      * @return 结果
      */
     @GetMapping("/Oauth2Login/{loginInfo}")
@@ -212,6 +212,11 @@ public class SysLoginController {
         if (user.getTenantId() != null) {
             //租户信息
             SysTenant sysTenant = sysTenantService.selectSysTenantByTenantId(user.getTenantId());
+            //通过字典查询当前字典对应的租户类型
+            if(sysTenant.getTenantProfession()!=null){
+                String tenantProfession = dictDataService.selectDictLabel("tenant_profession", sysTenant.getTenantProfession());
+                sysTenant.setTenantProfession(tenantProfession);
+            }
             ajax.put("tenant", sysTenant);
             //数据源信息
             DataSource dataSource = dataSourceService.selectById(sysTenant.getDatasourceId());

+ 7 - 3
zkqy-admin/src/main/java/com/zkqy/web/controller/system/SysUserController.java

@@ -151,10 +151,14 @@ public class SysUserController extends BaseController {
         }
         user.setCreateBy(getUsername());
         user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
-        if (getTenantId() != null) {
-            user.setTenantId(getTenantId());
+        //二级租户新建租户用户的时候用,自己选择的租户 否则会出现A租户创建b租户,b租户创建的同时创建b用户,但是这个b用户指向的租户是A
+        if(StringUtils.isNotBlank(user.getTenantId().toString())){
+            user.setTenantId(user.getTenantId());
+        }else {
+           if(getTenantId()!=null){
+               user.setTenantId(getTenantId());
+           }
         }
-
         return toAjax(userService.insertUser(user));
     }
 

+ 1552 - 0
zkqy-admin/src/main/resources/initialize_sys_tenant_menu1.json

@@ -0,0 +1,1552 @@
+[
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1,
+        "menuName": "系统管理",
+        "parentName": null,
+        "parentId": 0,
+        "orderNum": 1,
+        "path": "system",
+        "component": null,
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "M",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "system",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 9080,
+        "menuName": "租户信息",
+        "parentName": null,
+        "parentId": 9764,
+        "orderNum": 8,
+        "path": "tenant_info",
+        "component": "system/tenant/tenantIndex",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "logininfor",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 100,
+        "menuName": "用户管理",
+        "parentName": null,
+        "parentId": 1,
+        "orderNum": 1,
+        "path": "user",
+        "component": "system/user/index",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:list",
+        "icon": "user",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 101,
+        "menuName": "角色管理",
+        "parentName": null,
+        "parentId": 1,
+        "orderNum": 2,
+        "path": "role",
+        "component": "system/role/index",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:role:list",
+        "icon": "peoples",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 102,
+        "menuName": "菜单管理",
+        "parentName": null,
+        "parentId": 1,
+        "orderNum": 3,
+        "path": "menu",
+        "component": "system/menu/index",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:menu:list",
+        "icon": "tree-table",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 103,
+        "menuName": "部门管理",
+        "parentName": null,
+        "parentId": 1,
+        "orderNum": 4,
+        "path": "dept",
+        "component": "system/dept/index",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:dept:list",
+        "icon": "tree",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 104,
+        "menuName": "岗位管理",
+        "parentName": null,
+        "parentId": 1,
+        "orderNum": 5,
+        "path": "post",
+        "component": "system/post/index",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:post:list",
+        "icon": "post",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1000,
+        "menuName": "用户查询",
+        "parentName": null,
+        "parentId": 100,
+        "orderNum": 1,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:query",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1001,
+        "menuName": "用户新增",
+        "parentName": null,
+        "parentId": 100,
+        "orderNum": 2,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:add",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1002,
+        "menuName": "用户修改",
+        "parentName": null,
+        "parentId": 100,
+        "orderNum": 3,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:edit",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1003,
+        "menuName": "用户删除",
+        "parentName": null,
+        "parentId": 100,
+        "orderNum": 4,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:remove",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1004,
+        "menuName": "用户导出",
+        "parentName": null,
+        "parentId": 100,
+        "orderNum": 5,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:export",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1005,
+        "menuName": "用户导入",
+        "parentName": null,
+        "parentId": 100,
+        "orderNum": 6,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:import",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1006,
+        "menuName": "重置密码",
+        "parentName": null,
+        "parentId": 100,
+        "orderNum": 7,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:resetPwd",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1007,
+        "menuName": "角色查询",
+        "parentName": null,
+        "parentId": 101,
+        "orderNum": 1,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:role:query",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1008,
+        "menuName": "角色新增",
+        "parentName": null,
+        "parentId": 101,
+        "orderNum": 2,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:role:add",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1009,
+        "menuName": "角色修改",
+        "parentName": null,
+        "parentId": 101,
+        "orderNum": 3,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:role:edit",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1010,
+        "menuName": "角色删除",
+        "parentName": null,
+        "parentId": 101,
+        "orderNum": 4,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:role:remove",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1011,
+        "menuName": "角色导出",
+        "parentName": null,
+        "parentId": 101,
+        "orderNum": 5,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:role:export",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1016,
+        "menuName": "部门查询",
+        "parentName": null,
+        "parentId": 103,
+        "orderNum": 1,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:dept:query",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1017,
+        "menuName": "部门新增",
+        "parentName": null,
+        "parentId": 103,
+        "orderNum": 2,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:dept:add",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1018,
+        "menuName": "部门修改",
+        "parentName": null,
+        "parentId": 103,
+        "orderNum": 3,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:dept:edit",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1019,
+        "menuName": "部门删除",
+        "parentName": null,
+        "parentId": 103,
+        "orderNum": 4,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:dept:remove",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1020,
+        "menuName": "岗位查询",
+        "parentName": null,
+        "parentId": 104,
+        "orderNum": 1,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:post:query",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1021,
+        "menuName": "岗位新增",
+        "parentName": null,
+        "parentId": 104,
+        "orderNum": 2,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:post:add",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1022,
+        "menuName": "岗位修改",
+        "parentName": null,
+        "parentId": 104,
+        "orderNum": 3,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:post:edit",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1023,
+        "menuName": "岗位删除",
+        "parentName": null,
+        "parentId": 104,
+        "orderNum": 4,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:post:remove",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 08:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1024,
+        "menuName": "岗位导出",
+        "parentName": null,
+        "parentId": 104,
+        "orderNum": 5,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:post:export",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-06-16 06:31:40",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1073,
+        "menuName": "数据引擎",
+        "parentName": null,
+        "parentId": 0,
+        "orderNum": 3,
+        "path": "data",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "M",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "drag",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-06-16 06:58:41",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1078,
+        "menuName": "数据表",
+        "parentName": null,
+        "parentId": 1073,
+        "orderNum": 1,
+        "path": "createTable",
+        "component": "tool/datasheet/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "1",
+        "status": "0",
+        "perms": "",
+        "icon": "documentation",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-06-19 05:39:54",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1082,
+        "menuName": "流程引擎",
+        "parentName": null,
+        "parentId": 0,
+        "orderNum": 4,
+        "path": "processModeling",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "M",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "cascader",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-06-19 05:40:44",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1083,
+        "menuName": "流程建模",
+        "parentName": null,
+        "parentId": 1082,
+        "orderNum": 2,
+        "path": "bpmnPro",
+        "component": "system/bpmnPro/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "1",
+        "status": "0",
+        "perms": "",
+        "icon": "component",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-06-19 07:35:07",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1084,
+        "menuName": "数据建模",
+        "parentName": null,
+        "parentId": 1073,
+        "orderNum": 2,
+        "path": "datamodeling",
+        "component": "dataEngine/datamodeling/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "form",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-07 06:04:16",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1103,
+        "menuName": "表单引擎",
+        "parentName": null,
+        "parentId": 0,
+        "orderNum": 5,
+        "path": "system/fromModel/index",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "M",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "form",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-07 06:05:32",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1104,
+        "menuName": "表单建模",
+        "parentName": null,
+        "parentId": 1103,
+        "orderNum": 1,
+        "path": "formBuild",
+        "component": "system/fromModel/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "1",
+        "status": "0",
+        "perms": "system:fromModeling:index",
+        "icon": "druid",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-12 01:46:30",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1106,
+        "menuName": "表单列表",
+        "parentName": null,
+        "parentId": 1103,
+        "orderNum": 2,
+        "path": "dragform",
+        "component": "dragform/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "clipboard",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-17 02:28:35",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1107,
+        "menuName": "表格列表",
+        "parentName": null,
+        "parentId": 1103,
+        "orderNum": 3,
+        "path": "tablelist",
+        "component": "dragform/tableList",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "education",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-08-08 09:38:07",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1109,
+        "menuName": "字典管理",
+        "parentName": null,
+        "parentId": 1,
+        "orderNum": 6,
+        "path": "tenantDict",
+        "component": "system/tenant/dict/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:tenantDict:list",
+        "icon": "dict",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-09-11 09:26:08",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1172,
+        "menuName": "表格编辑",
+        "parentName": null,
+        "parentId": 1103,
+        "orderNum": 1,
+        "path": "tableMange",
+        "component": "tableMange/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "1",
+        "status": "0",
+        "perms": "",
+        "icon": "bug",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-10-11 01:28:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 2811,
+        "menuName": "流程设计",
+        "parentName": null,
+        "parentId": 1082,
+        "orderNum": 1,
+        "path": "process",
+        "component": "bpmprocess/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "job",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-10-11 01:28:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 3811,
+        "menuName": "联动表格",
+        "parentName": null,
+        "parentId": 1103,
+        "orderNum": 5,
+        "path": "relateTable",
+        "component": "relateTable/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "bpmn-icon-call-activity",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-10-11 01:28:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 3806,
+        "menuName": "动态表格",
+        "parentName": null,
+        "parentId": 1103,
+        "orderNum": 6,
+        "path": "relateTableEdit",
+        "component": "relateTable/relateTableEdit",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "1",
+        "status": "0",
+        "perms": "",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-10-11 01:28:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 3989,
+        "menuName": "操作按钮",
+        "parentName": null,
+        "parentId": 1103,
+        "orderNum": 1,
+        "path": "excuteBtnMange/index",
+        "component": "system/excuteBtnMange/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "button",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-10-11 01:28:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 5877,
+        "menuName": "表单组管理",
+        "parentName": null,
+        "parentId": 1103,
+        "orderNum": 7,
+        "path": "formGroupMange",
+        "component": "system/formGroupMange/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "build",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-10-11 01:28:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 4216,
+        "menuName": "生产管理",
+        "parentName": null,
+        "parentId": 0,
+        "orderNum": 2,
+        "path": "processMange",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "M",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "bpmn-icon-end-event-error",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-10-11 01:28:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 6199,
+        "menuName": "待办审批",
+        "parentName": null,
+        "parentId": 0,
+        "orderNum": 3,
+        "path": "OAMange",
+        "component": "bussiness/OAMange",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "bpmn-icon-end-event-link",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-10-11 01:28:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 4218,
+        "menuName": "生产任务",
+        "parentName": null,
+        "parentId": 4216,
+        "orderNum": 1,
+        "path": "asd",
+        "component": "bussiness/processMange",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "bpmn-icon-intermediate-event-throw-link",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-10-11 01:28:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 4219,
+        "menuName": "流程展示",
+        "parentName": null,
+        "parentId": 4216,
+        "orderNum": 2,
+        "path": "progressShow",
+        "component": "bussiness/progressShow",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "bpmn-icon-end-event-signal",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-08-08 09:38:07",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 5008,
+        "menuName": "工程部署",
+        "parentName": null,
+        "parentId": 9764,
+        "orderNum": 7,
+        "path": "engineering",
+        "component": "system/engineeringManage/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:engineering",
+        "icon": "download",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-06 05:28:04",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1092,
+        "menuName": "日志管理",
+        "parentName": null,
+        "parentId": 0,
+        "orderNum": 6,
+        "path": "log",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "M",
+        "visible": "0",
+        "status": "0",
+        "perms": null,
+        "icon": "log",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-06 05:29:50",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1093,
+        "menuName": "操作日志",
+        "parentName": null,
+        "parentId": 1092,
+        "orderNum": 1,
+        "path": "operlog",
+        "component": "monitor/operlog/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "monitor:operlog:list",
+        "icon": "form",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-06 05:32:45",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1095,
+        "menuName": "操作查询",
+        "parentName": null,
+        "parentId": 1093,
+        "orderNum": 1,
+        "path": "",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "monitor:operlog:query",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-06 05:34:04",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1096,
+        "menuName": "操作删除",
+        "parentName": null,
+        "parentId": 1093,
+        "orderNum": 2,
+        "path": "",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "monitor:operlog:remove",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-06 05:34:27",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1097,
+        "menuName": "日志导出",
+        "parentName": null,
+        "parentId": 1093,
+        "orderNum": 3,
+        "path": "",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "monitor:operlog:export",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-06 05:31:06",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1094,
+        "menuName": "登录日志",
+        "parentName": null,
+        "parentId": 1092,
+        "orderNum": 2,
+        "path": "logininfor",
+        "component": "monitor/logininfor/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "monitor:logininfor:list",
+        "icon": "logininfor",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-06 05:34:57",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1098,
+        "menuName": "登录查询",
+        "parentName": null,
+        "parentId": 1094,
+        "orderNum": 1,
+        "path": "",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "monitor:logininfor:query",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-06 05:36:58",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1099,
+        "menuName": "登录删除",
+        "parentName": null,
+        "parentId": 1094,
+        "orderNum": 2,
+        "path": "",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "monitor:logininfor:remove",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-06 05:37:21",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1100,
+        "menuName": "日志导出",
+        "parentName": null,
+        "parentId": 1094,
+        "orderNum": 3,
+        "path": "",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "monitor:logininfor:export",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-06 05:37:44",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1101,
+        "menuName": "账户解锁",
+        "parentName": null,
+        "parentId": 1094,
+        "orderNum": 4,
+        "path": "",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "monitor:logininfor:unlock",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-07 06:04:16",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 9574,
+        "menuName": "移动端引擎",
+        "parentName": null,
+        "parentId": 0,
+        "orderNum": 6,
+        "path": "ydyq",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "M",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "bpmn-icon-call-activity",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-10-11 01:28:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 9573,
+        "menuName": "页面设计",
+        "parentName": null,
+        "parentId": 9574,
+        "orderNum": 1,
+        "path": "h5Editor",
+        "component": "asEditor/layout/home/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "bpmn-icon-intermediate-event-catch-cancel",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-07 06:04:16",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 9764,
+        "menuName": "后台管理",
+        "parentName": null,
+        "parentId": 0,
+        "orderNum": 8,
+        "path": "htgl",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "M",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "monitor",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    }
+]

+ 13 - 0
zkqy-common/src/main/java/com/zkqy/common/core/domain/entity/SysTenant.java

@@ -87,6 +87,19 @@ public class SysTenant extends BaseEntity {
 
     private Object loginPageConfiguration;
 
+    /**
+     * 租户行业
+     */
+    private  String tenantProfession;
+
+    public String getTenantProfession() {
+        return tenantProfession;
+    }
+
+    public void setTenantProfession(String tenantProfession) {
+        this.tenantProfession = tenantProfession;
+    }
+
     public String getTenantParentId() {
         return tenantParentId;
     }

+ 2 - 4
zkqy-framework/src/main/java/com/zkqy/framework/web/service/SysLoginService.java

@@ -126,10 +126,8 @@ public class SysLoginService {
     /**
      * 登录验证
      *
-     * @param username 用户名
-     * @param password 密码
-     * @param code     验证码
-     * @param uuid     唯一标识
+     * @param tenantCode code
+     * @param userName 用户名
      * @return 结果
      */
     public String loginOauth(String tenantCode, String userName) {

+ 1 - 2
zkqy-system/src/main/java/com/zkqy/system/service/impl/DataSourceServiceImpl.java

@@ -36,7 +36,6 @@ public class DataSourceServiceImpl implements IDataSourceService {
 
     @Override
     public AjaxResult insertDataSource(DataSource dataSource,Long tenantId) {
-
         //调用数据引擎服务初始化数据库接口
         ResponseEntity<AjaxResult> dataSourceResponseEntity = restTemplate.postForEntity(DATA_ENGINE_INITDATABASE_IP, dataSource, AjaxResult.class);
         //获取请求状态码
@@ -47,7 +46,7 @@ public class DataSourceServiceImpl implements IDataSourceService {
         }
 
         dataSourceMapper.insertDataSource(dataSource);
-        //租户绑定数据源
+        //租户绑定数据源--更新租户对应的数据源信息
         SysTenant sysTenant = new SysTenant();
         sysTenant.setTenantId(tenantId);
         sysTenant.setDatasourceId(dataSource.getId());

+ 1 - 1
zkqy-system/src/main/java/com/zkqy/system/service/impl/SysLogininforServiceImpl.java

@@ -73,6 +73,6 @@ public class SysLogininforServiceImpl implements ISysLogininforService {
 
     @Override
     public List<Map> getLoginInformationStatistics(SysLogininfor sysLogininfor) {
-        return logininforMapper.getLoginInformationStatistics( sysLogininfor.getTenantId().toString(),sysLogininfor.getWhichApplication());
+        return logininforMapper.getLoginInformationStatistics(sysLogininfor.getTenantId().toString(),sysLogininfor.getWhichApplication());
     }
 }

+ 6 - 0
zkqy-system/src/main/java/com/zkqy/system/service/impl/SysTenantServiceImpl.java

@@ -14,9 +14,11 @@ import cn.hutool.core.util.CharsetUtil;
 import cn.hutool.crypto.symmetric.SymmetricAlgorithm;
 import cn.hutool.crypto.symmetric.SymmetricCrypto;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.module.SimpleModule;
 import com.zkqy.common.core.domain.AjaxResult;
 import com.zkqy.common.core.domain.entity.SysMenu;
 import com.zkqy.common.core.domain.entity.SysUser;
+import com.zkqy.common.utils.CustomDateDeserializer;
 import com.zkqy.common.utils.DateUtils;
 import com.zkqy.common.utils.SecurityUtils;
 import com.zkqy.common.utils.StringUtils;
@@ -193,6 +195,10 @@ public class SysTenantServiceImpl implements ISysTenantService {
     public AjaxResult initTenantMenuData(Long tenantId) {
         List<SysMenu> list = new ArrayList<>();
         ObjectMapper objectMapper = new ObjectMapper();
+        //创建模块并注册自定义的日期反序列化器
+//        SimpleModule module = new SimpleModule();
+//        module.addDeserializer(Date.class, new CustomDateDeserializer());
+//        objectMapper.registerModule(module);
         try {
             Resource resource = resourceLoader.getResource("classpath:sql/initialize_sys_tenant_menu.json");
             //获取租户默认菜单信息

+ 46 - 42
zkqy-system/src/main/resources/mapper/system/SysLogininforMapper.xml

@@ -50,95 +50,99 @@
 
 	<select id="getLoginInformationStatistics" resultType="map">
 		SELECT
-			d.date AS login_date,
+			d.calendar_date AS login_date,
 			COUNT( l.info_id ) AS daily_login_count
 		FROM
 			(
 				SELECT
-					CURDATE() - INTERVAL seq DAY AS date
+					CURDATE() - INTERVAL seq DAY AS calendar_date
 				FROM
 					(
 					SELECT
-					@ROW := @ROW + 1 AS seq
+					a.i + b.i * 10 + c.i * 100 AS seq
 					FROM
 					(
 					SELECT
-					0 UNION ALL
+					0 i UNION
 					SELECT
-					1 UNION ALL
+					1 UNION
 					SELECT
-					3 UNION ALL
+					2 UNION
 					SELECT
-					4 UNION ALL
+					3 UNION
 					SELECT
-					5 UNION ALL
+					4 UNION
 					SELECT
-					6 UNION ALL
+					5 UNION
 					SELECT
-					6 UNION ALL
+					6 UNION
 					SELECT
-					7 UNION ALL
+					7 UNION
 					SELECT
-					8 UNION ALL
+					8 UNION
 					SELECT
 					9
-					) t1,
+					) a,
 					(
 					SELECT
-					0 UNION ALL
+					0 i UNION
 					SELECT
-					1 UNION ALL
+					1 UNION
 					SELECT
-					3 UNION ALL
+					2 UNION
 					SELECT
-					4 UNION ALL
+					3 UNION
 					SELECT
-					5 UNION ALL
+					4 UNION
 					SELECT
-					6 UNION ALL
+					5 UNION
 					SELECT
-					6 UNION ALL
+					6 UNION
 					SELECT
-					7 UNION ALL
+					7 UNION
 					SELECT
-					8 UNION ALL
+					8 UNION
 					SELECT
 					9
-					) t2,
+					) b,
 					(
 					SELECT
-					0 UNION ALL
+					0 i UNION
 					SELECT
-					1 UNION ALL
+					1 UNION
 					SELECT
-					3 UNION ALL
+					2 UNION
 					SELECT
-					4 UNION ALL
+					3 UNION
 					SELECT
-					5 UNION ALL
+					4 UNION
 					SELECT
-					6 UNION ALL
+					5 UNION
 					SELECT
-					6 UNION ALL
+					6 UNION
 					SELECT
-					7 UNION ALL
+					7 UNION
 					SELECT
-					8 UNION ALL
+					8 UNION
 					SELECT
 					9
-					) t3,
-					( SELECT @ROW := 0 ) r
-					) v
+					) c
+					ORDER BY
+					seq
+					) numbers
 				WHERE
-           <![CDATA[seq <= 30 ]]>
-        ) d
-				LEFT JOIN sys_logininfor l ON DATE( l.login_time ) = d.date
-			AND l.tenant_id =#{tenantId}
-			AND l.which_application =#{whichApplication}
+					seq BETWEEN 0
+				  AND DATEDIFF(
+					CURDATE(),
+					DATE_SUB( CURDATE(), INTERVAL 30 DAY ))
+			) d
+				LEFT JOIN sys_logininfor l ON DATE( l.login_time ) = d.calendar_date
+			AND l.tenant_id = #{tenantId}
+			AND l.which_application = #{whichApplication}
 		GROUP BY
-			d.date
+			d.calendar_date
 		ORDER BY
-			d.date;
+			d.calendar_date
 	</select>
 
 	<delete id="deleteLogininforByIds" parameterType="Long">

+ 6 - 2
zkqy-system/src/main/resources/mapper/system/SysTenantMapper.xml

@@ -20,7 +20,7 @@
         <result property="tenantToolLoginUrl" column="tenant_tool_login_url"/>
         <result property="tenantClientLoginUrl" column="tenant_client_login_url"/>
         <result property="tenantGrade" column="tenant_grade"/>
-
+        <result property="tenantProfession" column="tenant_profession"/>
     </resultMap>
 
     <sql id="selectSysTenantVo">
@@ -38,7 +38,8 @@
                tenant_parent_id,
                tenant_tool_login_url,
                tenant_client_login_url,
-               tenant_grade
+               tenant_grade,
+               tenant_profession
         from sys_tenant
         where is_del = '0'
     </sql>
@@ -95,6 +96,7 @@
             <if test="tenantClientLoginUrl !=null">tenant_client_login_url,</if>
             <if test="tenantToolLoginUrl !=null">tenant_tool_login_url,</if>
             <if test="tenantGrade != null">tenant_grade,</if>
+            <if test="tenantProfession!=null">tenant_profession,</if>
             is_del
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -110,6 +112,7 @@
             <if test="tenantClientLoginUrl !=null">#{tenantClientLoginUrl},</if>
             <if test="tenantToolLoginUrl !=null">#{tenantToolLoginUrl},</if>
             <if test="tenantGrade != null"> #{tenantGrade},</if>
+            <if test="tenantProfession!=null">#{tenantProfession},</if>
             '0'
         </trim>
     </insert>
@@ -130,6 +133,7 @@
             <if test="tenantToolLoginUrl !=null">tenant_tool_login_url = #{tenantToolLoginUrl},</if>
             <if test="tenantClientLoginUrl !=null">tenant_client_login_url = #{tenantClientLoginUrl},</if>
             <if test="tenantGrade != null">tenant_grade = #{tenantGrade},</if>
+            <if test="tenantProfession!=null">tenant_profession=#{tenantProfession}</if>
         </trim>
         where tenant_id = #{tenantId}
     </update>

BIN
zkqy-ui/src/assets/logo/6442720f4fb959b776409c3aa0db6e5.jpg


+ 1 - 1
zkqy-ui/src/views/index.vue

@@ -260,7 +260,7 @@ export default {
       getTabular().then((response) => {
         if (response.code == 200) {
           let tabularList = response.data;
-          tabularList.push({ name: "多表数量", value: 30 });
+          // tabularList.push({ name: "多表数量", value: 30 });
           let labelList = response.data.map((item) => item.name);
           this.chartObj.myChart3.setOption({
             yAxis: {

+ 24 - 1
zkqy-ui/src/views/system/tenant/index.vue

@@ -239,13 +239,24 @@
                 style="width: 250px"
               ></el-cascader>
             </el-form-item>
-
+            <el-form-item label="租户类型" prop="tenantProfession" >
+              <el-select v-model="form.tenantProfession" placeholder="请选择租户类型" style="width: 250px">
+                <el-option
+                  v-for="item in tenantProfessionList"
+                  :key="item.dictValue"
+                  :label="item.dictLabel"
+                  :value="item.dictValue"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
             <el-form-item label="租户名称" prop="tenantName">
               <el-input
                 v-model="form.tenantName"
                 placeholder="请输入租户名称"
               />
             </el-form-item>
+
             <el-form-item label="租户编号" prop="tenantCode">
               <el-input
                 v-model="form.tenantCode"
@@ -253,6 +264,7 @@
               />
             </el-form-item>
           </el-col>
+
           <el-col :span="12">
             <el-form-item label="租户地址" prop="address">
               <el-input v-model="form.address" placeholder="请输入地址" />
@@ -502,6 +514,8 @@ import {
   tenantTree,
 } from "@/api/system/tenant";
 import { getDataSourceInfo, insertDataSource } from "@/api/system/data";
+
+import { getDicts } from "@/api/system/dict/data";
 import {
   addConfiguration,
   updateConfiguration,
@@ -511,6 +525,7 @@ import { getIsExistUser } from "@/api/system/user";
 import ExcelDownLoad from "@/components/ExcelDownLoad/index.vue";
 import { mapState } from "vuex";
 
+
 export default {
   name: "Tenant",
   dicts: [
@@ -526,6 +541,7 @@ export default {
   },
   data() {
     return {
+      tenantProfessionList:[],//租户类型
       tenantTempList: [], //租户列表
       tableShow: true,
       tenantAllList: [],
@@ -674,9 +690,16 @@ export default {
   },
   created() {
     this.getList();
+    this.getTenantTypeList();
     this.selectAllUser();
   },
   methods: {
+    // 获取所有的租户类型,
+    getTenantTypeList(){
+       this.getDicts("tenant_profession").then(res=>{
+         this.tenantProfessionList=res.data;
+       })
+     },
     // 校验父级租户信息
     checkTenantParentId(rule, value, callback) {
       if (!this.form.tenantId) {

+ 26 - 5
zkqy-ui/src/views/system/tenant/tenantIndex.vue

@@ -311,7 +311,7 @@
 
     <!-- 添加或修改租户信息对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-form-item label="选择上级租户" prop="tenantParentId">
           <el-cascader
             v-model="form.tenantParentId"
@@ -324,6 +324,18 @@
             clearable
           ></el-cascader>
         </el-form-item>
+
+        <el-form-item label="租户类型" prop="tenantProfession" >
+          <el-select v-model="form.tenantProfession" placeholder="请选择租户类型" style="width: 250px">
+            <el-option
+              v-for="item in tenantProfessionList"
+              :key="item.dictValue"
+              :label="item.dictLabel"
+              :value="item.dictValue"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="租户名称" prop="tenantName">
           <el-input v-model="form.tenantName" placeholder="请输入租户名称" />
         </el-form-item>
@@ -343,17 +355,17 @@
         <el-form-item label="客户端访问地址" prop="tenantClientLoginUrl">
           <el-input
             v-model="form.tenantClientLoginUrl"
-            placeholder="请输入地址"
+            placeholder="请输入客户端访问地址"
           />
         </el-form-item>
         <el-form-item label="工具端访问地址" prop="tenantToolLoginUrl">
           <el-input
             v-model="form.tenantToolLoginUrl"
-            placeholder="请输入地址"
+            placeholder="请输入工具端访问地址"
           />
         </el-form-item>
         <el-form-item label="租户等级" prop="tenantGrade">
-          <el-input v-model="form.tenantGrade" placeholder="请输入地址" />
+          <el-input v-model="form.tenantGrade" placeholder="请输入租户等级" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -613,6 +625,7 @@ import {
   tenantTree,
 } from "@/api/system/tenant";
 import { getDataSourceInfo, insertDataSource } from "@/api/system/data";
+import { getDicts } from "@/api/system/dict/data";
 import {
   listConfiguration,
   getConfiguration,
@@ -640,6 +653,7 @@ export default {
   },
   data() {
     return {
+      tenantProfession:[],
       tenantAllList: [],
       // 登录页面数据
       isEdit: false,
@@ -812,6 +826,7 @@ export default {
   created() {
     this.getList();
     this.selectAllUser();
+    this.getTenantTypeList();
   },
   methods: {
     load(tree, treeNode, resolve) {
@@ -825,7 +840,12 @@ export default {
         }
       });
     },
-
+    // 获取所有的租户类型,
+    getTenantTypeList(){
+      this.getDicts("tenant_profession").then(res=>{
+        this.tenantProfessionList=res.data;
+      })
+    },
     // 查询所有平台所有租户
     getTenantAllList() {
       tenantTree().then((response) => {
@@ -1117,6 +1137,7 @@ export default {
     },
     /** 绑定数据源按钮操作 */
     bindDatasource(row) {
+      //当前行租户信息
       this.currentTenantInfo = row;
       this.reset1();
       this.dialogLoading = false;