| | |
| | | <groupId>mysql</groupId> |
| | | <artifactId>mysql-connector-java</artifactId> |
| | | <version>8.0.33</version> |
| | | <scope>runtime</scope> |
| | | </dependency> |
| | | |
| | | |
| | |
| | | */ |
| | | @Data |
| | | @NoArgsConstructor |
| | | @TableName(value = "PLM_PROGRAM_SOURCE") |
| | | @TableName(value = "plm_program_source") |
| | | public class PlmProgramSourceInfo implements Serializable { |
| | | @TableId(value = "id") |
| | | private String id; |
| | |
| | | application: |
| | | name: lxzn-dev-admin |
| | | datasource: |
| | | url: jdbc:mysql://127.0.0.1:3316/lxzn_qlj_nc?useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true |
| | | url: jdbc:mysql://127.0.0.1:3316/lxzn_qlj_nc?serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true&tinyInt1isBit=false&nullCatalogMeansCurrent=true&characterEncoding=utf8 |
| | | username: root |
| | | password: 123456 |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | maxIdle: 3 |
| | | minIdle: 1 |
| | | maxWait: -1 #连接池最大等行时间 -1没有限制 |
| | | database: 5 |
| | | activiti: |
| | | check-process-definitions: true |
| | | database-schema-update: true |
| | | db-history-used: true |
| | | history-level: full |
| | | async-executor-activate: false |
| | | servlet: |
| | | multipart: |
| | | #默认支持文件上传. |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.lxzn.base.dao.DncPassLogMapper"> |
| | | <select id="findDateTimeDay" resultType="DncPassLog" parameterType="String"> |
| | | select top 1 * |
| | | from dnc_pass_log u |
| | | where day_time = #{dayTime} order by create_time desc |
| | | <select id="findDateTimeDay" resultType="com.lxzn.framework.domain.base.DncPassLog" parameterType="String"> |
| | | SELECT * |
| | | FROM dnc_pass_log u |
| | | WHERE day_time = #{dayTime} |
| | | ORDER BY create_time DESC |
| | | LIMIT 1; |
| | | </select> |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.lxzn.nc.dao.ComponentDepartmentMapper"> |
| | | <select id="getDepartPermsByComponentId" resultType="Department" parameterType="String"> |
| | | <select id="getDepartPermsByComponentId" resultType="com.lxzn.framework.domain.ucenter.Department" parameterType="String"> |
| | | select u.depart_id |
| | | , u.depart_name |
| | | , u.depart_code |
| | |
| | | on u.depart_id=p.depart_id |
| | | </select> |
| | | |
| | | <select id="getDepartNonPermsByComponentId" resultType="Department" parameterType="String"> |
| | | <select id="getDepartNonPermsByComponentId" resultType="com.lxzn.framework.domain.ucenter.Department" parameterType="String"> |
| | | select u.depart_id |
| | | , u.depart_name |
| | | , u.depart_code |
| | |
| | | on u.user_id=p.user_id |
| | | </select> |
| | | |
| | | <select id="getUserNonPermsByComponentId" resultType="User" parameterType="String"> |
| | | <select id="getUserNonPermsByComponentId" resultType="com.lxzn.framework.domain.ucenter.User" parameterType="String"> |
| | | select u.user_id |
| | | , u.username |
| | | , u.nickname |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.lxzn.nc.dao.DeviceGroupDepartMapper"> |
| | | <select id="getDepartPermsByGroupId" resultType="Department" parameterType="String"> |
| | | <select id="getDepartPermsByGroupId" resultType="com.lxzn.framework.domain.ucenter.Department" parameterType="String"> |
| | | select u.depart_id |
| | | , u.depart_name |
| | | , u.depart_code |
| | |
| | | on u.depart_id=p.depart_id |
| | | </select> |
| | | |
| | | <select id="getDepartNonPermsByGroupId" resultType="Department" parameterType="String"> |
| | | <select id="getDepartNonPermsByGroupId" resultType="com.lxzn.framework.domain.ucenter.Department" parameterType="String"> |
| | | select u.depart_id |
| | | , u.depart_name |
| | | , u.depart_code |
| | |
| | | where parent_id=#{parentId} and delete_flag=0 |
| | | </select> |
| | | |
| | | <resultMap id="deviceGroupExtPermsMap" type="DeviceGroupExt"> |
| | | <resultMap id="deviceGroupExtPermsMap" type="com.lxzn.framework.domain.nc.ext.DeviceGroupExt"> |
| | | <id column="group_id" property="groupId" /> |
| | | <result column="user_id" property="userId" /> |
| | | <collection column="{parentId=group_id, userId=user_id}" property="children" |
| | | javaType="ArrayList" ofType="DeviceGroupExt" select="getByParentIdAndUserPerms"> |
| | | javaType="ArrayList" ofType="com.lxzn.framework.domain.nc.ext.DeviceGroupExt" select="getByParentIdAndUserPerms"> |
| | | <id column="group_id" property="groupId" /> |
| | | <result column="user_id" property="userId" /> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | <resultMap id="deviceGroupExtPermsMapAs" type="DeviceGroupExt"> |
| | | <resultMap id="deviceGroupExtPermsMapAs" type="com.lxzn.framework.domain.nc.ext.DeviceGroupExt"> |
| | | <id column="group_id" property="groupId" /> |
| | | <association property="parent" column="{id=parent_id}" select="findById"> |
| | | </association> |
| | |
| | | on u.user_id=p.user_id |
| | | </select> |
| | | |
| | | <select id="getUserNonPermsByGroupId" resultType="User" parameterType="String"> |
| | | <select id="getUserNonPermsByGroupId" resultType="com.lxzn.framework.domain.ucenter.User" parameterType="String"> |
| | | select u.user_id |
| | | , u.username |
| | | , u.nickname |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.lxzn.nc.dao.DeviceInfoMapper"> |
| | | <select id="getDeviceByUserPermed" resultType="DeviceInfo" parameterType="String"> |
| | | <select id="getDeviceByUserPermed" resultType="com.lxzn.framework.domain.nc.DeviceInfo" parameterType="String"> |
| | | select d.device_id |
| | | , d.group_id |
| | | , d.device_no |
| | |
| | | on u.user_id=p.user_id |
| | | </select> |
| | | |
| | | <select id="getUserNonPermsByDeviceId" resultType="User" parameterType="String"> |
| | | <select id="getUserNonPermsByDeviceId" resultType="com.lxzn.framework.domain.ucenter.User" parameterType="String"> |
| | | select u.user_id |
| | | , u.username |
| | | , u.nickname |
| | |
| | | <delete id="deleteByDocId"> |
| | | delete from nc_doc_info where doc_id = #{docId} |
| | | </delete> |
| | | <select id="findDocExtList" parameterType="String" resultType="DocInfo"> |
| | | <select id="findDocExtList" parameterType="String" resultType="com.lxzn.framework.domain.nc.DocInfo"> |
| | | select |
| | | u.doc_id |
| | | ,r.classification_id |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="findDeviceDocExtList" parameterType="String" resultType="DocInfo"> |
| | | <select id="findDeviceDocExtList" parameterType="String" resultType="com.lxzn.framework.domain.nc.DocInfo"> |
| | | select |
| | | u.doc_id |
| | | ,r.classification_id |
| | |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | |
| | | <select id="findByAttrAndDocName" parameterType="Map" resultType="DocInfo"> |
| | | <select id="findByAttrAndDocName" parameterType="Map" resultType="com.lxzn.framework.domain.nc.DocInfo"> |
| | | select r.doc_id |
| | | ,r.attribution_id |
| | | ,r.attribution_type |
| | |
| | | where d.delete_flag=0 and d.doc_name=#{docName} and d.doc_suffix=#{docSuffix} |
| | | </select> |
| | | |
| | | <select id="getByDocAttrAndDocId" parameterType="Map" resultType="DocInfo"> |
| | | <select id="getByDocAttrAndDocId" parameterType="Map" resultType="com.lxzn.framework.domain.nc.DocInfo"> |
| | | select r.doc_id |
| | | ,r.attribution_id |
| | | ,r.attribution_type |
| | |
| | | where d.delete_flag=0 |
| | | </select> |
| | | |
| | | <select id="getByDocId" parameterType="String" resultType="DocInfo"> |
| | | <select id="getByDocId" parameterType="String" resultType="com.lxzn.framework.domain.nc.DocInfo"> |
| | | select r.doc_id |
| | | ,r.attribution_id |
| | | ,r.attribution_type |
| | |
| | | <delete id="deleteById"> |
| | | delete from nc_doc_relative where doc_id = #{docId} |
| | | </delete> |
| | | <select id="findDeviceByDocId" resultType="DeviceInfo" parameterType="String"> |
| | | <select id="findDeviceByDocId" resultType="com.lxzn.framework.domain.nc.DeviceInfo" parameterType="String"> |
| | | select d.device_id |
| | | , d.group_id |
| | | , d.device_no |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.lxzn.nc.dao.PartsDepartmentMapper"> |
| | | <select id="getDepartPermsByPartsId" resultType="Department" parameterType="String"> |
| | | <select id="getDepartPermsByPartsId" resultType="com.lxzn.framework.domain.ucenter.Department" parameterType="String"> |
| | | select u.depart_id |
| | | , u.depart_name |
| | | , u.depart_code |
| | |
| | | on u.depart_id=p.depart_id |
| | | </select> |
| | | |
| | | <select id="getDepartNonPermsByProductId" resultType="Department" parameterType="String"> |
| | | <select id="getDepartNonPermsByProductId" resultType="com.lxzn.framework.domain.ucenter.Department" parameterType="String"> |
| | | select u.depart_id |
| | | , u.depart_name |
| | | , u.depart_code |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.lxzn.nc.dao.PartsInfoMapper"> |
| | | <select id="getByUserPerms" resultType="PartsInfo" parameterType="String"> |
| | | <select id="getByUserPerms" resultType="com.lxzn.framework.domain.nc.PartsInfo" parameterType="String"> |
| | | select p.parts_id |
| | | , p.parts_name |
| | | , p.product_id |
| | |
| | | on u.user_id=p.user_id |
| | | </select> |
| | | |
| | | <select id="getUserNonPermsByProductId" resultType="User" parameterType="String"> |
| | | <select id="getUserNonPermsByProductId" resultType="com.lxzn.framework.domain.ucenter.User" parameterType="String"> |
| | | select u.user_id |
| | | , u.username |
| | | , u.nickname |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.lxzn.nc.dao.ProductDepartmentMapper"> |
| | | <select id="getDepartPermsByProductId" resultType="Department" parameterType="String"> |
| | | <select id="getDepartPermsByProductId" resultType="com.lxzn.framework.domain.ucenter.Department" parameterType="String"> |
| | | select u.depart_id |
| | | , u.depart_name |
| | | , u.depart_code |
| | |
| | | on u.depart_id=p.depart_id |
| | | </select> |
| | | |
| | | <select id="getDepartNonPermsByProductId" resultType="Department" parameterType="String"> |
| | | <select id="getDepartNonPermsByProductId" resultType="com.lxzn.framework.domain.ucenter.Department" parameterType="String"> |
| | | select u.depart_id |
| | | , u.depart_name |
| | | , u.depart_code |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.lxzn.nc.dao.ProductInfoMapper"> |
| | | <select id="getByUserPerms" resultType="ProductInfo" parameterType="String"> |
| | | <select id="getByUserPerms" resultType="com.lxzn.framework.domain.nc.ProductInfo" parameterType="String"> |
| | | select p.product_id |
| | | , p.product_no |
| | | , p.product_model |
| | |
| | | on u.user_id=p.user_id |
| | | </select> |
| | | |
| | | <select id="getUserNonPermsByProductId" resultType="User" parameterType="String"> |
| | | <select id="getUserNonPermsByProductId" resultType="com.lxzn.framework.domain.ucenter.User" parameterType="String"> |
| | | select u.user_id |
| | | , u.username |
| | | , u.nickname |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.lxzn.ucenter.dao.ButtonMapper"> |
| | | <select id="getButtonPerms" parameterType="String" resultType="Button"> |
| | | <select id="getButtonPerms" parameterType="String" resultType="com.lxzn.framework.domain.ucenter.Button"> |
| | | select distinct b.button_id |
| | | , b.button_perm |
| | | , b.button_name |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="getMenuButtonPerms" parameterType="java.util.Map" resultType="Button"> |
| | | <select id="getMenuButtonPerms" parameterType="java.util.Map" resultType="com.lxzn.framework.domain.ucenter.Button"> |
| | | select distinct b.button_id |
| | | , b.button_perm |
| | | , b.button_name |
| | |
| | | where u.user_id=#{userId} |
| | | </select> |
| | | |
| | | <select id="getObjectButtonPerms" parameterType="java.util.Map" resultType="Button"> |
| | | <select id="getObjectButtonPerms" parameterType="java.util.Map" resultType="com.lxzn.framework.domain.ucenter.Button"> |
| | | select distinct b.button_id |
| | | , b.button_perm |
| | | , b.button_name |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.lxzn.ucenter.dao.DepartmentMapper"> |
| | | <select id="getUserPermDepart" resultType="Department" parameterType="String"> |
| | | <select id="getUserPermDepart" resultType="com.lxzn.framework.domain.ucenter.Department" parameterType="String"> |
| | | select r.depart_id, r.depart_name, r.depart_code, r.description |
| | | from |
| | | (select depart_id, depart_name, depart_code, description from sys_department where delete_flag=0) r |
| | |
| | | on r.depart_id=ur.depart_id |
| | | </select> |
| | | |
| | | <select id="getUserNonPermDepart" resultType="Department" parameterType="String"> |
| | | <select id="getUserNonPermDepart" resultType="com.lxzn.framework.domain.ucenter.Department" parameterType="String"> |
| | | select r.depart_id, r.depart_name, r.depart_code, r.description |
| | | from (select depart_id, depart_name, depart_code, description from sys_department where delete_flag=0) r |
| | | where r.depart_id not in |
| | |
| | | where delete_flag = 0 and parent_id=#{parentId} |
| | | </select> |
| | | |
| | | <select id="getUserApproveDepart" parameterType="String" resultType="User"> |
| | | <select id="getUserApproveDepart" parameterType="String" resultType="com.lxzn.framework.domain.ucenter.User"> |
| | | select u.user_id |
| | | , u.username |
| | | , u.nickname |
| | |
| | | on u.user_id=d.user_id |
| | | </select> |
| | | |
| | | <select id="getUserNonApproveDepart" parameterType="String" resultType="User"> |
| | | <select id="getUserNonApproveDepart" parameterType="String" resultType="com.lxzn.framework.domain.ucenter.User"> |
| | | select u.user_id |
| | | , u.username |
| | | , u.nickname |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.lxzn.ucenter.dao.MenuMapper"> |
| | | <select id="findByUserId" parameterType="String" resultType="Menu"> |
| | | <select id="findByUserId" parameterType="String" resultType="com.lxzn.framework.domain.ucenter.Menu"> |
| | | select m.menu_id |
| | | , m.perm_code |
| | | , m.menu_name |
| | |
| | | 3、多级关联语句是分开查询的 数据量大的情况下性能低下 |
| | | 4、如果确定级树 可以使用级联查询一次查询 例子: |
| | | --> |
| | | <resultMap id="menuExtBaseResult" type="MenuExt"> |
| | | <resultMap id="menuExtBaseResult" type="com.lxzn.framework.domain.ucenter.ext.MenuExt"> |
| | | <id column="menu_id" property="menuId" /> |
| | | <collection column="menu_id" property="childList" select="findByParentId"> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | <resultMap id="menuExtSingleSelectResult" type="MenuExt"> |
| | | <resultMap id="menuExtSingleSelectResult" type="com.lxzn.framework.domain.ucenter.ext.MenuExt"> |
| | | <id column="menu_id_one" property="menuId" /> |
| | | <result column="perm_code_one" property="permCode" /> |
| | | <result column="menu_name_one" property="menuName" /> |
| | |
| | | <result column="icon_cls_one" property="iconCls" /> |
| | | <result column="priority_one" property="priority" /> |
| | | <result column="rank_level_one" property="rankLevel" /> |
| | | <collection property="childList" ofType="MenuExt"> |
| | | <collection property="childList" ofType="com.lxzn.framework.domain.ucenter.ext.MenuExt"> |
| | | <id column="menu_id_two" property="menuId" /> |
| | | <result column="perm_code_two" property="permCode" /> |
| | | <result column="menu_name_two" property="menuName" /> |
| | |
| | | <result column="icon_cls_two" property="iconCls" /> |
| | | <result column="priority_two" property="priority" /> |
| | | <result column="rank_level_two" property="rankLevel" /> |
| | | <collection property="childList" ofType="MenuExt"> |
| | | <collection property="childList" ofType="com.lxzn.framework.domain.ucenter.ext.MenuExt"> |
| | | <id column="menu_id_three" property="menuId" /> |
| | | <result column="perm_code_three" property="permCode" /> |
| | | <result column="menu_name_three" property="menuName" /> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.lxzn.ucenter.dao.RoleMapper"> |
| | | <select id="getUserPermRole" resultType="Role" parameterType="String"> |
| | | <select id="getUserPermRole" resultType="com.lxzn.framework.domain.ucenter.Role" parameterType="String"> |
| | | select r.role_id, r.role_code, r.role_name, r.description |
| | | from |
| | | (select role_id, role_code, role_name, description from sys_role where delete_flag=0) r |
| | |
| | | on r.role_id=ur.role_id |
| | | </select> |
| | | |
| | | <select id="getUserNonPermRole" resultType="Role" parameterType="String"> |
| | | <select id="getUserNonPermRole" resultType="com.lxzn.framework.domain.ucenter.Role" parameterType="String"> |
| | | select r.role_id, r.role_code, r.role_name, r.description |
| | | from (select role_id, role_code, role_name, description from sys_role where delete_flag=0) r |
| | | where r.role_id not in |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.lxzn.ucenter.dao.UserMapper"> |
| | | <select id="findUserExtByUsername" parameterType="String" resultType="UserExt"> |
| | | <select id="findUserExtByUsername" parameterType="String" resultType="com.lxzn.framework.domain.ucenter.ext.UserExt"> |
| | | select |
| | | u.user_id |
| | | ,u.username |
| | |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | |
| | | <resultMap id="userDepartExt" type="UserDepartExt"> |
| | | <resultMap id="userDepartExt" type="com.lxzn.framework.domain.ucenter.ext.UserDepartExt"> |
| | | <id column="user_id" property="userId" /> |
| | | <collection column="user_id" property="departs" select="com.lxzn.ucenter.dao.DepartmentMapper.getUserPermDepart"> |
| | | </collection> |