From 2bd6ff268662ad8c927884a63172368beae4517b Mon Sep 17 00:00:00 2001 From: jiangjiazhi Date: Wed, 14 Sep 2016 14:01:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E7=94=B5=E5=AD=90?= =?UTF-8?q?=E7=97=85=E5=8E=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../permission/DataAccessLayerService.java | 58 ++++ .../platform/permission/dao/DepartmentsMapper.java | 21 -- .../permission/dao/OrganizationMapper.java | 24 -- .../platform/permission/dao/PermissionsMapper.java | 25 -- .../platform/permission/dao/RegionsMapper.java | 22 -- .../permission/dao/RolePermissionMapsMapper.java | 23 -- .../lyms/platform/permission/dao/RolesMapper.java | 10 - .../permission/dao/UserOrganizationMapsMapper.java | 10 - .../permission/dao/UserRoleMapsMapper.java | 26 -- .../lyms/platform/permission/dao/UsersMapper.java | 26 -- .../dao/master/MasterDepartmentsMapper.java | 21 ++ .../dao/master/MasterOrganizationMapper.java | 24 ++ .../dao/master/MasterPermissionsMapper.java | 25 ++ .../permission/dao/master/MasterRegionsMapper.java | 22 ++ .../dao/master/MasterRolePermissionMapsMapper.java | 23 ++ .../permission/dao/master/MasterRolesMapper.java | 10 + .../master/MasterUserOrganizationMapsMapper.java | 10 + .../dao/master/MasterUserRoleMapsMapper.java | 26 ++ .../permission/dao/master/MasterUsersMapper.java | 26 ++ .../permission/dao/slave/DepartmentsMapper.java | 21 ++ .../permission/service/RegionsService.java | 22 +- .../service/impl/DepartmentsServiceImpl.java | 114 ++++++-- .../service/impl/OrganizationServiceImpl.java | 139 +++++++--- .../service/impl/PermissionsServiceImpl.java | 71 ++++- .../service/impl/RegionsServiceImpl.java | 131 ++++++--- .../impl/RolePermissionMapsServiceImpl.java | 65 ++++- .../permission/service/impl/RolesServiceImpl.java | 104 +++++-- .../impl/UserOrganizationMapsServiceImpl.java | 99 +++++-- .../service/impl/UserRoleMapsServiceImpl.java | 86 +++++- .../permission/service/impl/UsersServiceImpl.java | 132 +++++++-- .../src/main/resources/mainOrm/Departments.xml | 164 ----------- .../src/main/resources/mainOrm/Organization.xml | 233 ---------------- .../src/main/resources/mainOrm/Permissions.xml | 197 ------------- .../src/main/resources/mainOrm/Regions.xml | 94 ------- .../main/resources/mainOrm/RolePermissionMaps.xml | 97 ------- .../src/main/resources/mainOrm/Roles.xml | 154 ----------- .../resources/mainOrm/UserOrganizationMaps.xml | 101 ------- .../src/main/resources/mainOrm/UserRoleMaps.xml | 107 -------- .../src/main/resources/mainOrm/Users.xml | 293 -------------------- .../resources/mainOrm/master/MasterDepartments.xml | 176 ++++++++++++ .../mainOrm/master/MasterOrganization.xml | 243 ++++++++++++++++ .../resources/mainOrm/master/MasterPermissions.xml | 207 ++++++++++++++ .../resources/mainOrm/master/MasterRegions.xml | 99 +++++++ .../mainOrm/master/MasterRolePermissionMaps.xml | 97 +++++++ .../main/resources/mainOrm/master/MasterRoles.xml | 161 +++++++++++ .../mainOrm/master/MasterUserOrganizationMaps.xml | 106 +++++++ .../mainOrm/master/MasterUserRoleMaps.xml | 115 ++++++++ .../main/resources/mainOrm/master/MasterUsers.xml | 304 +++++++++++++++++++++ .../main/resources/mainOrm/slave/Departments.xml | 173 ++++++++++++ .../main/resources/mainOrm/slave/Organization.xml | 243 ++++++++++++++++ .../main/resources/mainOrm/slave/Permissions.xml | 207 ++++++++++++++ .../src/main/resources/mainOrm/slave/Regions.xml | 99 +++++++ .../resources/mainOrm/slave/RolePermissionMaps.xml | 97 +++++++ .../src/main/resources/mainOrm/slave/Roles.xml | 161 +++++++++++ .../mainOrm/slave/UserOrganizationMaps.xml | 106 +++++++ .../main/resources/mainOrm/slave/UserRoleMaps.xml | 115 ++++++++ .../src/main/resources/mainOrm/slave/Users.xml | 302 ++++++++++++++++++++ .../src/main/resources/database.properties | 19 +- .../resources/spring/applicationContext-dal.xml | 261 ++++++++++-------- 59 files changed, 4222 insertions(+), 1925 deletions(-) create mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/DataAccessLayerService.java delete mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/DepartmentsMapper.java delete mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/OrganizationMapper.java delete mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/PermissionsMapper.java delete mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/RegionsMapper.java delete mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/RolePermissionMapsMapper.java delete mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/RolesMapper.java delete mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/UserOrganizationMapsMapper.java delete mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/UserRoleMapsMapper.java delete mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/UsersMapper.java create mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterDepartmentsMapper.java create mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterOrganizationMapper.java create mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterPermissionsMapper.java create mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterRegionsMapper.java create mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterRolePermissionMapsMapper.java create mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterRolesMapper.java create mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterUserOrganizationMapsMapper.java create mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterUserRoleMapsMapper.java create mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterUsersMapper.java create mode 100644 platform-biz-service/src/main/java/com/lyms/platform/permission/dao/slave/DepartmentsMapper.java delete mode 100644 platform-biz-service/src/main/resources/mainOrm/Departments.xml delete mode 100644 platform-biz-service/src/main/resources/mainOrm/Organization.xml delete mode 100644 platform-biz-service/src/main/resources/mainOrm/Permissions.xml delete mode 100644 platform-biz-service/src/main/resources/mainOrm/Regions.xml delete mode 100644 platform-biz-service/src/main/resources/mainOrm/RolePermissionMaps.xml delete mode 100644 platform-biz-service/src/main/resources/mainOrm/Roles.xml delete mode 100644 platform-biz-service/src/main/resources/mainOrm/UserOrganizationMaps.xml delete mode 100644 platform-biz-service/src/main/resources/mainOrm/UserRoleMaps.xml delete mode 100644 platform-biz-service/src/main/resources/mainOrm/Users.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/master/MasterDepartments.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/master/MasterOrganization.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/master/MasterPermissions.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/master/MasterRegions.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/master/MasterRolePermissionMaps.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/master/MasterRoles.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/master/MasterUserOrganizationMaps.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/master/MasterUserRoleMaps.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/master/MasterUsers.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/slave/Departments.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/slave/Organization.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/slave/Permissions.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/slave/Regions.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/slave/RolePermissionMaps.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/slave/Roles.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/slave/UserOrganizationMaps.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/slave/UserRoleMaps.xml create mode 100644 platform-biz-service/src/main/resources/mainOrm/slave/Users.xml diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/DataAccessLayerService.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/DataAccessLayerService.java new file mode 100644 index 0000000..c526e08 --- /dev/null +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/DataAccessLayerService.java @@ -0,0 +1,58 @@ +package com.lyms.platform.permission; + +import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.support.ApplicationObjectSupport; + +import java.util.concurrent.ConcurrentHashMap; + +/** + * 数据层 + *

+ * 详细描述 + *

+ * 示例代码 + * + *

+ * 
+ * + * @author In_Home + * @version BME V100R001 2016-9-13 + * @since BME V100R001C40B104 + */ + +public class DataAccessLayerService extends ApplicationObjectSupport implements InitializingBean{ + //启动方式 1 单机 2 服务器 + @Value("#{configProperties['server.startup']}") + private String startUpModel="1"; + private java.util.Map clazzCached=new ConcurrentHashMap<>(); + + @Override + public void afterPropertiesSet() throws Exception { + } + public Object getBean(Class clazz){ + try{ + + Object object = clazzCached.get(clazz); + if(null!= object){ + return object; + } + + Object obj = getApplicationContext().getBean(clazz); + clazzCached.put(clazz,obj); + return obj; + }catch (Exception e){ + + } + return null; + } + + /** + * 是否是单机模式启动 + * + * @return ture 表示是单机模式,那查询的时候就需要查询slave + */ + protected boolean getStartUpModel() { + return "1".equals(startUpModel); + } +} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/DepartmentsMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/DepartmentsMapper.java deleted file mode 100644 index 63684b3..0000000 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/DepartmentsMapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.lyms.platform.permission.dao; - -import com.lyms.platform.permission.model.Departments; -import com.lyms.platform.permission.model.DepartmentsQuery; - -import java.util.List; - -public interface DepartmentsMapper { - public void addDepartments(Departments obj); - - public void updateDepartments(Departments obj); - - public void deleteDepartments(Integer id); - - public Departments getDepartments(Integer id); - - public int queryDepartmentsCount(DepartmentsQuery query); - - public List queryDepartments(DepartmentsQuery query); - -} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/OrganizationMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/OrganizationMapper.java deleted file mode 100644 index 7ca13d7..0000000 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/OrganizationMapper.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.lyms.platform.permission.dao; - -import com.lyms.platform.permission.model.Organization; -import com.lyms.platform.permission.model.OrganizationQuery; - -import java.util.List; - -public interface OrganizationMapper { - public Integer addOrganization(Organization obj); - - public void updateOrganization(Organization obj); - - public void deleteOrganization(Integer id); - - public Organization getOrganization(Integer id); - - public int queryOrganizationCount(OrganizationQuery query); - - public List queryOrganization(OrganizationQuery query); - - List queryProvinceIdByOrgId(List orgList); - - List queryHospital(); -} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/PermissionsMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/PermissionsMapper.java deleted file mode 100644 index 7b67960..0000000 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/PermissionsMapper.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.lyms.platform.permission.dao; - -import com.lyms.platform.permission.model.Permissions; -import com.lyms.platform.permission.model.PermissionsQuery; - -import java.util.List; - -public interface PermissionsMapper { - public void addPermissions(Permissions obj); - - public void updatePermissions(Permissions obj); - - public void deletePermissions(Integer id); - - public Permissions getPermissions(Integer id); - - public Integer queryPermissionsCount(PermissionsQuery query); - - public List queryPermissions(PermissionsQuery query); - - List queryPermissionByRoleIds(List statusList); - - List queryPermissionByRoleIds1(Integer roleIds); - -} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/RegionsMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/RegionsMapper.java deleted file mode 100644 index 0d5da24..0000000 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/RegionsMapper.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.lyms.platform.permission.dao; - - -import com.lyms.platform.permission.model.Regions; -import com.lyms.platform.permission.model.RegionsQuery; - -import java.util.List; - -public interface RegionsMapper { - public void addRegions(Regions obj); - - public void updateRegions(Regions obj); - - public void deleteRegions(Integer id); - - public Regions getRegions(String id); - - public int queryRegionsCount(RegionsQuery query); - - public List queryRegions(RegionsQuery query); - -} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/RolePermissionMapsMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/RolePermissionMapsMapper.java deleted file mode 100644 index 2deca74..0000000 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/RolePermissionMapsMapper.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.lyms.platform.permission.dao; - -import com.lyms.platform.permission.model.RolePermissionMaps; -import com.lyms.platform.permission.model.RolePermissionMapsQuery; - -import java.util.List; - -public interface RolePermissionMapsMapper { - public void addRolePermissionMaps(RolePermissionMaps obj); - - public void updateRolePermissionMaps(RolePermissionMaps obj); - - public void deleteRolePermissionMaps(Integer id); - - public RolePermissionMaps getRolePermissionMaps(Integer id); - - public int queryRolePermissionMapsCount(RolePermissionMapsQuery query); - - public List queryRolePermissionMaps(RolePermissionMapsQuery query); - - public void updateRoleByRoleId(Integer roleId); - -} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/RolesMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/RolesMapper.java deleted file mode 100644 index 61b804d..0000000 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/RolesMapper.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.lyms.platform.permission.dao; - -import com.lyms.platform.permission.model.Roles; -import com.lyms.platform.permission.model.RolesQuery; - -import java.util.List; - -public interface RolesMapper {public void addRoles(Roles obj);public void updateRoles(Roles obj);public void deleteRoles(Integer id);public Roles getRoles(Integer id);public int queryRolesCount(RolesQuery query);public List queryRoles(RolesQuery query); - -} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/UserOrganizationMapsMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/UserOrganizationMapsMapper.java deleted file mode 100644 index c01c825..0000000 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/UserOrganizationMapsMapper.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.lyms.platform.permission.dao; - -import com.lyms.platform.permission.model.UserOrganizationMaps; -import com.lyms.platform.permission.model.UserOrganizationMapsQuery; - -import java.util.List; - -public interface UserOrganizationMapsMapper {public void addUserOrganizationMaps(UserOrganizationMaps obj);public void updateUserOrganizationMaps(UserOrganizationMaps obj);public void deleteUserOrganizationMaps(Integer id);public UserOrganizationMaps getUserOrganizationMaps(Integer id);public int queryUserOrganizationMapsCount(UserOrganizationMapsQuery query);public List queryUserOrganizationMaps(UserOrganizationMapsQuery query); - -} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/UserRoleMapsMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/UserRoleMapsMapper.java deleted file mode 100644 index 234e513..0000000 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/UserRoleMapsMapper.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.lyms.platform.permission.dao; - -import com.lyms.platform.permission.model.UserRoleMaps; -import com.lyms.platform.permission.model.UserRoleMapsQuery; - -import java.util.List; - -public interface UserRoleMapsMapper { - - public void addUserRoleMaps(UserRoleMaps obj); - - public void updateUserRoleMaps(UserRoleMaps obj); - - public void deleteUserRoleMaps(Integer id); - - public UserRoleMaps getUserRoleMaps(Integer id); - - public int queryUserRoleMapsCount(UserRoleMapsQuery query); - - public List queryUserRoleMaps(UserRoleMapsQuery query); - - public List queryUserRoleList(UserRoleMapsQuery query); - - List queryUserRoleName(Integer id); - -} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/UsersMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/UsersMapper.java deleted file mode 100644 index c850813..0000000 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/UsersMapper.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.lyms.platform.permission.dao; - -import com.lyms.platform.permission.model.Users; -import com.lyms.platform.permission.model.UsersQuery; - -import java.util.List; - -public interface UsersMapper { - public void addUsers(Users obj); - - public void updateUsers(Users obj); - - public void deleteUsers(Integer id); - - public Users getUsers(Integer id); - - public int queryUsersCount(UsersQuery query); - public int queryUsersCount2(UsersQuery query); - - public List queryUsers(UsersQuery query); - public List queryUsers2(UsersQuery query); - - public List getUsersByLoginCenterId(Integer id); - - -} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterDepartmentsMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterDepartmentsMapper.java new file mode 100644 index 0000000..4bcee03 --- /dev/null +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterDepartmentsMapper.java @@ -0,0 +1,21 @@ +package com.lyms.platform.permission.dao.master; + +import com.lyms.platform.permission.model.Departments; +import com.lyms.platform.permission.model.DepartmentsQuery; + +import java.util.List; + +public interface MasterDepartmentsMapper { + public void addDepartments(Departments obj); + + public void updateDepartments(Departments obj); + + public void deleteDepartments(Integer id); + + public Departments getDepartments(Integer id); + + public int queryDepartmentsCount(DepartmentsQuery query); + + public List queryDepartments(DepartmentsQuery query); + +} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterOrganizationMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterOrganizationMapper.java new file mode 100644 index 0000000..cf754df --- /dev/null +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterOrganizationMapper.java @@ -0,0 +1,24 @@ +package com.lyms.platform.permission.dao.master; + +import com.lyms.platform.permission.model.Organization; +import com.lyms.platform.permission.model.OrganizationQuery; + +import java.util.List; + +public interface MasterOrganizationMapper { + public Integer addOrganization(Organization obj); + + public void updateOrganization(Organization obj); + + public void deleteOrganization(Integer id); + + public Organization getOrganization(Integer id); + + public int queryOrganizationCount(OrganizationQuery query); + + public List queryOrganization(OrganizationQuery query); + + List queryProvinceIdByOrgId(List orgList); + + List queryHospital(); +} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterPermissionsMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterPermissionsMapper.java new file mode 100644 index 0000000..3d16243 --- /dev/null +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterPermissionsMapper.java @@ -0,0 +1,25 @@ +package com.lyms.platform.permission.dao.master; + +import com.lyms.platform.permission.model.Permissions; +import com.lyms.platform.permission.model.PermissionsQuery; + +import java.util.List; + +public interface MasterPermissionsMapper { + public void addPermissions(Permissions obj); + + public void updatePermissions(Permissions obj); + + public void deletePermissions(Integer id); + + public Permissions getPermissions(Integer id); + + public Integer queryPermissionsCount(PermissionsQuery query); + + public List queryPermissions(PermissionsQuery query); + + List queryPermissionByRoleIds(List statusList); + + List queryPermissionByRoleIds1(Integer roleIds); + +} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterRegionsMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterRegionsMapper.java new file mode 100644 index 0000000..4289426 --- /dev/null +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterRegionsMapper.java @@ -0,0 +1,22 @@ +package com.lyms.platform.permission.dao.master; + + +import com.lyms.platform.permission.model.Regions; +import com.lyms.platform.permission.model.RegionsQuery; + +import java.util.List; + +public interface MasterRegionsMapper { + public void addRegions(Regions obj); + + public void updateRegions(Regions obj); + + public void deleteRegions(Integer id); + + public Regions getRegions(String id); + + public int queryRegionsCount(RegionsQuery query); + + public List queryRegions(RegionsQuery query); + +} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterRolePermissionMapsMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterRolePermissionMapsMapper.java new file mode 100644 index 0000000..ebbfb2d --- /dev/null +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterRolePermissionMapsMapper.java @@ -0,0 +1,23 @@ +package com.lyms.platform.permission.dao.master; + +import com.lyms.platform.permission.model.RolePermissionMaps; +import com.lyms.platform.permission.model.RolePermissionMapsQuery; + +import java.util.List; + +public interface MasterRolePermissionMapsMapper { + public void addRolePermissionMaps(RolePermissionMaps obj); + + public void updateRolePermissionMaps(RolePermissionMaps obj); + + public void deleteRolePermissionMaps(Integer id); + + public RolePermissionMaps getRolePermissionMaps(Integer id); + + public int queryRolePermissionMapsCount(RolePermissionMapsQuery query); + + public List queryRolePermissionMaps(RolePermissionMapsQuery query); + + public void updateRoleByRoleId(Integer roleId); + +} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterRolesMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterRolesMapper.java new file mode 100644 index 0000000..1590de8 --- /dev/null +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterRolesMapper.java @@ -0,0 +1,10 @@ +package com.lyms.platform.permission.dao.master; + +import com.lyms.platform.permission.model.Roles; +import com.lyms.platform.permission.model.RolesQuery; + +import java.util.List; + +public interface MasterRolesMapper {public void addRoles(Roles obj);public void updateRoles(Roles obj);public void deleteRoles(Integer id);public Roles getRoles(Integer id);public int queryRolesCount(RolesQuery query);public List queryRoles(RolesQuery query); + +} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterUserOrganizationMapsMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterUserOrganizationMapsMapper.java new file mode 100644 index 0000000..60731e4 --- /dev/null +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterUserOrganizationMapsMapper.java @@ -0,0 +1,10 @@ +package com.lyms.platform.permission.dao.master; + +import com.lyms.platform.permission.model.UserOrganizationMaps; +import com.lyms.platform.permission.model.UserOrganizationMapsQuery; + +import java.util.List; + +public interface MasterUserOrganizationMapsMapper {public void addUserOrganizationMaps(UserOrganizationMaps obj);public void updateUserOrganizationMaps(UserOrganizationMaps obj);public void deleteUserOrganizationMaps(Integer id);public UserOrganizationMaps getUserOrganizationMaps(Integer id);public int queryUserOrganizationMapsCount(UserOrganizationMapsQuery query);public List queryUserOrganizationMaps(UserOrganizationMapsQuery query); + +} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterUserRoleMapsMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterUserRoleMapsMapper.java new file mode 100644 index 0000000..dd563fe --- /dev/null +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterUserRoleMapsMapper.java @@ -0,0 +1,26 @@ +package com.lyms.platform.permission.dao.master; + +import com.lyms.platform.permission.model.UserRoleMaps; +import com.lyms.platform.permission.model.UserRoleMapsQuery; + +import java.util.List; + +public interface MasterUserRoleMapsMapper { + + public void addUserRoleMaps(UserRoleMaps obj); + + public void updateUserRoleMaps(UserRoleMaps obj); + + public void deleteUserRoleMaps(Integer id); + + public UserRoleMaps getUserRoleMaps(Integer id); + + public int queryUserRoleMapsCount(UserRoleMapsQuery query); + + public List queryUserRoleMaps(UserRoleMapsQuery query); + + public List queryUserRoleList(UserRoleMapsQuery query); + + List queryUserRoleName(Integer id); + +} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterUsersMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterUsersMapper.java new file mode 100644 index 0000000..cd85a69 --- /dev/null +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterUsersMapper.java @@ -0,0 +1,26 @@ +package com.lyms.platform.permission.dao.master; + +import com.lyms.platform.permission.model.Users; +import com.lyms.platform.permission.model.UsersQuery; + +import java.util.List; + +public interface MasterUsersMapper { + public void addUsers(Users obj); + + public void updateUsers(Users obj); + + public void deleteUsers(Integer id); + + public Users getUsers(Integer id); + + public int queryUsersCount(UsersQuery query); + public int queryUsersCount2(UsersQuery query); + + public List queryUsers(UsersQuery query); + public List queryUsers2(UsersQuery query); + + public List getUsersByLoginCenterId(Integer id); + + +} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/slave/DepartmentsMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/slave/DepartmentsMapper.java new file mode 100644 index 0000000..2ea8afe --- /dev/null +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/slave/DepartmentsMapper.java @@ -0,0 +1,21 @@ +package com.lyms.platform.permission.dao.slave; + +import com.lyms.platform.permission.model.Departments; +import com.lyms.platform.permission.model.DepartmentsQuery; + +import java.util.List; + +public interface DepartmentsMapper { + public void addDepartments(Departments obj); + + public void updateDepartments(Departments obj); + + public void deleteDepartments(Integer id); + + public Departments getDepartments(Integer id); + + public int queryDepartmentsCount(DepartmentsQuery query); + + public List queryDepartments(DepartmentsQuery query); + +} \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/RegionsService.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/RegionsService.java index f3bafb1..fb80ffd 100644 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/RegionsService.java +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/RegionsService.java @@ -8,16 +8,16 @@ import com.lyms.platform.permission.model.RegionsQuery; import java.util.List; public interface RegionsService { -// public void addRegions(Regions obj); -// -// public void updateRegions(Regions obj); -// -// public void deleteRegions(Integer id); -// -// public Regions getRegions(String id); -// -// public int queryRegionsCount(RegionsQuery query); -// -// public List queryRegions(RegionsQuery query); + public void addRegions(Regions obj); + + public void updateRegions(Regions obj); + + public void deleteRegions(Integer id); + + public Regions getRegions(String id); + + public int queryRegionsCount(RegionsQuery query); + + public List queryRegions(RegionsQuery query); } \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/DepartmentsServiceImpl.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/DepartmentsServiceImpl.java index 01a47ee..f9547bf 100644 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/DepartmentsServiceImpl.java +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/DepartmentsServiceImpl.java @@ -1,32 +1,108 @@ package com.lyms.platform.permission.service.impl; -import com.lyms.platform.permission.dao.DepartmentsMapper; +import com.lyms.platform.common.exception.BusinessException; +import com.lyms.platform.permission.DataAccessLayerService; +import com.lyms.platform.permission.dao.master.MasterDepartmentsMapper; +import com.lyms.platform.permission.dao.slave.DepartmentsMapper; import com.lyms.platform.permission.model.Departments; import com.lyms.platform.permission.model.DepartmentsQuery; import com.lyms.platform.permission.service.DepartmentsService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.Date; import java.util.List; @Service -public class DepartmentsServiceImpl implements DepartmentsService { - -@Autowired -private DepartmentsMapper departmentsMapper; - -@Override -public void addDepartments(Departments obj){departmentsMapper.addDepartments(obj);} -@Override -public void updateDepartments(Departments obj){departmentsMapper.updateDepartments(obj);} -@Override -public void deleteDepartments (Integer id){departmentsMapper.deleteDepartments(id);} -@Override -public Departments getDepartments (Integer id){return departmentsMapper.getDepartments(id);} -@Override -public int queryDepartmentsCount (DepartmentsQuery query){return departmentsMapper.queryDepartmentsCount(query);} -@Override -public List queryDepartments (DepartmentsQuery query){if (query.getNeed() != null) {query.mysqlBuild(departmentsMapper.queryDepartmentsCount(query));}return departmentsMapper.queryDepartments(query);} +public class DepartmentsServiceImpl extends DataAccessLayerService implements DepartmentsService { + @Autowired + private MasterDepartmentsMapper masterDepartmentsMapper; + + public DepartmentsMapper getslaveMapper() { + Object obj1 = getBean(DepartmentsMapper.class); + if (null != obj1) { + DepartmentsMapper masterUsersMapper = (DepartmentsMapper) obj1; + return masterUsersMapper; + } + return null; + } + + @Override + public void addDepartments(Departments obj) { + masterDepartmentsMapper.addDepartments(obj); + DepartmentsMapper masterDepartmentsMapper = getslaveMapper(); + if (null != masterDepartmentsMapper) { + if (null == obj.getId()) { + throw new BusinessException(); + } + masterDepartmentsMapper.addDepartments(obj); + } + } + + @Override + public void updateDepartments(Departments obj) { + masterDepartmentsMapper.updateDepartments(obj); + + DepartmentsMapper masterDepartmentsMapper = getslaveMapper(); + if (null != masterDepartmentsMapper) { + masterDepartmentsMapper.updateDepartments(obj); + } + } + + @Override + public void deleteDepartments(Integer id) { + masterDepartmentsMapper.deleteDepartments(id); + + DepartmentsMapper masterDepartmentsMapper = getslaveMapper(); + if (null != masterDepartmentsMapper) { + masterDepartmentsMapper.deleteDepartments(id); + } + } + + @Override + public Departments getDepartments(Integer id) { + if (getStartUpModel()) { + DepartmentsMapper masterDepartmentsMapper = getslaveMapper(); + if (null != masterDepartmentsMapper) { + return masterDepartmentsMapper.getDepartments(id); + } + } + + return masterDepartmentsMapper.getDepartments(id); + } + + @Override + public int queryDepartmentsCount(DepartmentsQuery query) { + if (getStartUpModel()) { + DepartmentsMapper masterDepartmentsMapper = getslaveMapper(); + if (null != masterDepartmentsMapper) { + return masterDepartmentsMapper.queryDepartmentsCount(query); + } + } + return masterDepartmentsMapper.queryDepartmentsCount(query); + } + + @Override + public List queryDepartments(DepartmentsQuery query) { + if (query.getNeed() != null) { + int count = 0; + if (getStartUpModel()) { + DepartmentsMapper masterDepartmentsMapper = getslaveMapper(); + if (null != masterDepartmentsMapper) { + count= masterDepartmentsMapper.queryDepartmentsCount(query); + } + }else { + count=masterDepartmentsMapper.queryDepartmentsCount(query); + } + query.mysqlBuild(count); + } + + if (getStartUpModel()) { + DepartmentsMapper masterDepartmentsMapper = getslaveMapper(); + if (null != masterDepartmentsMapper) { + return masterDepartmentsMapper.queryDepartments(query); + } + } + return masterDepartmentsMapper.queryDepartments(query); + } } \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/OrganizationServiceImpl.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/OrganizationServiceImpl.java index a162432..c1ce598 100644 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/OrganizationServiceImpl.java +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/OrganizationServiceImpl.java @@ -1,7 +1,10 @@ package com.lyms.platform.permission.service.impl; import com.lyms.platform.common.enums.OrganizationTypeEnum; -import com.lyms.platform.permission.dao.OrganizationMapper; +import com.lyms.platform.common.exception.BusinessException; +import com.lyms.platform.permission.DataAccessLayerService; +import com.lyms.platform.permission.dao.master.MasterOrganizationMapper; +import com.lyms.platform.permission.dao.slave.OrganizationMapper; import com.lyms.platform.permission.model.Organization; import com.lyms.platform.permission.model.OrganizationQuery; import com.lyms.platform.permission.service.OrganizationService; @@ -10,38 +13,73 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; -import java.util.Collections; import java.util.List; @Service -public class OrganizationServiceImpl implements OrganizationService { +public class OrganizationServiceImpl extends DataAccessLayerService implements OrganizationService { @Autowired - private OrganizationMapper organizationMapper; + private MasterOrganizationMapper masterOrganizationMapper; + + public OrganizationMapper getSlaveMapper() { + Object obj1 = getBean(OrganizationMapper.class); + if (null != obj1) { + OrganizationMapper masterUsersMapper = (OrganizationMapper) obj1; + return masterUsersMapper; + } + return null; + } @Override public Integer addOrganization(Organization obj) { - return organizationMapper.addOrganization(obj); + + masterOrganizationMapper.addOrganization(obj); + + OrganizationMapper masterOrganizationMapper = getSlaveMapper(); + if (null != masterOrganizationMapper) { + if (null == obj.getId()) { + throw new BusinessException(); + } + masterOrganizationMapper.addOrganization(obj); + } + return obj.getId(); } @Override public void updateOrganization(Organization obj) { - organizationMapper.updateOrganization(obj); + masterOrganizationMapper.updateOrganization(obj); + + OrganizationMapper masterOrganizationMapper = getSlaveMapper(); + if (null != masterOrganizationMapper) { + masterOrganizationMapper.updateOrganization(obj); + } } @Override public void deleteOrganization(Integer id) { - organizationMapper.deleteOrganization(id); + masterOrganizationMapper.deleteOrganization(id); + + OrganizationMapper masterOrganizationMapper = getSlaveMapper(); + if (null != masterOrganizationMapper) { + masterOrganizationMapper.deleteOrganization(id); + } } @Override public Organization getOrganization(Integer id) { - Organization organization = organizationMapper.getOrganization(id); - if(null != organization) { + Organization organization = null; + if (getStartUpModel()) { + OrganizationMapper masterOrganizationMapper = getSlaveMapper(); + masterOrganizationMapper.getOrganization(id); + } else { + organization = masterOrganizationMapper.getOrganization(id); + } + + if (null != organization) { //设置机构类型 1 医院 0 公司 - if( null != organization.getType()) { - if((organization.getType().equals(OrganizationTypeEnum.NY.getId()) || organization.getType().equals(OrganizationTypeEnum.FB.getId()) || - organization.getType().equals(OrganizationTypeEnum.TY.getId())|| organization.getType().equals(OrganizationTypeEnum.JMQY.getId()))) { + if (null != organization.getType()) { + if ((organization.getType().equals(OrganizationTypeEnum.NY.getId()) || organization.getType().equals(OrganizationTypeEnum.FB.getId()) || + organization.getType().equals(OrganizationTypeEnum.TY.getId()) || organization.getType().equals(OrganizationTypeEnum.JMQY.getId()))) { organization.setOrgType(1); } else { organization.setOrgType(0); @@ -55,22 +93,42 @@ public class OrganizationServiceImpl implements OrganizationService { @Override public int queryOrganizationCount(OrganizationQuery query) { - return organizationMapper.queryOrganizationCount(query); + if (getStartUpModel()) { + OrganizationMapper masterOrganizationMapper = getSlaveMapper(); + return masterOrganizationMapper.queryOrganizationCount(query); + } + return masterOrganizationMapper.queryOrganizationCount(query); } @Override public List queryOrganization(OrganizationQuery query) { if (query.getNeed() != null) { - query.mysqlBuild(organizationMapper.queryOrganizationCount(query)); + int count = 0; + if (getStartUpModel()) { + OrganizationMapper masterOrganizationMapper = getSlaveMapper(); + count = masterOrganizationMapper.queryOrganizationCount(query); + } else { + count = masterOrganizationMapper.queryOrganizationCount(query); + } + + + query.mysqlBuild(count); + } + List organizations = null; + if (getStartUpModel()) { + OrganizationMapper masterOrganizationMapper = getSlaveMapper(); + organizations = masterOrganizationMapper.queryOrganization(query); + } else { + organizations = masterOrganizationMapper.queryOrganization(query); } - List organizations = organizationMapper.queryOrganization(query); - if(CollectionUtils.isNotEmpty(organizations)) { - for(Organization organization : organizations) { - if(null != organization) { + + if (CollectionUtils.isNotEmpty(organizations)) { + for (Organization organization : organizations) { + if (null != organization) { //设置机构类型 1 医院 0 公司 - if( null != organization.getType() ) { - if((organization.getType().equals(OrganizationTypeEnum.NY.getId()) || organization.getType().equals(OrganizationTypeEnum.FB.getId()) || - organization.getType().equals(OrganizationTypeEnum.TY.getId())|| organization.getType().equals(OrganizationTypeEnum.JMQY.getId()))) { + if (null != organization.getType()) { + if ((organization.getType().equals(OrganizationTypeEnum.NY.getId()) || organization.getType().equals(OrganizationTypeEnum.FB.getId()) || + organization.getType().equals(OrganizationTypeEnum.TY.getId()) || organization.getType().equals(OrganizationTypeEnum.JMQY.getId()))) { organization.setOrgType(1); } else { organization.setOrgType(0); @@ -86,27 +144,44 @@ public class OrganizationServiceImpl implements OrganizationService { } public List queryProvinceIdByOrgId(List orgId) { - return organizationMapper.queryProvinceIdByOrgId(orgId); + if (getStartUpModel()) { + OrganizationMapper masterOrganizationMapper = getSlaveMapper(); + return masterOrganizationMapper.queryProvinceIdByOrgId(orgId); + } + return masterOrganizationMapper.queryProvinceIdByOrgId(orgId); } - public List queryHospital(){ - return organizationMapper.queryHospital(); + + + public List queryHospital() { + if (getStartUpModel()) { + OrganizationMapper masterOrganizationMapper = getSlaveMapper(); + return masterOrganizationMapper.queryHospital(); + } + return masterOrganizationMapper.queryHospital(); } @Override public List queryHospitals(OrganizationQuery query) { if (query.getNeed() != null) { - query.mysqlBuild(organizationMapper.queryOrganizationCount(query)); + query.mysqlBuild(queryOrganizationCount(query)); } List results = new ArrayList<>(); - List organizations = organizationMapper.queryOrganization(query); - if(CollectionUtils.isNotEmpty(organizations)) { - for(Organization organization : organizations) { - if(null != organization) { + List organizations = null; + if (getStartUpModel()) { + OrganizationMapper masterOrganizationMapper = getSlaveMapper(); + organizations = masterOrganizationMapper.queryOrganization(query); + } else { + organizations = masterOrganizationMapper.queryOrganization(query); + } + + if (CollectionUtils.isNotEmpty(organizations)) { + for (Organization organization : organizations) { + if (null != organization) { //设置机构类型 1 医院 0 公司 - if( null != organization.getType() ) { - if((organization.getType().equals(OrganizationTypeEnum.NY.getId()) || organization.getType().equals(OrganizationTypeEnum.FB.getId()) || - organization.getType().equals(OrganizationTypeEnum.TY.getId())|| organization.getType().equals(OrganizationTypeEnum.JMQY.getId()))) { + if (null != organization.getType()) { + if ((organization.getType().equals(OrganizationTypeEnum.NY.getId()) || organization.getType().equals(OrganizationTypeEnum.FB.getId()) || + organization.getType().equals(OrganizationTypeEnum.TY.getId()) || organization.getType().equals(OrganizationTypeEnum.JMQY.getId()))) { organization.setOrgType(1); results.add(organization); } diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/PermissionsServiceImpl.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/PermissionsServiceImpl.java index 4bf6b0d..b892b38 100644 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/PermissionsServiceImpl.java +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/PermissionsServiceImpl.java @@ -1,6 +1,9 @@ package com.lyms.platform.permission.service.impl; -import com.lyms.platform.permission.dao.PermissionsMapper; +import com.lyms.platform.common.exception.BusinessException; +import com.lyms.platform.permission.DataAccessLayerService; +import com.lyms.platform.permission.dao.master.MasterPermissionsMapper; +import com.lyms.platform.permission.dao.slave.PermissionsMapper; import com.lyms.platform.permission.model.Permissions; import com.lyms.platform.permission.model.PermissionsQuery; import com.lyms.platform.permission.service.PermissionsService; @@ -10,48 +13,106 @@ import org.springframework.stereotype.Service; import java.util.List; @Service -public class PermissionsServiceImpl implements PermissionsService { +public class PermissionsServiceImpl extends DataAccessLayerService implements PermissionsService { @Autowired - private PermissionsMapper permissionsMapper; + private MasterPermissionsMapper permissionsMapper; + + public PermissionsMapper getSlaveMapper() { + Object obj1 = getBean(PermissionsMapper.class); + if (null != obj1) { + PermissionsMapper masterUsersMapper = (PermissionsMapper) obj1; + return masterUsersMapper; + } + return null; + } @Override public void addPermissions(Permissions obj) { permissionsMapper.addPermissions(obj); + + PermissionsMapper masterPermissionsMapper = getSlaveMapper(); + if (null != masterPermissionsMapper) { + if (null == obj.getId()) { + throw new BusinessException(); + } + masterPermissionsMapper.addPermissions(obj); + } } @Override public void updatePermissions(Permissions obj) { permissionsMapper.updatePermissions(obj); + PermissionsMapper masterPermissionsMapper = getSlaveMapper(); + if (null != masterPermissionsMapper) { + masterPermissionsMapper.updatePermissions(obj); + } } @Override public void deletePermissions(Integer id) { + permissionsMapper.deletePermissions(id); + PermissionsMapper masterPermissionsMapper = getSlaveMapper(); + if (null != masterPermissionsMapper) { + masterPermissionsMapper.deletePermissions(id); + } } @Override public Permissions getPermissions(Integer id) { + if (getStartUpModel()) { + PermissionsMapper masterPermissionsMapper = getSlaveMapper(); + if (null != masterPermissionsMapper) { + return masterPermissionsMapper.getPermissions(id); + } + } return permissionsMapper.getPermissions(id); } @Override public int queryPermissionsCount(PermissionsQuery query) { + if (getStartUpModel()) { + PermissionsMapper masterPermissionsMapper = getSlaveMapper(); + if (null != masterPermissionsMapper) { + return masterPermissionsMapper.queryPermissionsCount(query); + } + } return permissionsMapper.queryPermissionsCount(query); } @Override public List queryPermissions(PermissionsQuery query) { if (query.getNeed() != null) { - query.mysqlBuild(permissionsMapper.queryPermissionsCount(query)); + query.mysqlBuild(queryPermissionsCount(query)); + } + if (getStartUpModel()) { + PermissionsMapper masterPermissionsMapper = getSlaveMapper(); + if (null != masterPermissionsMapper) { + return masterPermissionsMapper.queryPermissions(query); + } } return permissionsMapper.queryPermissions(query); } public List queryPermissionByRoleIds(List roleIds) { + if (getStartUpModel()) { + PermissionsMapper masterPermissionsMapper = getSlaveMapper(); + if (null != masterPermissionsMapper) { + return masterPermissionsMapper.queryPermissionByRoleIds(roleIds); + } + } + return permissionsMapper.queryPermissionByRoleIds(roleIds); } - public List queryPermissionByRoleIds1(Integer roleIds){ + + public List queryPermissionByRoleIds1(Integer roleIds) { + if (getStartUpModel()) { + PermissionsMapper masterPermissionsMapper = getSlaveMapper(); + if (null != masterPermissionsMapper) { + return masterPermissionsMapper.queryPermissionByRoleIds1(roleIds); + } + } return permissionsMapper.queryPermissionByRoleIds1(roleIds); } } \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/RegionsServiceImpl.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/RegionsServiceImpl.java index 51eb02c..2f1f3e8 100644 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/RegionsServiceImpl.java +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/RegionsServiceImpl.java @@ -1,7 +1,10 @@ package com.lyms.platform.permission.service.impl; -import com.lyms.platform.permission.dao.RegionsMapper; +import com.lyms.platform.common.exception.BusinessException; +import com.lyms.platform.permission.DataAccessLayerService; +import com.lyms.platform.permission.dao.master.MasterRegionsMapper; +import com.lyms.platform.permission.dao.slave.RegionsMapper; import com.lyms.platform.permission.model.Regions; import com.lyms.platform.permission.model.RegionsQuery; import com.lyms.platform.permission.service.RegionsService; @@ -11,45 +14,91 @@ import org.springframework.stereotype.Service; import java.util.List; @Service -public class RegionsServiceImpl implements RegionsService { - -// @Autowired -// private RegionsMapper regionsMapper; -// -// @Override -// public void addRegions(Regions obj) { -// regionsMapper.addRegions(obj); -// } -// -// @Override -// public void updateRegions(Regions obj) { -// regionsMapper.updateRegions(obj); -// } -// -// @Override -// public void deleteRegions(Integer id) { -// regionsMapper.deleteRegions(id); -// } -// -// @Override -// public Regions getRegions(String id) { -// if (id == null) { -// return null; -// } -// return regionsMapper.getRegions(id); -// } -// -// @Override -// public int queryRegionsCount(RegionsQuery query) { -// return regionsMapper.queryRegionsCount(query); -// } -// -// @Override -// public List queryRegions(RegionsQuery query) { -// if (query.getNeed() != null) { -// query.mysqlBuild(regionsMapper.queryRegionsCount(query)); -// } -// return regionsMapper.queryRegions(query); -// } +public class RegionsServiceImpl extends DataAccessLayerService implements RegionsService { + @Autowired + private MasterRegionsMapper masterRegionsMapper; + + + public RegionsMapper getslaveMapper() { + Object obj1 = getBean(RegionsMapper.class); + if (null != obj1) { + RegionsMapper masterUsersMapper = (RegionsMapper) obj1; + return masterUsersMapper; + } + return null; + } + + @Override + public void addRegions(Regions obj) { + masterRegionsMapper.addRegions(obj); + RegionsMapper masterPermissionsMapper = getslaveMapper(); + if (null != masterPermissionsMapper) { + if (null == obj.getId()) { + throw new BusinessException(); + } + masterPermissionsMapper.addRegions(obj); + } + } + + @Override + public void updateRegions(Regions obj) { + masterRegionsMapper.updateRegions(obj); + + RegionsMapper masterPermissionsMapper = getslaveMapper(); + if (null != masterPermissionsMapper) { + masterPermissionsMapper.updateRegions(obj); + } + } + + @Override + public void deleteRegions(Integer id) { + masterRegionsMapper.deleteRegions(id); + + RegionsMapper masterPermissionsMapper = getslaveMapper(); + if (null != masterPermissionsMapper) { + masterPermissionsMapper.deleteRegions(id); + } + } + + @Override + public Regions getRegions(String id) { + if (id == null) { + return null; + } + if (getStartUpModel()) { + RegionsMapper masterPermissionsMapper = getslaveMapper(); + if (null != masterPermissionsMapper) { + masterPermissionsMapper.getRegions(id); + } + } + return masterRegionsMapper.getRegions(id); + } + + @Override + public int queryRegionsCount(RegionsQuery query) { + + if (getStartUpModel()) { + RegionsMapper masterPermissionsMapper = getslaveMapper(); + if (null != masterPermissionsMapper) { + masterPermissionsMapper.queryRegionsCount(query); + } + } + + return masterRegionsMapper.queryRegionsCount(query); + } + + @Override + public List queryRegions(RegionsQuery query) { + if (query.getNeed() != null) { + query.mysqlBuild(queryRegionsCount(query)); + } + if (getStartUpModel()) { + RegionsMapper masterPermissionsMapper = getslaveMapper(); + if (null != masterPermissionsMapper) { + return masterPermissionsMapper.queryRegions(query); + } + } + return masterRegionsMapper.queryRegions(query); + } } \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/RolePermissionMapsServiceImpl.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/RolePermissionMapsServiceImpl.java index 60f9b0c..782fcc2 100644 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/RolePermissionMapsServiceImpl.java +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/RolePermissionMapsServiceImpl.java @@ -1,6 +1,9 @@ package com.lyms.platform.permission.service.impl; -import com.lyms.platform.permission.dao.RolePermissionMapsMapper; +import com.lyms.platform.common.exception.BusinessException; +import com.lyms.platform.permission.DataAccessLayerService; +import com.lyms.platform.permission.dao.master.MasterRolePermissionMapsMapper; +import com.lyms.platform.permission.dao.slave.RolePermissionMapsMapper; import com.lyms.platform.permission.model.RolePermissionMaps; import com.lyms.platform.permission.model.RolePermissionMapsQuery; import com.lyms.platform.permission.service.RolePermissionMapsService; @@ -10,44 +13,96 @@ import org.springframework.stereotype.Service; import java.util.List; @Service -public class RolePermissionMapsServiceImpl implements RolePermissionMapsService { +public class RolePermissionMapsServiceImpl extends DataAccessLayerService implements RolePermissionMapsService { @Autowired - private RolePermissionMapsMapper rolePermissionMapsMapper; + private MasterRolePermissionMapsMapper rolePermissionMapsMapper; + + + public RolePermissionMapsMapper getslaveMapper() { + Object obj1 = getBean(RolePermissionMapsMapper.class); + if (null != obj1) { + RolePermissionMapsMapper masterUsersMapper = (RolePermissionMapsMapper) obj1; + return masterUsersMapper; + } + return null; + } + @Override public void addRolePermissionMaps(RolePermissionMaps obj) { rolePermissionMapsMapper.addRolePermissionMaps(obj); + + RolePermissionMapsMapper masterRolePermissionMapsMapper = getslaveMapper(); + if (null != masterRolePermissionMapsMapper) { + if (null == obj.getId()) { + throw new BusinessException(); + } + masterRolePermissionMapsMapper.addRolePermissionMaps(obj); + } } @Override public void updateRolePermissionMaps(RolePermissionMaps obj) { rolePermissionMapsMapper.updateRolePermissionMaps(obj); + RolePermissionMapsMapper masterRolePermissionMapsMapper = getslaveMapper(); + if (null != masterRolePermissionMapsMapper) { + masterRolePermissionMapsMapper.updateRolePermissionMaps(obj); + } } @Override public void deleteRolePermissionMaps(Integer id) { rolePermissionMapsMapper.deleteRolePermissionMaps(id); + + RolePermissionMapsMapper masterRolePermissionMapsMapper = getslaveMapper(); + if (null != masterRolePermissionMapsMapper) { + masterRolePermissionMapsMapper.deleteRolePermissionMaps(id); + } } @Override public RolePermissionMaps getRolePermissionMaps(Integer id) { + if (getStartUpModel()) { + RolePermissionMapsMapper masterRolePermissionMapsMapper = getslaveMapper(); + if (null != masterRolePermissionMapsMapper) { + return masterRolePermissionMapsMapper.getRolePermissionMaps(id); + } + } return rolePermissionMapsMapper.getRolePermissionMaps(id); } @Override public int queryRolePermissionMapsCount(RolePermissionMapsQuery query) { + if (getStartUpModel()) { + RolePermissionMapsMapper masterRolePermissionMapsMapper = getslaveMapper(); + if (null != masterRolePermissionMapsMapper) { + return masterRolePermissionMapsMapper.queryRolePermissionMapsCount(query); + } + } return rolePermissionMapsMapper.queryRolePermissionMapsCount(query); } @Override public List queryRolePermissionMaps(RolePermissionMapsQuery query) { if (query.getNeed() != null) { - query.mysqlBuild(rolePermissionMapsMapper.queryRolePermissionMapsCount(query)); + query.mysqlBuild(queryRolePermissionMapsCount(query)); + } + if (getStartUpModel()) { + RolePermissionMapsMapper masterRolePermissionMapsMapper = getslaveMapper(); + if (null != masterRolePermissionMapsMapper) { + return masterRolePermissionMapsMapper.queryRolePermissionMaps(query); + } } return rolePermissionMapsMapper.queryRolePermissionMaps(query); } - public void updateRoleByRoleId(Integer roleId){ + + public void updateRoleByRoleId(Integer roleId) { rolePermissionMapsMapper.updateRoleByRoleId(roleId); + + RolePermissionMapsMapper masterRolePermissionMapsMapper = getslaveMapper(); + if (null != masterRolePermissionMapsMapper) { + masterRolePermissionMapsMapper.updateRoleByRoleId(roleId); + } } } \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/RolesServiceImpl.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/RolesServiceImpl.java index 7547cd8..ff359f2 100644 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/RolesServiceImpl.java +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/RolesServiceImpl.java @@ -1,32 +1,98 @@ package com.lyms.platform.permission.service.impl; -import com.lyms.platform.permission.dao.RolesMapper; +import com.lyms.platform.common.exception.BusinessException; +import com.lyms.platform.permission.DataAccessLayerService; +import com.lyms.platform.permission.dao.master.MasterRolesMapper; +import com.lyms.platform.permission.dao.slave.RolesMapper; import com.lyms.platform.permission.model.Roles; import com.lyms.platform.permission.model.RolesQuery; import com.lyms.platform.permission.service.RolesService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.Date; import java.util.List; @Service -public class RolesServiceImpl implements RolesService { - -@Autowired -private RolesMapper rolesMapper; - -@Override -public void addRoles(Roles obj){rolesMapper.addRoles(obj);} -@Override -public void updateRoles(Roles obj){rolesMapper.updateRoles(obj);} -@Override -public void deleteRoles (Integer id){rolesMapper.deleteRoles(id);} -@Override -public Roles getRoles (Integer id){return rolesMapper.getRoles(id);} -@Override -public int queryRolesCount (RolesQuery query){return rolesMapper.queryRolesCount(query);} -@Override -public List queryRoles (RolesQuery query){if (query.getNeed() != null) {query.mysqlBuild(rolesMapper.queryRolesCount(query));}return rolesMapper.queryRoles(query);} +public class RolesServiceImpl extends DataAccessLayerService implements RolesService { + @Autowired + private MasterRolesMapper rolesMapper; + + public RolesMapper getSlaveMapper() { + Object obj1 = getBean(RolesMapper.class); + if (null != obj1) { + RolesMapper masterUsersMapper = (RolesMapper) obj1; + return masterUsersMapper; + } + return null; + } + + @Override + public void addRoles(Roles obj) { + rolesMapper.addRoles(obj); + + RolesMapper masterRolesMapper = getSlaveMapper(); + if (null != masterRolesMapper) { + if (null == obj.getId()) { + throw new BusinessException(); + } + masterRolesMapper.addRoles(obj); + } + } + + @Override + public void updateRoles(Roles obj) { + rolesMapper.updateRoles(obj); + RolesMapper masterRolesMapper = getSlaveMapper(); + if (null != masterRolesMapper) { + masterRolesMapper.updateRoles(obj); + } + } + + @Override + public void deleteRoles(Integer id) { + rolesMapper.deleteRoles(id); + RolesMapper masterRolesMapper = getSlaveMapper(); + if (null != masterRolesMapper) { + masterRolesMapper.deleteRoles(id); + } + } + + @Override + public Roles getRoles(Integer id) { + + if (getStartUpModel()) { + RolesMapper masterRolesMapper = getSlaveMapper(); + if (null != masterRolesMapper) { + return masterRolesMapper.getRoles(id); + } + } + return rolesMapper.getRoles(id); + } + + @Override + public int queryRolesCount(RolesQuery query) { + if (getStartUpModel()) { + RolesMapper masterRolesMapper = getSlaveMapper(); + if (null != masterRolesMapper) { + return masterRolesMapper.queryRolesCount(query); + } + } + return rolesMapper.queryRolesCount(query); + } + + @Override + public List queryRoles(RolesQuery query) { + if (query.getNeed() != null) { + query.mysqlBuild(queryRolesCount(query)); + } + + if (getStartUpModel()) { + RolesMapper masterRolesMapper = getSlaveMapper(); + if (null != masterRolesMapper) { + return masterRolesMapper.queryRoles(query); + } + } + return rolesMapper.queryRoles(query); + } } \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/UserOrganizationMapsServiceImpl.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/UserOrganizationMapsServiceImpl.java index 72e0e6a..3d1601f 100644 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/UserOrganizationMapsServiceImpl.java +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/UserOrganizationMapsServiceImpl.java @@ -1,32 +1,93 @@ package com.lyms.platform.permission.service.impl; -import com.lyms.platform.permission.dao.UserOrganizationMapsMapper; +import com.lyms.platform.common.exception.BusinessException; +import com.lyms.platform.permission.DataAccessLayerService; +import com.lyms.platform.permission.dao.master.MasterUserOrganizationMapsMapper; +import com.lyms.platform.permission.dao.slave.UserOrganizationMapsMapper; import com.lyms.platform.permission.model.UserOrganizationMaps; import com.lyms.platform.permission.model.UserOrganizationMapsQuery; import com.lyms.platform.permission.service.UserOrganizationMapsService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.Date; import java.util.List; @Service -public class UserOrganizationMapsServiceImpl implements UserOrganizationMapsService { - -@Autowired -private UserOrganizationMapsMapper userOrganizationMapsMapper; - -@Override -public void addUserOrganizationMaps(UserOrganizationMaps obj){userOrganizationMapsMapper.addUserOrganizationMaps(obj);} -@Override -public void updateUserOrganizationMaps(UserOrganizationMaps obj){userOrganizationMapsMapper.updateUserOrganizationMaps(obj);} -@Override -public void deleteUserOrganizationMaps (Integer id){userOrganizationMapsMapper.deleteUserOrganizationMaps(id);} -@Override -public UserOrganizationMaps getUserOrganizationMaps (Integer id){return userOrganizationMapsMapper.getUserOrganizationMaps(id);} -@Override -public int queryUserOrganizationMapsCount (UserOrganizationMapsQuery query){return userOrganizationMapsMapper.queryUserOrganizationMapsCount(query);} -@Override -public List queryUserOrganizationMaps (UserOrganizationMapsQuery query){if (query.getNeed() != null) {query.mysqlBuild(userOrganizationMapsMapper.queryUserOrganizationMapsCount(query));}return userOrganizationMapsMapper.queryUserOrganizationMaps(query);} +public class UserOrganizationMapsServiceImpl extends DataAccessLayerService implements UserOrganizationMapsService { + @Autowired + private MasterUserOrganizationMapsMapper userOrganizationMapsMapper; + + public UserOrganizationMapsMapper getSlaveMapper() { + Object obj1 = getBean(UserOrganizationMapsMapper.class); + if (null != obj1) { + UserOrganizationMapsMapper masterUsersMapper = (UserOrganizationMapsMapper) obj1; + return masterUsersMapper; + } + return null; + } + + @Override + public void addUserOrganizationMaps(UserOrganizationMaps obj) { + userOrganizationMapsMapper.addUserOrganizationMaps(obj); + UserOrganizationMapsMapper masterUserOrganizationMapsMapper = getSlaveMapper(); + if(null!=masterUserOrganizationMapsMapper){ + if(null==obj.getId()){ + throw new BusinessException(); + } + masterUserOrganizationMapsMapper.addUserOrganizationMaps(obj); + } + } + + @Override + public void updateUserOrganizationMaps(UserOrganizationMaps obj) { + userOrganizationMapsMapper.updateUserOrganizationMaps(obj); + UserOrganizationMapsMapper masterUserOrganizationMapsMapper = getSlaveMapper(); + if(null!=masterUserOrganizationMapsMapper){ + masterUserOrganizationMapsMapper.updateUserOrganizationMaps(obj); + } + } + + @Override + public void deleteUserOrganizationMaps(Integer id) { + userOrganizationMapsMapper.deleteUserOrganizationMaps(id); + UserOrganizationMapsMapper masterUserOrganizationMapsMapper = getSlaveMapper(); + if(null!=masterUserOrganizationMapsMapper){ + masterUserOrganizationMapsMapper.deleteUserOrganizationMaps(id); + } + } + + @Override + public UserOrganizationMaps getUserOrganizationMaps(Integer id) { + UserOrganizationMapsMapper masterUserOrganizationMapsMapper = getSlaveMapper(); + if(null!=masterUserOrganizationMapsMapper){ + return masterUserOrganizationMapsMapper.getUserOrganizationMaps(id); + } + return userOrganizationMapsMapper.getUserOrganizationMaps(id); + } + + @Override + public int queryUserOrganizationMapsCount(UserOrganizationMapsQuery query) { + if(getStartUpModel()){ + UserOrganizationMapsMapper masterUserOrganizationMapsMapper = getSlaveMapper(); + if(null!=masterUserOrganizationMapsMapper){ + return masterUserOrganizationMapsMapper.queryUserOrganizationMapsCount(query); + } + } + return userOrganizationMapsMapper.queryUserOrganizationMapsCount(query); + } + + @Override + public List queryUserOrganizationMaps(UserOrganizationMapsQuery query) { + if (query.getNeed() != null) { + query.mysqlBuild(queryUserOrganizationMapsCount(query)); + } + if(getStartUpModel()){ + UserOrganizationMapsMapper masterUserOrganizationMapsMapper = getSlaveMapper(); + if(null!=masterUserOrganizationMapsMapper){ + return masterUserOrganizationMapsMapper.queryUserOrganizationMaps(query); + } + } + return userOrganizationMapsMapper.queryUserOrganizationMaps(query); + } } \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/UserRoleMapsServiceImpl.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/UserRoleMapsServiceImpl.java index 71d3a94..305f9a2 100644 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/UserRoleMapsServiceImpl.java +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/UserRoleMapsServiceImpl.java @@ -1,6 +1,10 @@ package com.lyms.platform.permission.service.impl; -import com.lyms.platform.permission.dao.UserRoleMapsMapper; +import com.lyms.platform.common.exception.BusinessException; +import com.lyms.platform.permission.DataAccessLayerService; +import com.lyms.platform.permission.dao.master.MasterDepartmentsMapper; +import com.lyms.platform.permission.dao.master.MasterUserRoleMapsMapper; +import com.lyms.platform.permission.dao.slave.UserRoleMapsMapper; import com.lyms.platform.permission.model.UserRoleMaps; import com.lyms.platform.permission.model.UserRoleMapsQuery; import com.lyms.platform.permission.service.UserRoleMapsService; @@ -10,46 +14,114 @@ import org.springframework.stereotype.Service; import java.util.List; @Service -public class UserRoleMapsServiceImpl implements UserRoleMapsService { +public class UserRoleMapsServiceImpl extends DataAccessLayerService implements UserRoleMapsService { @Autowired - private UserRoleMapsMapper userRoleMapsMapper; + private MasterUserRoleMapsMapper userRoleMapsMapper; + + public UserRoleMapsMapper getSlaveMapper() { + Object obj1 = getBean(MasterDepartmentsMapper.class); + if (null != obj1) { + UserRoleMapsMapper masterUsersMapper = (UserRoleMapsMapper) obj1; + return masterUsersMapper; + } + return null; + } @Override public void addUserRoleMaps(UserRoleMaps obj) { userRoleMapsMapper.addUserRoleMaps(obj); + + UserRoleMapsMapper masterUserRoleMapsMapper = getSlaveMapper(); + if (null != masterUserRoleMapsMapper) { + if (null == obj.getId()) { + throw new BusinessException(); + } + masterUserRoleMapsMapper.addUserRoleMaps(obj); + } } @Override public void updateUserRoleMaps(UserRoleMaps obj) { userRoleMapsMapper.updateUserRoleMaps(obj); + UserRoleMapsMapper masterUserRoleMapsMapper = getSlaveMapper(); + if (null != masterUserRoleMapsMapper) { + masterUserRoleMapsMapper.updateUserRoleMaps(obj); + } } @Override public void deleteUserRoleMaps(Integer id) { userRoleMapsMapper.deleteUserRoleMaps(id); + UserRoleMapsMapper masterUserRoleMapsMapper = getSlaveMapper(); + if (null != masterUserRoleMapsMapper) { + masterUserRoleMapsMapper.deleteUserRoleMaps(id); + } } @Override public UserRoleMaps getUserRoleMaps(Integer id) { + if (getStartUpModel()) { + UserRoleMapsMapper masterUserRoleMapsMapper = getSlaveMapper(); + if (null != masterUserRoleMapsMapper) { + return masterUserRoleMapsMapper.getUserRoleMaps(id); + } + } return userRoleMapsMapper.getUserRoleMaps(id); } @Override public int queryUserRoleMapsCount(UserRoleMapsQuery query) { + if (getStartUpModel()) { + UserRoleMapsMapper masterUserRoleMapsMapper = getSlaveMapper(); + if (null != masterUserRoleMapsMapper) { + return masterUserRoleMapsMapper.queryUserRoleMapsCount(query); + } + } return userRoleMapsMapper.queryUserRoleMapsCount(query); } - public List queryUserRoleList(UserRoleMapsQuery query){ + + public List queryUserRoleList(UserRoleMapsQuery query) { + if (getStartUpModel()) { + UserRoleMapsMapper masterUserRoleMapsMapper = getSlaveMapper(); + if (null != masterUserRoleMapsMapper) { + return masterUserRoleMapsMapper.queryUserRoleList(query); + } + } return userRoleMapsMapper.queryUserRoleList(query); } + @Override public List queryUserRoleMaps(UserRoleMapsQuery query) { if (query.getNeed() != null) { - query.mysqlBuild(userRoleMapsMapper.queryUserRoleMapsCount(query)); + int count = 0; + if (getStartUpModel()) { + UserRoleMapsMapper masterUserRoleMapsMapper = getSlaveMapper(); + if (null != masterUserRoleMapsMapper) { + count = masterUserRoleMapsMapper.queryUserRoleMapsCount(query); + } + } else { + count = userRoleMapsMapper.queryUserRoleMapsCount(query); + } + + query.mysqlBuild(count); + } + if (getStartUpModel()) { + UserRoleMapsMapper masterUserRoleMapsMapper = getSlaveMapper(); + if (null != masterUserRoleMapsMapper) { + return masterUserRoleMapsMapper.queryUserRoleMaps(query); + } } return userRoleMapsMapper.queryUserRoleMaps(query); } - public List queryUserRoleName(Integer id){ - return userRoleMapsMapper.queryUserRoleName(id); + + public List queryUserRoleName(Integer id) { + if (getStartUpModel()) { + UserRoleMapsMapper masterUserRoleMapsMapper = getSlaveMapper(); + if (null != masterUserRoleMapsMapper) { + return masterUserRoleMapsMapper.queryUserRoleName(id); + } + } + return userRoleMapsMapper.queryUserRoleName(id); } } \ No newline at end of file diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/UsersServiceImpl.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/UsersServiceImpl.java index e85d565..fb67bd9 100644 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/UsersServiceImpl.java +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/UsersServiceImpl.java @@ -1,6 +1,9 @@ package com.lyms.platform.permission.service.impl; -import com.lyms.platform.permission.dao.UsersMapper; +import com.lyms.platform.common.exception.BusinessException; +import com.lyms.platform.permission.DataAccessLayerService; +import com.lyms.platform.permission.dao.master.MasterUsersMapper; +import com.lyms.platform.permission.dao.slave.UsersMapper; import com.lyms.platform.permission.model.Users; import com.lyms.platform.permission.model.UsersQuery; import com.lyms.platform.permission.service.UsersService; @@ -8,32 +11,112 @@ import org.apache.commons.collections.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.Date; import java.util.List; @Service -public class UsersServiceImpl implements UsersService { +public class UsersServiceImpl extends DataAccessLayerService implements UsersService { -@Autowired -private UsersMapper usersMapper; + @Autowired + private MasterUsersMapper usersMapper; -@Override -public void addUsers(Users obj){usersMapper.addUsers(obj);} -@Override -public void updateUsers(Users obj){usersMapper.updateUsers(obj);} -@Override -public void deleteUsers (Integer id){usersMapper.deleteUsers(id);} -@Override -public Users getUsers (Integer id){return usersMapper.getUsers(id);} -@Override -public int queryUsersCount (UsersQuery query){return usersMapper.queryUsersCount(query);} -@Override -public List queryUsers (UsersQuery query){if (query.getNeed() != null) {query.mysqlBuild(usersMapper.queryUsersCount(query));}return usersMapper.queryUsers(query);} + private UsersMapper getMaster() { + Object obj1 = getBean(UsersMapper.class); + if (null != obj1) { + UsersMapper masterUsersMapper = (UsersMapper) obj1; + return masterUsersMapper; + } + return null; + } + + + @Override + public void addUsers(Users obj) { + usersMapper.addUsers(obj); + UsersMapper masterUsersMapper = getMaster(); + if (null != masterUsersMapper) { + if (null == obj.getId()) { + throw new BusinessException(); + } + masterUsersMapper.addUsers(obj); + } + } + + @Override + public void updateUsers(Users obj) { + usersMapper.updateUsers(obj); + UsersMapper masterUsersMapper = getMaster(); + if (null != masterUsersMapper) { + masterUsersMapper.updateUsers(obj); + } + } + + @Override + public void deleteUsers(Integer id) { + + UsersMapper masterUsersMapper = getMaster(); + if (null != masterUsersMapper) { + masterUsersMapper.deleteUsers(id); + } + usersMapper.deleteUsers(id); + } + + @Override + public Users getUsers(Integer id) { + if (getStartUpModel()) { + UsersMapper masterUsersMapper = getMaster(); + if (null != masterUsersMapper) { + return masterUsersMapper.getUsers(id); + } + } + return usersMapper.getUsers(id); + } + + @Override + public int queryUsersCount(UsersQuery query) { + if (getStartUpModel()) { + UsersMapper masterUsersMapper = getMaster(); + if (null != masterUsersMapper) { + return masterUsersMapper.queryUsersCount(query); + } + } + return usersMapper.queryUsersCount(query); + } + + @Override + public List queryUsers(UsersQuery query) { + if (query.getNeed() != null) { + query.mysqlBuild(queryUsersCount(query)); + } + + if (getStartUpModel()) { + UsersMapper masterUsersMapper = getMaster(); + if (null != masterUsersMapper) { + return masterUsersMapper.queryUsers(query); + } + } + + return usersMapper.queryUsers(query); + } @Override public List queryUsers2(UsersQuery query) { if (query.getNeed() != null) { - query.mysqlBuild(usersMapper.queryUsersCount2(query)); + int count = 0; + if (getStartUpModel()) { + UsersMapper masterUsersMapper = getMaster(); + if (null != masterUsersMapper) { + count = masterUsersMapper.queryUsersCount2(query); + } + } else { + usersMapper.queryUsersCount2(query); + } + query.mysqlBuild(count); + } + if (getStartUpModel()) { + UsersMapper masterUsersMapper = getMaster(); + if (null != masterUsersMapper) { + return masterUsersMapper.queryUsers2(query); + } } return usersMapper.queryUsers2(query); } @@ -41,8 +124,17 @@ public List queryUsers (UsersQuery query){if (query.getNeed() != null) {q @Override public Users getUsersByLoginCenterId(Integer id) { - List list =usersMapper.getUsersByLoginCenterId(id); - if(CollectionUtils.isNotEmpty(list)){ + + List list=null; + if (getStartUpModel()) { + UsersMapper masterUsersMapper = getMaster(); + if (null != masterUsersMapper) { + list= masterUsersMapper.getUsersByLoginCenterId(id); + } + }else{ + list = usersMapper.getUsersByLoginCenterId(id); + } + if (CollectionUtils.isNotEmpty(list)) { return list.get(0); } return null; diff --git a/platform-biz-service/src/main/resources/mainOrm/Departments.xml b/platform-biz-service/src/main/resources/mainOrm/Departments.xml deleted file mode 100644 index 367d5ca..0000000 --- a/platform-biz-service/src/main/resources/mainOrm/Departments.xml +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - SELECT LAST_INSERT_ID() -insert into departments (foreign_id,parent_id,name,org_id,description,publish_id,publish_name,yn,modified,created,type,shortCode) values (#{foreignId},#{parentId},#{name},#{orgId},#{description},#{publishId},#{publishName},#{yn},#{modified},#{created},#{type},#{shortCode}) - - - - - update departments - - - parent_id = #{parentId,jdbcType=INTEGER}, - - - name = #{name,jdbcType=VARCHAR}, - - - org_id = #{orgId,jdbcType=INTEGER}, - - - foreign_id = #{foreignId,jdbcType=INTEGER}, - - - description = #{description,jdbcType=VARCHAR}, - - - publish_id = #{publishId,jdbcType=INTEGER}, - - - publish_name = #{publishName,jdbcType=VARCHAR}, - - - yn = #{yn,jdbcType=INTEGER}, - - - modified = #{modified,jdbcType=TIMESTAMP}, - - - created = #{created,jdbcType=TIMESTAMP}, - - - type = #{type,jdbcType=INTEGER}, - - - shortCode = #{shortCode,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=INTEGER} - - - - -delete from departments where id = #{id,jdbcType=INTEGER} - - - - - - - - - order by ${sort} - - limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} - - - - - - - - 1 = 1 - - and id = #{id,jdbcType=INTEGER} - - - and parent_id = #{parentId,jdbcType=INTEGER} - - - and foreign_id = #{foreignId,jdbcType=VARCHAR} - - - and name = #{name,jdbcType=VARCHAR} - - - and org_id = #{orgId,jdbcType=INTEGER} - - - and description = #{description,jdbcType=VARCHAR} - - - and publish_id = #{publishId,jdbcType=INTEGER} - - - and publish_name = #{publishName,jdbcType=VARCHAR} - - - and yn = #{yn,jdbcType=INTEGER} - - - and modified = #{modified,jdbcType=TIMESTAMP} - - - and created = #{created,jdbcType=TIMESTAMP} - - - and type = #{type,jdbcType=INTEGER} - - - and shortCode = #{shortCode,jdbcType=VARCHAR} - - - and name like CONCAT(#{keyword}, '%') - - - and org_id in - - #{item} - - - - - - - - - - - - - \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/Organization.xml b/platform-biz-service/src/main/resources/mainOrm/Organization.xml deleted file mode 100644 index b54cfd6..0000000 --- a/platform-biz-service/src/main/resources/mainOrm/Organization.xml +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - SELECT LAST_INSERT_ID() -insert into organization (foreign_id,name,type,level,area_manage,province_id,city_id,area_id,address,description,publish_id,publish_name,yn,modified,created,shortCode,street_id) -values (#{foreignId},#{name},#{type},#{level},#{areaManage},#{provinceId},#{cityId},#{areaId},#{address},#{description},#{publishId},#{publishName},#{yn},#{modified},#{created},#{shortCode},#{streetId}) - - - - - update organization - - - foreign_id = #{foreignId,jdbcType=VARCHAR}, - - - name = #{name,jdbcType=VARCHAR}, - - - type = #{type,jdbcType=INTEGER}, - - - level = #{level,jdbcType=INTEGER}, - - - area_manage = #{areaManage,jdbcType=INTEGER}, - - - province_id = #{provinceId,jdbcType=INTEGER}, - - - city_id = #{cityId,jdbcType=INTEGER}, - - - area_id = #{areaId,jdbcType=INTEGER}, - - - street_id = #{streetId,jdbcType=INTEGER}, - - - address = #{address,jdbcType=VARCHAR}, - - - description = #{description,jdbcType=VARCHAR}, - - - publish_id = #{publishId,jdbcType=INTEGER}, - - - publish_name = #{publishName,jdbcType=VARCHAR}, - - - yn = #{yn,jdbcType=INTEGER}, - - - modified = #{modified,jdbcType=TIMESTAMP}, - - - created = #{created,jdbcType=TIMESTAMP}, - - - shortCode = #{shortCode,jdbcType=VARCHAR}, - - - status = #{status,jdbcType=INTEGER}, - - - where id = #{id,jdbcType=INTEGER} - - - - -delete from organization where id = #{id,jdbcType=INTEGER} - - - - - - - - - order by ${sort} - - limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} - - - - - - - - 1 = 1 - - and id = #{id,jdbcType=INTEGER} - - - and id in - - #{item} - - - - and foreign_id = #{foreignId,jdbcType=VARCHAR} - - - and name = #{name,jdbcType=VARCHAR} - - - and type = #{type,jdbcType=INTEGER} - - - and level = #{level,jdbcType=INTEGER} - - - and area_manage = #{areaManage,jdbcType=INTEGER} - - - and province_id = #{provinceId,jdbcType=INTEGER} - - - and city_id = #{cityId,jdbcType=INTEGER} - - - and area_id = #{areaId,jdbcType=INTEGER} - - - and street_id = #{streetId,jdbcType=INTEGER} - - - and address = #{address,jdbcType=VARCHAR} - - - and description = #{description,jdbcType=VARCHAR} - - - and publish_id = #{publishId,jdbcType=INTEGER} - - - and publish_name = #{publishName,jdbcType=VARCHAR} - - - and yn = #{yn,jdbcType=INTEGER} - - - and modified = #{modified,jdbcType=TIMESTAMP} - - - and created = #{created,jdbcType=TIMESTAMP} - - - and shortCode = #{shortCode,jdbcType=VARCHAR} - - - and name like CONCAT(#{keyword}, '%') - - - and type in - - #{item} - - - - and province_id in - - #{item} - - - - - and status = #{status,jdbcType=INTEGER} - - - - - - - - - - - - - \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/Permissions.xml b/platform-biz-service/src/main/resources/mainOrm/Permissions.xml deleted file mode 100644 index ca43ec2..0000000 --- a/platform-biz-service/src/main/resources/mainOrm/Permissions.xml +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -insert into permissions (type,module_name,module_code,function_name,function_code,permission_name,action,ext,url,publish_id,publish_name,yn,modified,created,ismenu,weight) values (#{type},#{moduleName},#{moduleCode},#{functionName},#{functionCode},#{permissionName},#{action},#{ext},#{url},#{publishId},#{publishName},#{yn},#{modified},#{created},#{ismenu},#{weight}) - - - - - -update permissions -type = #{type,jdbcType=INTEGER}, - - -module_name = #{moduleName,jdbcType=VARCHAR}, - - -module_code = #{moduleCode,jdbcType=VARCHAR}, - - -function_name = #{functionName,jdbcType=VARCHAR}, - - -function_code = #{functionCode,jdbcType=VARCHAR}, - - -permission_name = #{permissionName,jdbcType=VARCHAR}, - - -action = #{action,jdbcType=VARCHAR}, - - -ext = #{ext,jdbcType=VARCHAR}, - - -url = #{url,jdbcType=VARCHAR}, - - -publish_id = #{publishId,jdbcType=INTEGER}, - - -publish_name = #{publishName,jdbcType=VARCHAR}, - - -yn = #{yn,jdbcType=INTEGER}, - - -modified = #{modified,jdbcType=TIMESTAMP}, - - -created = #{created,jdbcType=TIMESTAMP}, - - -ismenu = #{ismenu,jdbcType=INTEGER}, - - - weight = #{weight,jdbcType=INTEGER}, - - -where id = #{id,jdbcType=INTEGER} - - - - -delete from permissions where id = #{id,jdbcType=INTEGER} - - - - - - - - - -order by weight - -limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} - - - - - - - - - 1 = 1 - -and id = #{id,jdbcType=INTEGER} - - -and type = #{type,jdbcType=INTEGER} - - -and module_name = #{moduleName,jdbcType=VARCHAR} - - -and module_code = #{moduleCode,jdbcType=VARCHAR} - - -and function_name = #{functionName,jdbcType=VARCHAR} - - -and function_code = #{functionCode,jdbcType=VARCHAR} - - -and permission_name = #{permissionName,jdbcType=VARCHAR} - - -and action = #{action,jdbcType=VARCHAR} - - -and ext = #{ext,jdbcType=VARCHAR} - - -and url = #{url,jdbcType=VARCHAR} - - -and publish_id = #{publishId,jdbcType=INTEGER} - - -and publish_name = #{publishName,jdbcType=VARCHAR} - - -and yn = #{yn,jdbcType=INTEGER} - - -and modified = #{modified,jdbcType=TIMESTAMP} - - -and created = #{created,jdbcType=TIMESTAMP} - - -and ismenu = #{ismenu,jdbcType=INTEGER} - - - and weight = #{weight,jdbcType=INTEGER}, - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/Regions.xml b/platform-biz-service/src/main/resources/mainOrm/Regions.xml deleted file mode 100644 index fbe8c94..0000000 --- a/platform-biz-service/src/main/resources/mainOrm/Regions.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - -insert into regions (parent_id,region_name,level) values (#{parentId},#{regionName},#{level}) - - - - - -update regions -parent_id = #{parentId,jdbcType=INTEGER}, - - -region_name = #{regionName,jdbcType=VARCHAR}, - - -level = #{level,jdbcType=INTEGER}, - - -where id = #{id,jdbcType=INTEGER} - - - - -delete from regions where id = #{id,jdbcType=INTEGER} - - - - - - - - - -order by ${sort} - -limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} - - - - - - - - - 1 = 1 - -and id = #{id,jdbcType=INTEGER} - - -and parent_id = #{parentId,jdbcType=INTEGER} - - -and region_name = #{regionName,jdbcType=VARCHAR} - - -and level = #{level,jdbcType=INTEGER} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/RolePermissionMaps.xml b/platform-biz-service/src/main/resources/mainOrm/RolePermissionMaps.xml deleted file mode 100644 index 0ff8ac9..0000000 --- a/platform-biz-service/src/main/resources/mainOrm/RolePermissionMaps.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - -insert into role_permission_maps (role_id,permission_id,yn) values (#{roleId},#{permissionId},#{yn}) - - - - - -update role_permission_maps -role_id = #{roleId,jdbcType=INTEGER}, - - -permission_id = #{permissionId,jdbcType=INTEGER}, - - -yn = #{yn,jdbcType=INTEGER}, - - -where id = #{id,jdbcType=INTEGER} - - - - update role_permission_maps set yn=0 where role_id = #{roleId,jdbcType=INTEGER} - - - -delete from role_permission_maps where id = #{id,jdbcType=INTEGER} - - - - - - - - - -order by ${sort} - -limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} - - - - - - - - - 1 = 1 - -and id = #{id,jdbcType=INTEGER} - - -and role_id = #{roleId,jdbcType=INTEGER} - - -and permission_id = #{permissionId,jdbcType=INTEGER} - - -and yn = #{yn,jdbcType=INTEGER} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/Roles.xml b/platform-biz-service/src/main/resources/mainOrm/Roles.xml deleted file mode 100644 index 7b40477..0000000 --- a/platform-biz-service/src/main/resources/mainOrm/Roles.xml +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - SELECT LAST_INSERT_ID() -insert into roles (type,name,publish_id,publish_name,yn,enable,modified,created,remarks,shortCode,orgid) values (#{type},#{name},#{publishId},#{publishName},#{yn},#{enable},#{modified},#{created},#{remarks},#{shortCode},#{orgid}) - - - - - update roles - - - type = #{type,jdbcType=INTEGER}, - - - name = #{name,jdbcType=VARCHAR}, - - - publish_id = #{publishId,jdbcType=INTEGER}, - - - permissiontype = #{permissiontype,jdbcType=INTEGER}, - - - publish_name = #{publishName,jdbcType=VARCHAR}, - - - yn = #{yn,jdbcType=INTEGER}, - - - enable = #{enable,jdbcType=INTEGER}, - - - modified = #{modified,jdbcType=TIMESTAMP}, - - - created = #{created,jdbcType=TIMESTAMP}, - - - remarks = #{remarks,jdbcType=VARCHAR}, - - - shortCode = #{shortCode,jdbcType=VARCHAR}, - - - orgid =#{orgid,jdbcType=INTEGER}, - - - where id = #{id,jdbcType=INTEGER} - - - - -delete from roles where id = #{id,jdbcType=INTEGER} - - - - - - - - - order by ${sort} - - limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} - - - - - - - - 1 = 1 - - and id = #{id,jdbcType=INTEGER} - - - and type = #{type,jdbcType=INTEGER} - - - and name = #{name,jdbcType=VARCHAR} - - - and publish_id = #{publishId,jdbcType=INTEGER} - - - and publish_name = #{publishName,jdbcType=VARCHAR} - - - and yn = #{yn,jdbcType=INTEGER} - - - and enable = #{enable,jdbcType=INTEGER} - - - and modified = #{modified,jdbcType=TIMESTAMP} - - - and created = #{created,jdbcType=TIMESTAMP} - - - and remarks = #{remarks,jdbcType=VARCHAR} - - - and shortCode = #{shortCode,jdbcType=VARCHAR} - - - and orgId in - - #{item} - - - - and name like CONCAT(#{keyword}, '%') - - - - - - - - - - - - \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/UserOrganizationMaps.xml b/platform-biz-service/src/main/resources/mainOrm/UserOrganizationMaps.xml deleted file mode 100644 index 61a0e09..0000000 --- a/platform-biz-service/src/main/resources/mainOrm/UserOrganizationMaps.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - -insert into user_organization_maps (user_id,org_id,yn,expirTime) values (#{userId},#{orgId},#{yn},#{expirTime}) - - - - - -update user_organization_maps -user_id = #{userId,jdbcType=INTEGER}, - - -org_id = #{orgId,jdbcType=INTEGER}, - - -yn = #{yn,jdbcType=INTEGER}, - - -expirTime = #{expirTime,jdbcType=TIMESTAMP}, - - -where id = #{id,jdbcType=INTEGER} - - - - -delete from user_organization_maps where id = #{id,jdbcType=INTEGER} - - - - - - - - - -order by ${sort} - -limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} - - - - - - - - - 1 = 1 - -and id = #{id,jdbcType=INTEGER} - - -and user_id = #{userId,jdbcType=INTEGER} - - -and org_id = #{orgId,jdbcType=INTEGER} - - -and yn = #{yn,jdbcType=INTEGER} - - -and expirTime = #{expirTime,jdbcType=TIMESTAMP} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/UserRoleMaps.xml b/platform-biz-service/src/main/resources/mainOrm/UserRoleMaps.xml deleted file mode 100644 index 2503488..0000000 --- a/platform-biz-service/src/main/resources/mainOrm/UserRoleMaps.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - -insert into user_role_maps (user_id,role_id,yn,expirTime) values (#{userId},#{roleId},#{yn},#{expirTime}) - - - - - -update user_role_maps -user_id = #{userId,jdbcType=INTEGER}, - - -role_id = #{roleId,jdbcType=INTEGER}, - - -yn = #{yn,jdbcType=INTEGER}, - - -expirTime = #{expirTime,jdbcType=TIMESTAMP}, - - -where id = #{id,jdbcType=INTEGER} - - - - -delete from user_role_maps where id = #{id,jdbcType=INTEGER} - - - - - - - - - -order by ${sort} - -limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} - - - - - - - - - 1 = 1 - -and id = #{id,jdbcType=INTEGER} - - -and user_id = #{userId,jdbcType=INTEGER} - - -and role_id = #{roleId,jdbcType=INTEGER} - - -and yn = #{yn,jdbcType=INTEGER} - - -and expirTime = #{expirTime,jdbcType=TIMESTAMP} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/Users.xml b/platform-biz-service/src/main/resources/mainOrm/Users.xml deleted file mode 100644 index d4d3f37..0000000 --- a/platform-biz-service/src/main/resources/mainOrm/Users.xml +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SELECT LAST_INSERT_ID() -insert into users (foreign_id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time,ks_id,zhiChenId) -values (#{foreignId},#{logincenterId},#{type},#{orgId},#{deptId},#{name},#{account},#{pwd},#{phone},#{publishId},#{publishName},#{yn},#{enable},#{modified},#{created},#{remarks},#{lastLoginTime},#{ksId},#{zhiChenId}) - - - - - update users - - - zhiChenId = #{zhiChenId,jdbcType=INTEGER}, - - - logincenter_id = #{logincenterId,jdbcType=INTEGER}, - - - type = #{type,jdbcType=INTEGER}, - - - org_id = #{orgId,jdbcType=INTEGER}, - - - dept_id = #{deptId,jdbcType=INTEGER}, - - - ks_id = #{ksId,jdbcType=INTEGER}, - - - name = #{name,jdbcType=VARCHAR}, - - - foreign_id = #{foreignId,jdbcType=VARCHAR}, - - - account = #{account,jdbcType=VARCHAR}, - - - pwd = #{pwd,jdbcType=VARCHAR}, - - - phone = #{phone,jdbcType=VARCHAR}, - - - publish_id = #{publishId,jdbcType=INTEGER}, - - - publish_name = #{publishName,jdbcType=VARCHAR}, - - - yn = #{yn,jdbcType=INTEGER}, - - - enable = #{enable,jdbcType=INTEGER}, - - - modified = #{modified,jdbcType=TIMESTAMP}, - - - created = #{created,jdbcType=TIMESTAMP}, - - - remarks = #{remarks,jdbcType=VARCHAR}, - - - last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP}, - - - zhiChenId =#{zhiChenId,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=INTEGER} - - - - -delete from users where id = #{id,jdbcType=INTEGER} - - - - - - - - - - - order by ${sort} - - limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} - - - - - - - - 1 = 1 - - and id = #{id,jdbcType=INTEGER} - - - and logincenter_id = #{logincenterId,jdbcType=INTEGER} - - - and type = #{type,jdbcType=INTEGER} - - - and org_id = #{orgId,jdbcType=INTEGER} - - - and dept_id = #{deptId,jdbcType=INTEGER} - - - and ks_id = #{ksId,jdbcType=INTEGER} - - - and name = #{name,jdbcType=VARCHAR} - - - and foreign_id = #{foreignId,jdbcType=VARCHAR} - - - and account = #{account,jdbcType=VARCHAR} - - - and pwd = #{pwd,jdbcType=VARCHAR} - - - and phone = #{phone,jdbcType=VARCHAR} - - - and publish_id = #{publishId,jdbcType=INTEGER} - - - and publish_name = #{publishName,jdbcType=VARCHAR} - - - and yn = #{yn,jdbcType=INTEGER} - - - and enable = #{enable,jdbcType=INTEGER} - - - and modified = #{modified,jdbcType=TIMESTAMP} - - - and created = #{created,jdbcType=TIMESTAMP} - - - and remarks = #{remarks,jdbcType=VARCHAR} - - - and last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP} - - - and other_account = #{otherAccount,jdbcType=INTEGER} - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/master/MasterDepartments.xml b/platform-biz-service/src/main/resources/mainOrm/master/MasterDepartments.xml new file mode 100644 index 0000000..d7d39a4 --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/master/MasterDepartments.xml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() + insert into departments + (foreign_id,parent_id,name,org_id,description,publish_id,publish_name,yn,modified,created,type,shortCode + + ,id + + + ) values + (#{foreignId},#{parentId},#{name},#{orgId},#{description},#{publishId},#{publishName},#{yn},#{modified},#{created},#{type},#{shortCode} + + ,#{id} + + ) + + + + + update departments + + + parent_id = #{parentId,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + org_id = #{orgId,jdbcType=INTEGER}, + + + foreign_id = #{foreignId,jdbcType=INTEGER}, + + + description = #{description,jdbcType=VARCHAR}, + + + publish_id = #{publishId,jdbcType=INTEGER}, + + + publish_name = #{publishName,jdbcType=VARCHAR}, + + + yn = #{yn,jdbcType=INTEGER}, + + + modified = #{modified,jdbcType=TIMESTAMP}, + + + created = #{created,jdbcType=TIMESTAMP}, + + + type = #{type,jdbcType=INTEGER}, + + + shortCode = #{shortCode,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + +delete from departments where id = #{id,jdbcType=INTEGER} + + + + + + + + + order by ${sort} + + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + 1 = 1 + + and id = #{id,jdbcType=INTEGER} + + + and parent_id = #{parentId,jdbcType=INTEGER} + + + and foreign_id = #{foreignId,jdbcType=VARCHAR} + + + and name = #{name,jdbcType=VARCHAR} + + + and org_id = #{orgId,jdbcType=INTEGER} + + + and description = #{description,jdbcType=VARCHAR} + + + and publish_id = #{publishId,jdbcType=INTEGER} + + + and publish_name = #{publishName,jdbcType=VARCHAR} + + + and yn = #{yn,jdbcType=INTEGER} + + + and modified = #{modified,jdbcType=TIMESTAMP} + + + and created = #{created,jdbcType=TIMESTAMP} + + + and type = #{type,jdbcType=INTEGER} + + + and shortCode = #{shortCode,jdbcType=VARCHAR} + + + and name like CONCAT(#{keyword}, '%') + + + and org_id in + + #{item} + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/master/MasterOrganization.xml b/platform-biz-service/src/main/resources/mainOrm/master/MasterOrganization.xml new file mode 100644 index 0000000..ef95cf7 --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/master/MasterOrganization.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() + insert into organization + (foreign_id,name,type,level,area_manage,province_id,city_id,area_id,address,description,publish_id,publish_name,yn,modified,created,shortCode,street_id + + ,id + + ) + values + (#{foreignId},#{name},#{type},#{level},#{areaManage},#{provinceId},#{cityId},#{areaId},#{address},#{description},#{publishId},#{publishName},#{yn},#{modified},#{created},#{shortCode},#{streetId} + + ,#{id} + + ) + + + + + update organization + + + foreign_id = #{foreignId,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=INTEGER}, + + + level = #{level,jdbcType=INTEGER}, + + + area_manage = #{areaManage,jdbcType=INTEGER}, + + + province_id = #{provinceId,jdbcType=INTEGER}, + + + city_id = #{cityId,jdbcType=INTEGER}, + + + area_id = #{areaId,jdbcType=INTEGER}, + + + street_id = #{streetId,jdbcType=INTEGER}, + + + address = #{address,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + publish_id = #{publishId,jdbcType=INTEGER}, + + + publish_name = #{publishName,jdbcType=VARCHAR}, + + + yn = #{yn,jdbcType=INTEGER}, + + + modified = #{modified,jdbcType=TIMESTAMP}, + + + created = #{created,jdbcType=TIMESTAMP}, + + + shortCode = #{shortCode,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + + +delete from organization where id = #{id,jdbcType=INTEGER} + + + + + + + + + order by ${sort} + + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + 1 = 1 + + and id = #{id,jdbcType=INTEGER} + + + and id in + + #{item} + + + + and foreign_id = #{foreignId,jdbcType=VARCHAR} + + + and name = #{name,jdbcType=VARCHAR} + + + and type = #{type,jdbcType=INTEGER} + + + and level = #{level,jdbcType=INTEGER} + + + and area_manage = #{areaManage,jdbcType=INTEGER} + + + and province_id = #{provinceId,jdbcType=INTEGER} + + + and city_id = #{cityId,jdbcType=INTEGER} + + + and area_id = #{areaId,jdbcType=INTEGER} + + + and street_id = #{streetId,jdbcType=INTEGER} + + + and address = #{address,jdbcType=VARCHAR} + + + and description = #{description,jdbcType=VARCHAR} + + + and publish_id = #{publishId,jdbcType=INTEGER} + + + and publish_name = #{publishName,jdbcType=VARCHAR} + + + and yn = #{yn,jdbcType=INTEGER} + + + and modified = #{modified,jdbcType=TIMESTAMP} + + + and created = #{created,jdbcType=TIMESTAMP} + + + and shortCode = #{shortCode,jdbcType=VARCHAR} + + + and name like CONCAT(#{keyword}, '%') + + + and type in + + #{item} + + + + and province_id in + + #{item} + + + + + and status = #{status,jdbcType=INTEGER} + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/master/MasterPermissions.xml b/platform-biz-service/src/main/resources/mainOrm/master/MasterPermissions.xml new file mode 100644 index 0000000..22fc5ed --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/master/MasterPermissions.xml @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() + insert into permissions + (type,module_name,module_code,function_name,function_code,permission_name,action,ext,url,publish_id,publish_name,yn,modified,created,ismenu,weight + + ,id + + ) values + (#{type},#{moduleName},#{moduleCode},#{functionName},#{functionCode},#{permissionName},#{action},#{ext},#{url},#{publishId},#{publishName},#{yn},#{modified},#{created},#{ismenu},#{weight} + + ,#{id} + + ) + + + + + update permissions + + + type = #{type,jdbcType=INTEGER}, + + + module_name = #{moduleName,jdbcType=VARCHAR}, + + + module_code = #{moduleCode,jdbcType=VARCHAR}, + + + function_name = #{functionName,jdbcType=VARCHAR}, + + + function_code = #{functionCode,jdbcType=VARCHAR}, + + + permission_name = #{permissionName,jdbcType=VARCHAR}, + + + action = #{action,jdbcType=VARCHAR}, + + + ext = #{ext,jdbcType=VARCHAR}, + + + url = #{url,jdbcType=VARCHAR}, + + + publish_id = #{publishId,jdbcType=INTEGER}, + + + publish_name = #{publishName,jdbcType=VARCHAR}, + + + yn = #{yn,jdbcType=INTEGER}, + + + modified = #{modified,jdbcType=TIMESTAMP}, + + + created = #{created,jdbcType=TIMESTAMP}, + + + ismenu = #{ismenu,jdbcType=INTEGER}, + + + weight = #{weight,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + + +delete from permissions where id = #{id,jdbcType=INTEGER} + + + + + + + + + order by weight + + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + 1 = 1 + + and id = #{id,jdbcType=INTEGER} + + + and type = #{type,jdbcType=INTEGER} + + + and module_name = #{moduleName,jdbcType=VARCHAR} + + + and module_code = #{moduleCode,jdbcType=VARCHAR} + + + and function_name = #{functionName,jdbcType=VARCHAR} + + + and function_code = #{functionCode,jdbcType=VARCHAR} + + + and permission_name = #{permissionName,jdbcType=VARCHAR} + + + and action = #{action,jdbcType=VARCHAR} + + + and ext = #{ext,jdbcType=VARCHAR} + + + and url = #{url,jdbcType=VARCHAR} + + + and publish_id = #{publishId,jdbcType=INTEGER} + + + and publish_name = #{publishName,jdbcType=VARCHAR} + + + and yn = #{yn,jdbcType=INTEGER} + + + and modified = #{modified,jdbcType=TIMESTAMP} + + + and created = #{created,jdbcType=TIMESTAMP} + + + and ismenu = #{ismenu,jdbcType=INTEGER} + + + and weight = #{weight,jdbcType=INTEGER}, + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/master/MasterRegions.xml b/platform-biz-service/src/main/resources/mainOrm/master/MasterRegions.xml new file mode 100644 index 0000000..bc3deca --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/master/MasterRegions.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() + insert into regions (parent_id,region_name,level + + ,id + + ) values (#{parentId},#{regionName},#{level} + + ,#{id} + + ) + + + + + update regions + + + parent_id = #{parentId,jdbcType=INTEGER}, + + + region_name = #{regionName,jdbcType=VARCHAR}, + + + level = #{level,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + + +delete from regions where id = #{id,jdbcType=INTEGER} + + + + + + + + + order by ${sort} + + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + 1 = 1 + + and id = #{id,jdbcType=INTEGER} + + + and parent_id = #{parentId,jdbcType=INTEGER} + + + and region_name = #{regionName,jdbcType=VARCHAR} + + + and level = #{level,jdbcType=INTEGER} + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/master/MasterRolePermissionMaps.xml b/platform-biz-service/src/main/resources/mainOrm/master/MasterRolePermissionMaps.xml new file mode 100644 index 0000000..9575e58 --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/master/MasterRolePermissionMaps.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + +insert into role_permission_maps (role_id,permission_id,yn) values (#{roleId},#{permissionId},#{yn}) + + + + + +update role_permission_maps +role_id = #{roleId,jdbcType=INTEGER}, + + +permission_id = #{permissionId,jdbcType=INTEGER}, + + +yn = #{yn,jdbcType=INTEGER}, + + +where id = #{id,jdbcType=INTEGER} + + + + update role_permission_maps set yn=0 where role_id = #{roleId,jdbcType=INTEGER} + + + +delete from role_permission_maps where id = #{id,jdbcType=INTEGER} + + + + + + + + + +order by ${sort} + +limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + + 1 = 1 + +and id = #{id,jdbcType=INTEGER} + + +and role_id = #{roleId,jdbcType=INTEGER} + + +and permission_id = #{permissionId,jdbcType=INTEGER} + + +and yn = #{yn,jdbcType=INTEGER} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/master/MasterRoles.xml b/platform-biz-service/src/main/resources/mainOrm/master/MasterRoles.xml new file mode 100644 index 0000000..cea5d73 --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/master/MasterRoles.xml @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() +insert into roles (type,name,publish_id,publish_name,yn,enable,modified,created,remarks,shortCode,orgid + + ,id + ) values (#{type},#{name},#{publishId},#{publishName},#{yn},#{enable},#{modified},#{created},#{remarks},#{shortCode},#{orgid} + + ,#{id} + + ) + + + + + update roles + + + type = #{type,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + publish_id = #{publishId,jdbcType=INTEGER}, + + + permissiontype = #{permissiontype,jdbcType=INTEGER}, + + + publish_name = #{publishName,jdbcType=VARCHAR}, + + + yn = #{yn,jdbcType=INTEGER}, + + + enable = #{enable,jdbcType=INTEGER}, + + + modified = #{modified,jdbcType=TIMESTAMP}, + + + created = #{created,jdbcType=TIMESTAMP}, + + + remarks = #{remarks,jdbcType=VARCHAR}, + + + shortCode = #{shortCode,jdbcType=VARCHAR}, + + + orgid =#{orgid,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + + +delete from roles where id = #{id,jdbcType=INTEGER} + + + + + + + + + order by ${sort} + + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + 1 = 1 + + and id = #{id,jdbcType=INTEGER} + + + and type = #{type,jdbcType=INTEGER} + + + and name = #{name,jdbcType=VARCHAR} + + + and publish_id = #{publishId,jdbcType=INTEGER} + + + and publish_name = #{publishName,jdbcType=VARCHAR} + + + and yn = #{yn,jdbcType=INTEGER} + + + and enable = #{enable,jdbcType=INTEGER} + + + and modified = #{modified,jdbcType=TIMESTAMP} + + + and created = #{created,jdbcType=TIMESTAMP} + + + and remarks = #{remarks,jdbcType=VARCHAR} + + + and shortCode = #{shortCode,jdbcType=VARCHAR} + + + and orgId in + + #{item} + + + + and name like CONCAT(#{keyword}, '%') + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/master/MasterUserOrganizationMaps.xml b/platform-biz-service/src/main/resources/mainOrm/master/MasterUserOrganizationMaps.xml new file mode 100644 index 0000000..60905d5 --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/master/MasterUserOrganizationMaps.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() + insert into user_organization_maps (user_id,org_id,yn,expirTime + + ,id + + ) values (#{userId},#{orgId},#{yn},#{expirTime} + + ,#{id} + ) + + + + + update user_organization_maps + + + user_id = #{userId,jdbcType=INTEGER}, + + + org_id = #{orgId,jdbcType=INTEGER}, + + + yn = #{yn,jdbcType=INTEGER}, + + + expirTime = #{expirTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + + +delete from user_organization_maps where id = #{id,jdbcType=INTEGER} + + + + + + + + + order by ${sort} + + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + 1 = 1 + + and id = #{id,jdbcType=INTEGER} + + + and user_id = #{userId,jdbcType=INTEGER} + + + and org_id = #{orgId,jdbcType=INTEGER} + + + and yn = #{yn,jdbcType=INTEGER} + + + and expirTime = #{expirTime,jdbcType=TIMESTAMP} + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/master/MasterUserRoleMaps.xml b/platform-biz-service/src/main/resources/mainOrm/master/MasterUserRoleMaps.xml new file mode 100644 index 0000000..3650e5f --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/master/MasterUserRoleMaps.xml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() +insert into user_role_maps (user_id,role_id,yn,expirTime + + ,id + + ) values (#{userId},#{roleId},#{yn},#{expirTime} + + ,#{id} +) + + + + + +update user_role_maps +user_id = #{userId,jdbcType=INTEGER}, + + +role_id = #{roleId,jdbcType=INTEGER}, + + +yn = #{yn,jdbcType=INTEGER}, + + +expirTime = #{expirTime,jdbcType=TIMESTAMP}, + + +where id = #{id,jdbcType=INTEGER} + + + + +delete from user_role_maps where id = #{id,jdbcType=INTEGER} + + + + + + + + + +order by ${sort} + +limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + + 1 = 1 + +and id = #{id,jdbcType=INTEGER} + + +and user_id = #{userId,jdbcType=INTEGER} + + +and role_id = #{roleId,jdbcType=INTEGER} + + +and yn = #{yn,jdbcType=INTEGER} + + +and expirTime = #{expirTime,jdbcType=TIMESTAMP} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/master/MasterUsers.xml b/platform-biz-service/src/main/resources/mainOrm/master/MasterUsers.xml new file mode 100644 index 0000000..900fe05 --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/master/MasterUsers.xml @@ -0,0 +1,304 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() + insert into users + (foreign_id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time,ks_id,zhiChenId + + + ,id + + ) + values + (#{foreignId},#{logincenterId},#{type},#{orgId},#{deptId},#{name},#{account},#{pwd},#{phone},#{publishId},#{publishName},#{yn},#{enable},#{modified},#{created},#{remarks},#{lastLoginTime},#{ksId},#{zhiChenId} + + ,#{id} + + ) + + + + + update users + + + zhiChenId = #{zhiChenId,jdbcType=INTEGER}, + + + logincenter_id = #{logincenterId,jdbcType=INTEGER}, + + + type = #{type,jdbcType=INTEGER}, + + + org_id = #{orgId,jdbcType=INTEGER}, + + + dept_id = #{deptId,jdbcType=INTEGER}, + + + ks_id = #{ksId,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + foreign_id = #{foreignId,jdbcType=VARCHAR}, + + + account = #{account,jdbcType=VARCHAR}, + + + pwd = #{pwd,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + publish_id = #{publishId,jdbcType=INTEGER}, + + + publish_name = #{publishName,jdbcType=VARCHAR}, + + + yn = #{yn,jdbcType=INTEGER}, + + + enable = #{enable,jdbcType=INTEGER}, + + + modified = #{modified,jdbcType=TIMESTAMP}, + + + created = #{created,jdbcType=TIMESTAMP}, + + + remarks = #{remarks,jdbcType=VARCHAR}, + + + last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP}, + + + zhiChenId =#{zhiChenId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + +delete from users where id = #{id,jdbcType=INTEGER} + + + + + + + + + + + order by ${sort} + + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + 1 = 1 + + and id = #{id,jdbcType=INTEGER} + + + and logincenter_id = #{logincenterId,jdbcType=INTEGER} + + + and type = #{type,jdbcType=INTEGER} + + + and org_id = #{orgId,jdbcType=INTEGER} + + + and dept_id = #{deptId,jdbcType=INTEGER} + + + and ks_id = #{ksId,jdbcType=INTEGER} + + + and name = #{name,jdbcType=VARCHAR} + + + and foreign_id = #{foreignId,jdbcType=VARCHAR} + + + and account = #{account,jdbcType=VARCHAR} + + + and pwd = #{pwd,jdbcType=VARCHAR} + + + and phone = #{phone,jdbcType=VARCHAR} + + + and publish_id = #{publishId,jdbcType=INTEGER} + + + and publish_name = #{publishName,jdbcType=VARCHAR} + + + and yn = #{yn,jdbcType=INTEGER} + + + and enable = #{enable,jdbcType=INTEGER} + + + and modified = #{modified,jdbcType=TIMESTAMP} + + + and created = #{created,jdbcType=TIMESTAMP} + + + and remarks = #{remarks,jdbcType=VARCHAR} + + + and last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP} + + + and other_account = #{otherAccount,jdbcType=INTEGER} + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/slave/Departments.xml b/platform-biz-service/src/main/resources/mainOrm/slave/Departments.xml new file mode 100644 index 0000000..631173f --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/slave/Departments.xml @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() + insert into departments (foreign_id,parent_id,name,org_id,description,publish_id,publish_name,yn,modified,created,type,shortCode + + ,id + + + ) values (#{foreignId},#{parentId},#{name},#{orgId},#{description},#{publishId},#{publishName},#{yn},#{modified},#{created},#{type},#{shortCode} + + ,#{id} + + ) + + + + + update departments + + + parent_id = #{parentId,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + org_id = #{orgId,jdbcType=INTEGER}, + + + foreign_id = #{foreignId,jdbcType=INTEGER}, + + + description = #{description,jdbcType=VARCHAR}, + + + publish_id = #{publishId,jdbcType=INTEGER}, + + + publish_name = #{publishName,jdbcType=VARCHAR}, + + + yn = #{yn,jdbcType=INTEGER}, + + + modified = #{modified,jdbcType=TIMESTAMP}, + + + created = #{created,jdbcType=TIMESTAMP}, + + + type = #{type,jdbcType=INTEGER}, + + + shortCode = #{shortCode,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + +delete from departments where id = #{id,jdbcType=INTEGER} + + + + + + + + + order by ${sort} + + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + 1 = 1 + + and id = #{id,jdbcType=INTEGER} + + + and parent_id = #{parentId,jdbcType=INTEGER} + + + and foreign_id = #{foreignId,jdbcType=VARCHAR} + + + and name = #{name,jdbcType=VARCHAR} + + + and org_id = #{orgId,jdbcType=INTEGER} + + + and description = #{description,jdbcType=VARCHAR} + + + and publish_id = #{publishId,jdbcType=INTEGER} + + + and publish_name = #{publishName,jdbcType=VARCHAR} + + + and yn = #{yn,jdbcType=INTEGER} + + + and modified = #{modified,jdbcType=TIMESTAMP} + + + and created = #{created,jdbcType=TIMESTAMP} + + + and type = #{type,jdbcType=INTEGER} + + + and shortCode = #{shortCode,jdbcType=VARCHAR} + + + and name like CONCAT(#{keyword}, '%') + + + and org_id in + + #{item} + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/slave/Organization.xml b/platform-biz-service/src/main/resources/mainOrm/slave/Organization.xml new file mode 100644 index 0000000..f52707b --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/slave/Organization.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() + insert into organization + (foreign_id,name,type,level,area_manage,province_id,city_id,area_id,address,description,publish_id,publish_name,yn,modified,created,shortCode,street_id + + ,id + + ) + values + (#{foreignId},#{name},#{type},#{level},#{areaManage},#{provinceId},#{cityId},#{areaId},#{address},#{description},#{publishId},#{publishName},#{yn},#{modified},#{created},#{shortCode},#{streetId} + + ,#{id} + + ) + + + + + update organization + + + foreign_id = #{foreignId,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=INTEGER}, + + + level = #{level,jdbcType=INTEGER}, + + + area_manage = #{areaManage,jdbcType=INTEGER}, + + + province_id = #{provinceId,jdbcType=INTEGER}, + + + city_id = #{cityId,jdbcType=INTEGER}, + + + area_id = #{areaId,jdbcType=INTEGER}, + + + street_id = #{streetId,jdbcType=INTEGER}, + + + address = #{address,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + publish_id = #{publishId,jdbcType=INTEGER}, + + + publish_name = #{publishName,jdbcType=VARCHAR}, + + + yn = #{yn,jdbcType=INTEGER}, + + + modified = #{modified,jdbcType=TIMESTAMP}, + + + created = #{created,jdbcType=TIMESTAMP}, + + + shortCode = #{shortCode,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + + +delete from organization where id = #{id,jdbcType=INTEGER} + + + + + + + + + order by ${sort} + + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + 1 = 1 + + and id = #{id,jdbcType=INTEGER} + + + and id in + + #{item} + + + + and foreign_id = #{foreignId,jdbcType=VARCHAR} + + + and name = #{name,jdbcType=VARCHAR} + + + and type = #{type,jdbcType=INTEGER} + + + and level = #{level,jdbcType=INTEGER} + + + and area_manage = #{areaManage,jdbcType=INTEGER} + + + and province_id = #{provinceId,jdbcType=INTEGER} + + + and city_id = #{cityId,jdbcType=INTEGER} + + + and area_id = #{areaId,jdbcType=INTEGER} + + + and street_id = #{streetId,jdbcType=INTEGER} + + + and address = #{address,jdbcType=VARCHAR} + + + and description = #{description,jdbcType=VARCHAR} + + + and publish_id = #{publishId,jdbcType=INTEGER} + + + and publish_name = #{publishName,jdbcType=VARCHAR} + + + and yn = #{yn,jdbcType=INTEGER} + + + and modified = #{modified,jdbcType=TIMESTAMP} + + + and created = #{created,jdbcType=TIMESTAMP} + + + and shortCode = #{shortCode,jdbcType=VARCHAR} + + + and name like CONCAT(#{keyword}, '%') + + + and type in + + #{item} + + + + and province_id in + + #{item} + + + + + and status = #{status,jdbcType=INTEGER} + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/slave/Permissions.xml b/platform-biz-service/src/main/resources/mainOrm/slave/Permissions.xml new file mode 100644 index 0000000..6f7c0ad --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/slave/Permissions.xml @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() + insert into permissions + (type,module_name,module_code,function_name,function_code,permission_name,action,ext,url,publish_id,publish_name,yn,modified,created,ismenu,weight + + ,id + + ) values + (#{type},#{moduleName},#{moduleCode},#{functionName},#{functionCode},#{permissionName},#{action},#{ext},#{url},#{publishId},#{publishName},#{yn},#{modified},#{created},#{ismenu},#{weight} + + ,#{id} + + ) + + + + + update permissions + + + type = #{type,jdbcType=INTEGER}, + + + module_name = #{moduleName,jdbcType=VARCHAR}, + + + module_code = #{moduleCode,jdbcType=VARCHAR}, + + + function_name = #{functionName,jdbcType=VARCHAR}, + + + function_code = #{functionCode,jdbcType=VARCHAR}, + + + permission_name = #{permissionName,jdbcType=VARCHAR}, + + + action = #{action,jdbcType=VARCHAR}, + + + ext = #{ext,jdbcType=VARCHAR}, + + + url = #{url,jdbcType=VARCHAR}, + + + publish_id = #{publishId,jdbcType=INTEGER}, + + + publish_name = #{publishName,jdbcType=VARCHAR}, + + + yn = #{yn,jdbcType=INTEGER}, + + + modified = #{modified,jdbcType=TIMESTAMP}, + + + created = #{created,jdbcType=TIMESTAMP}, + + + ismenu = #{ismenu,jdbcType=INTEGER}, + + + weight = #{weight,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + + +delete from permissions where id = #{id,jdbcType=INTEGER} + + + + + + + + + order by weight + + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + 1 = 1 + + and id = #{id,jdbcType=INTEGER} + + + and type = #{type,jdbcType=INTEGER} + + + and module_name = #{moduleName,jdbcType=VARCHAR} + + + and module_code = #{moduleCode,jdbcType=VARCHAR} + + + and function_name = #{functionName,jdbcType=VARCHAR} + + + and function_code = #{functionCode,jdbcType=VARCHAR} + + + and permission_name = #{permissionName,jdbcType=VARCHAR} + + + and action = #{action,jdbcType=VARCHAR} + + + and ext = #{ext,jdbcType=VARCHAR} + + + and url = #{url,jdbcType=VARCHAR} + + + and publish_id = #{publishId,jdbcType=INTEGER} + + + and publish_name = #{publishName,jdbcType=VARCHAR} + + + and yn = #{yn,jdbcType=INTEGER} + + + and modified = #{modified,jdbcType=TIMESTAMP} + + + and created = #{created,jdbcType=TIMESTAMP} + + + and ismenu = #{ismenu,jdbcType=INTEGER} + + + and weight = #{weight,jdbcType=INTEGER}, + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/slave/Regions.xml b/platform-biz-service/src/main/resources/mainOrm/slave/Regions.xml new file mode 100644 index 0000000..f10539f --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/slave/Regions.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() + insert into regions (parent_id,region_name,level + + ,id + + ) values (#{parentId},#{regionName},#{level} + + ,#{id} + + ) + + + + + update regions + + + parent_id = #{parentId,jdbcType=INTEGER}, + + + region_name = #{regionName,jdbcType=VARCHAR}, + + + level = #{level,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + + +delete from regions where id = #{id,jdbcType=INTEGER} + + + + + + + + + order by ${sort} + + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + 1 = 1 + + and id = #{id,jdbcType=INTEGER} + + + and parent_id = #{parentId,jdbcType=INTEGER} + + + and region_name = #{regionName,jdbcType=VARCHAR} + + + and level = #{level,jdbcType=INTEGER} + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/slave/RolePermissionMaps.xml b/platform-biz-service/src/main/resources/mainOrm/slave/RolePermissionMaps.xml new file mode 100644 index 0000000..0397d7d --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/slave/RolePermissionMaps.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + +insert into role_permission_maps (role_id,permission_id,yn) values (#{roleId},#{permissionId},#{yn}) + + + + + +update role_permission_maps +role_id = #{roleId,jdbcType=INTEGER}, + + +permission_id = #{permissionId,jdbcType=INTEGER}, + + +yn = #{yn,jdbcType=INTEGER}, + + +where id = #{id,jdbcType=INTEGER} + + + + update role_permission_maps set yn=0 where role_id = #{roleId,jdbcType=INTEGER} + + + +delete from role_permission_maps where id = #{id,jdbcType=INTEGER} + + + + + + + + + +order by ${sort} + +limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + + 1 = 1 + +and id = #{id,jdbcType=INTEGER} + + +and role_id = #{roleId,jdbcType=INTEGER} + + +and permission_id = #{permissionId,jdbcType=INTEGER} + + +and yn = #{yn,jdbcType=INTEGER} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/slave/Roles.xml b/platform-biz-service/src/main/resources/mainOrm/slave/Roles.xml new file mode 100644 index 0000000..3149edc --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/slave/Roles.xml @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() +insert into roles (type,name,publish_id,publish_name,yn,enable,modified,created,remarks,shortCode,orgid + + ,id + ) values (#{type},#{name},#{publishId},#{publishName},#{yn},#{enable},#{modified},#{created},#{remarks},#{shortCode},#{orgid} + + ,#{id} + + ) + + + + + update roles + + + type = #{type,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + publish_id = #{publishId,jdbcType=INTEGER}, + + + permissiontype = #{permissiontype,jdbcType=INTEGER}, + + + publish_name = #{publishName,jdbcType=VARCHAR}, + + + yn = #{yn,jdbcType=INTEGER}, + + + enable = #{enable,jdbcType=INTEGER}, + + + modified = #{modified,jdbcType=TIMESTAMP}, + + + created = #{created,jdbcType=TIMESTAMP}, + + + remarks = #{remarks,jdbcType=VARCHAR}, + + + shortCode = #{shortCode,jdbcType=VARCHAR}, + + + orgid =#{orgid,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + + +delete from roles where id = #{id,jdbcType=INTEGER} + + + + + + + + + order by ${sort} + + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + 1 = 1 + + and id = #{id,jdbcType=INTEGER} + + + and type = #{type,jdbcType=INTEGER} + + + and name = #{name,jdbcType=VARCHAR} + + + and publish_id = #{publishId,jdbcType=INTEGER} + + + and publish_name = #{publishName,jdbcType=VARCHAR} + + + and yn = #{yn,jdbcType=INTEGER} + + + and enable = #{enable,jdbcType=INTEGER} + + + and modified = #{modified,jdbcType=TIMESTAMP} + + + and created = #{created,jdbcType=TIMESTAMP} + + + and remarks = #{remarks,jdbcType=VARCHAR} + + + and shortCode = #{shortCode,jdbcType=VARCHAR} + + + and orgId in + + #{item} + + + + and name like CONCAT(#{keyword}, '%') + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/slave/UserOrganizationMaps.xml b/platform-biz-service/src/main/resources/mainOrm/slave/UserOrganizationMaps.xml new file mode 100644 index 0000000..1d0f96c --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/slave/UserOrganizationMaps.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() + insert into user_organization_maps (user_id,org_id,yn,expirTime + + ,id + + ) values (#{userId},#{orgId},#{yn},#{expirTime} + + ,#{id} + ) + + + + + update user_organization_maps + + + user_id = #{userId,jdbcType=INTEGER}, + + + org_id = #{orgId,jdbcType=INTEGER}, + + + yn = #{yn,jdbcType=INTEGER}, + + + expirTime = #{expirTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + + +delete from user_organization_maps where id = #{id,jdbcType=INTEGER} + + + + + + + + + order by ${sort} + + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + 1 = 1 + + and id = #{id,jdbcType=INTEGER} + + + and user_id = #{userId,jdbcType=INTEGER} + + + and org_id = #{orgId,jdbcType=INTEGER} + + + and yn = #{yn,jdbcType=INTEGER} + + + and expirTime = #{expirTime,jdbcType=TIMESTAMP} + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/slave/UserRoleMaps.xml b/platform-biz-service/src/main/resources/mainOrm/slave/UserRoleMaps.xml new file mode 100644 index 0000000..14666c0 --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/slave/UserRoleMaps.xml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() +insert into user_role_maps (user_id,role_id,yn,expirTime + + ,id + + ) values (#{userId},#{roleId},#{yn},#{expirTime} + + ,#{id} +) + + + + + +update user_role_maps +user_id = #{userId,jdbcType=INTEGER}, + + +role_id = #{roleId,jdbcType=INTEGER}, + + +yn = #{yn,jdbcType=INTEGER}, + + +expirTime = #{expirTime,jdbcType=TIMESTAMP}, + + +where id = #{id,jdbcType=INTEGER} + + + + +delete from user_role_maps where id = #{id,jdbcType=INTEGER} + + + + + + + + + +order by ${sort} + +limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + + 1 = 1 + +and id = #{id,jdbcType=INTEGER} + + +and user_id = #{userId,jdbcType=INTEGER} + + +and role_id = #{roleId,jdbcType=INTEGER} + + +and yn = #{yn,jdbcType=INTEGER} + + +and expirTime = #{expirTime,jdbcType=TIMESTAMP} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-biz-service/src/main/resources/mainOrm/slave/Users.xml b/platform-biz-service/src/main/resources/mainOrm/slave/Users.xml new file mode 100644 index 0000000..286b144 --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/slave/Users.xml @@ -0,0 +1,302 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() + insert into users + (foreign_id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time,ks_id,zhiChenId + + ,id + + ) + values + (#{foreignId},#{logincenterId},#{type},#{orgId},#{deptId},#{name},#{account},#{pwd},#{phone},#{publishId},#{publishName},#{yn},#{enable},#{modified},#{created},#{remarks},#{lastLoginTime},#{ksId},#{zhiChenId} + + ,#{id} + ) + + + + + update users + + + zhiChenId = #{zhiChenId,jdbcType=INTEGER}, + + + logincenter_id = #{logincenterId,jdbcType=INTEGER}, + + + type = #{type,jdbcType=INTEGER}, + + + org_id = #{orgId,jdbcType=INTEGER}, + + + dept_id = #{deptId,jdbcType=INTEGER}, + + + ks_id = #{ksId,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + foreign_id = #{foreignId,jdbcType=VARCHAR}, + + + account = #{account,jdbcType=VARCHAR}, + + + pwd = #{pwd,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + publish_id = #{publishId,jdbcType=INTEGER}, + + + publish_name = #{publishName,jdbcType=VARCHAR}, + + + yn = #{yn,jdbcType=INTEGER}, + + + enable = #{enable,jdbcType=INTEGER}, + + + modified = #{modified,jdbcType=TIMESTAMP}, + + + created = #{created,jdbcType=TIMESTAMP}, + + + remarks = #{remarks,jdbcType=VARCHAR}, + + + last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP}, + + + zhiChenId =#{zhiChenId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + +delete from users where id = #{id,jdbcType=INTEGER} + + + + + + + + + + + order by ${sort} + + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + 1 = 1 + + and id = #{id,jdbcType=INTEGER} + + + and logincenter_id = #{logincenterId,jdbcType=INTEGER} + + + and type = #{type,jdbcType=INTEGER} + + + and org_id = #{orgId,jdbcType=INTEGER} + + + and dept_id = #{deptId,jdbcType=INTEGER} + + + and ks_id = #{ksId,jdbcType=INTEGER} + + + and name = #{name,jdbcType=VARCHAR} + + + and foreign_id = #{foreignId,jdbcType=VARCHAR} + + + and account = #{account,jdbcType=VARCHAR} + + + and pwd = #{pwd,jdbcType=VARCHAR} + + + and phone = #{phone,jdbcType=VARCHAR} + + + and publish_id = #{publishId,jdbcType=INTEGER} + + + and publish_name = #{publishName,jdbcType=VARCHAR} + + + and yn = #{yn,jdbcType=INTEGER} + + + and enable = #{enable,jdbcType=INTEGER} + + + and modified = #{modified,jdbcType=TIMESTAMP} + + + and created = #{created,jdbcType=TIMESTAMP} + + + and remarks = #{remarks,jdbcType=VARCHAR} + + + and last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP} + + + and other_account = #{otherAccount,jdbcType=INTEGER} + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-operate-api/src/main/resources/database.properties b/platform-operate-api/src/main/resources/database.properties index 9f37816..d428690 100644 --- a/platform-operate-api/src/main/resources/database.properties +++ b/platform-operate-api/src/main/resources/database.properties @@ -19,15 +19,24 @@ mongo.slaveOk=${mongo.slaveOk} +#服务启动方式 1院内单机方式 2 服务器方式# +server.startup=1 -maindata.driver=com.mysql.jdbc.Driver -maindata.jdbcurl=${mysql.jdbcurl} -maindata.username=${mysql.db.name} -maindata.password=${mysql.db.password} +mysql.slave.driver=com.mysql.jdbc.Driver +mysql.slave.jdbcurl=jdbc:mysql://192.168.5.250:3306/platform?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8 +mysql.slave.db.name=platform +mysql.slave.db.password=platform123 maindata.maxpoolsize=5 maindata.initialpoolsize=2 maindata.minpoolsize=2 +#主服务器数据库配置# +mysql.master.db.name=${mysql.db.name} +mysql.master.db.password=${mysql.db.password} +mysql.master.driver=com.mysql.jdbc.Driver +mysql.master.jdbcurl=${mysql.jdbcurl} + + redis.servers=${redis.servers} @@ -39,7 +48,7 @@ login.typeId=2 login.token=265a841b-9bb5-434a-8c2b-e78df86fc45d login.defaultPwd=123456 #1 本地缓存 2 sso登录(需要外网) -run.mode=2 +run.mode=1 mongo.config.replica.set.address=192.168.1.XXX:27017,192.168.1.113.XXX:27018,192.168.1.xxx:27019 diff --git a/platform-operate-api/src/main/resources/spring/applicationContext-dal.xml b/platform-operate-api/src/main/resources/spring/applicationContext-dal.xml index eb65dff..6395f62 100644 --- a/platform-operate-api/src/main/resources/spring/applicationContext-dal.xml +++ b/platform-operate-api/src/main/resources/spring/applicationContext-dal.xml @@ -1,118 +1,149 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - classpath*:mainOrm/*.xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - classpath*:reportOrm/*.xml - - - - - - - - - - - - - - - - - - - - - - - + xmlns:p="http://www.springframework.org/schema/p" + xmlns:tx="http://www.springframework.org/schema/tx" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd + + http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + classpath*:mainOrm/master/*.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + classpath*:mainOrm/slave/*.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + classpath*:reportOrm/*.xml + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- 1.8.3.1