Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hg-smart
Commits
1238e013
Commit
1238e013
authored
May 11, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.数据权限调整优化
parent
2a40d612
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
28 deletions
+47
-28
HGCG001.xml
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG001.xml
+1
-21
HGCG002.xml
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG002.xml
+1
-0
HGCG003.xml
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG003.xml
+1
-0
HGXSDataAuth.xml
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSDataAuth.xml
+27
-0
sqlmap-config.xml
src/main/resources/resources/ibatis/sqlmap-config.xml
+17
-0
sqlMapConfig.xml
src/main/resources/sqlMapConfig.xml
+0
-7
No files found.
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG001.xml
View file @
1238e013
...
...
@@ -31,29 +31,9 @@
AUDIT_REASON as "auditReason"
<!-- 审核原因 -->
</sql>
<sql
id=
"authCondition"
>
<!-- 无权限时使用 -->
<isNotEmpty
prepend=
" AND "
property=
"authDepCode"
>
DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
>
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
>
<isNotEmpty
property=
"authOnlyPeople"
>
CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty
property=
"authDepCodes"
>
DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<sql
id=
"condition"
>
AND DELETE_FLAG = 0
<include
refid=
"authCondition"
/>
<include
refid=
"
HGXSDataAuth.
authCondition"
/>
<include
refid=
"idCondition"
/>
<include
refid=
"customCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
...
...
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG002.xml
View file @
1238e013
...
...
@@ -43,6 +43,7 @@
<sql
id=
"condition"
>
AND DELETE_FLAG = 0
<include
refid=
"HGXSDataAuth.authCondition"
/>
<include
refid=
"idCondition"
/>
<include
refid=
"customCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
...
...
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG003.xml
View file @
1238e013
...
...
@@ -37,6 +37,7 @@
<sql
id=
"condition"
>
AND DELETE_FLAG = 0
<include
refid=
"HGXSDataAuth.authCondition"
/>
<include
refid=
"idCondition"
/>
<include
refid=
"customCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
...
...
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSDataAuth.xml
0 → 100644
View file @
1238e013
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGXSDataAuth"
>
<sql
id=
"authCondition"
>
<!-- 无权限时使用 -->
<isNotEmpty
prepend=
" AND "
property=
"authDepCode"
>
DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
>
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
>
<isNotEmpty
property=
"authOnlyPeople"
>
CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty
property=
"authDepCodes"
>
DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
</sqlMap>
src/main/resources/resources/ibatis/sqlmap-config.xml
0 → 100644
View file @
1238e013
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBatis.com//DTD SQL Map Config 2.0//EN" "http://www.iBatis.com/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<properties
resource=
"application.properties"
/>
<settings
useStatementNamespaces=
"true"
/>
<sqlMap
resource=
"resources/ibatis/Dummy.xml"
/>
<!-- 数据权限 -->
<sqlMap
resource=
"com/baosight/hggp/hg/xs/sql/HGXSDataAuth.xml"
/>
<!-- 采购 -->
<sqlMap
resource=
"com/baosight/hggp/hg/cg/sql/HGCG001.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cg/sql/HGCG002.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cg/sql/HGCG003.xml"
/>
</sqlMapConfig>
src/main/resources/sqlMapConfig.xml
deleted
100644 → 0
View file @
2a40d612
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBatis.com//DTD SQL Map Config 2.0//EN" "http://www.iBatis.com/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<sqlMap
resource=
"com/baosight/hpjx/hp/sb/sql/tHpsb001.xml"
/>
<sqlMap
resource=
"com/baosight/hpjx/hp/sb/sql/tHpsb002.xml"
/>
</sqlMapConfig>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment