代码优化

master
xiaochanghai 1 year ago
parent 114af793a4
commit 129908badf
  1. 149
      Model/Tiobon.Web.pdm
  2. 2
      Tiobon.Core.Api/Controllers/CommonController.cs
  3. 3
      Tiobon.Core.Api/Controllers/Ghre/Ghre_CourseClassController.cs
  4. 2
      Tiobon.Core.Api/Filter/GlobalActionFilter.cs
  5. 3
      Tiobon.Core.Common/Attribute/QueryFilter.cs
  6. 203
      Tiobon.Core.Common/HttpContextUser/AspNetUser.cs
  7. 28
      Tiobon.Core.Common/HttpContextUser/IUser.cs
  8. 61
      Tiobon.Core.Extensions/Authorizations/Policys/ApiResponseHandler.cs
  9. 132
      Tiobon.Core.Extensions/Middlewares/JwtTokenAuthMiddleware.cs
  10. 157
      Tiobon.Core.Extensions/ServiceExtensions/Authentication_JWTSetup.cs
  11. 8
      Tiobon.Core.Services/CommonServices.cs

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{C294868A-C3F3-41AD-98CC-78B6D4E0CC40}" Label="" LastModificationDate="1715153446" Name="一优开发平台" Objects="6473" Symbols="275" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="15.0.0.2613"?> <?PowerDesigner AppLocale="UTF16" ID="{C294868A-C3F3-41AD-98CC-78B6D4E0CC40}" Label="" LastModificationDate="1715421020" Name="一优开发平台" Objects="6506" Symbols="276" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="15.0.0.2613"?>
<!-- do not edit this file --> <!-- do not edit this file -->
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object"> <Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@ -8555,15 +8555,13 @@ Shadow=0</a:DisplayPreferences>
<o:ReferenceSymbol Id="o105"> <o:ReferenceSymbol Id="o105">
<a:CreationDate>1612889255</a:CreationDate> <a:CreationDate>1612889255</a:CreationDate>
<a:ModificationDate>1612889255</a:ModificationDate> <a:ModificationDate>1612889255</a:ModificationDate>
<a:Rect>((-20242,-4369), (-14842,3431))</a:Rect> <a:Rect>((-17767,-4369), (-17317,3431))</a:Rect>
<a:ListOfPoints>((-17542,-4369),(-17542,3431))</a:ListOfPoints> <a:ListOfPoints>((-17542,-4369),(-17542,3431))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o106"/> <o:TableSymbol Ref="o106"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -8577,15 +8575,13 @@ DESTINATION 0 宋体,9,N</a:FontList>
<o:ReferenceSymbol Id="o109"> <o:ReferenceSymbol Id="o109">
<a:CreationDate>1612889255</a:CreationDate> <a:CreationDate>1612889255</a:CreationDate>
<a:ModificationDate>1612889255</a:ModificationDate> <a:ModificationDate>1612889255</a:ModificationDate>
<a:Rect>((-11673,-4294), (-6273,3506))</a:Rect> <a:Rect>((-9198,-4294), (-8748,3506))</a:Rect>
<a:ListOfPoints>((-8973,-4294),(-8973,3506))</a:ListOfPoints> <a:ListOfPoints>((-8973,-4294),(-8973,3506))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o110"/> <o:TableSymbol Ref="o110"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -8599,15 +8595,13 @@ DESTINATION 0 宋体,9,N</a:FontList>
<o:ReferenceSymbol Id="o113"> <o:ReferenceSymbol Id="o113">
<a:CreationDate>1612889255</a:CreationDate> <a:CreationDate>1612889255</a:CreationDate>
<a:ModificationDate>1612889255</a:ModificationDate> <a:ModificationDate>1612889255</a:ModificationDate>
<a:Rect>((-2651,-4294), (2749,3506))</a:Rect> <a:Rect>((-176,-4294), (274,3506))</a:Rect>
<a:ListOfPoints>((49,-4294),(49,3506))</a:ListOfPoints> <a:ListOfPoints>((49,-4294),(49,3506))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o114"/> <o:TableSymbol Ref="o114"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -8621,15 +8615,13 @@ DESTINATION 0 宋体,9,N</a:FontList>
<o:ReferenceSymbol Id="o117"> <o:ReferenceSymbol Id="o117">
<a:CreationDate>1612889255</a:CreationDate> <a:CreationDate>1612889255</a:CreationDate>
<a:ModificationDate>1612889255</a:ModificationDate> <a:ModificationDate>1612889255</a:ModificationDate>
<a:Rect>((5524,-4068), (10924,3957))</a:Rect> <a:Rect>((7999,-4068), (8449,3957))</a:Rect>
<a:ListOfPoints>((8224,-4068),(8224,3957))</a:ListOfPoints> <a:ListOfPoints>((8224,-4068),(8224,3957))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o118"/> <o:TableSymbol Ref="o118"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -8643,15 +8635,13 @@ DESTINATION 0 宋体,9,N</a:FontList>
<o:ReferenceSymbol Id="o121"> <o:ReferenceSymbol Id="o121">
<a:CreationDate>1612889255</a:CreationDate> <a:CreationDate>1612889255</a:CreationDate>
<a:ModificationDate>1612889255</a:ModificationDate> <a:ModificationDate>1612889255</a:ModificationDate>
<a:Rect>((14899,-4322), (20299,3478))</a:Rect> <a:Rect>((17374,-4322), (17824,3478))</a:Rect>
<a:ListOfPoints>((17599,-4322),(17599,3478))</a:ListOfPoints> <a:ListOfPoints>((17599,-4322),(17599,3478))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o122"/> <o:TableSymbol Ref="o122"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -8665,15 +8655,13 @@ DESTINATION 0 宋体,9,N</a:FontList>
<o:ReferenceSymbol Id="o125"> <o:ReferenceSymbol Id="o125">
<a:CreationDate>1631110453</a:CreationDate> <a:CreationDate>1631110453</a:CreationDate>
<a:ModificationDate>1631713388</a:ModificationDate> <a:ModificationDate>1631713388</a:ModificationDate>
<a:Rect>((-20566,-19163), (-15166,-13538))</a:Rect> <a:Rect>((-18091,-19163), (-17641,-13538))</a:Rect>
<a:ListOfPoints>((-17866,-19163),(-17866,-13538))</a:ListOfPoints> <a:ListOfPoints>((-17866,-19163),(-17866,-13538))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o126"/> <o:TableSymbol Ref="o126"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -8687,15 +8675,13 @@ DESTINATION 0 宋体,9,N</a:FontList>
<o:ReferenceSymbol Id="o129"> <o:ReferenceSymbol Id="o129">
<a:CreationDate>1637073068</a:CreationDate> <a:CreationDate>1637073068</a:CreationDate>
<a:ModificationDate>1637073941</a:ModificationDate> <a:ModificationDate>1637073941</a:ModificationDate>
<a:Rect>((-11774,4837), (-6374,10987))</a:Rect> <a:Rect>((-9299,4837), (-8849,10987))</a:Rect>
<a:ListOfPoints>((-9074,10987),(-9074,4837))</a:ListOfPoints> <a:ListOfPoints>((-9074,10987),(-9074,4837))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o130"/> <o:TableSymbol Ref="o130"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -8709,15 +8695,13 @@ DESTINATION 0 宋体,9,N</a:FontList>
<o:ReferenceSymbol Id="o132"> <o:ReferenceSymbol Id="o132">
<a:CreationDate>1637151949</a:CreationDate> <a:CreationDate>1637151949</a:CreationDate>
<a:ModificationDate>1637151949</a:ModificationDate> <a:ModificationDate>1637151949</a:ModificationDate>
<a:Rect>((-11925,-19688), (-6525,-13538))</a:Rect> <a:Rect>((-9450,-19688), (-9000,-13538))</a:Rect>
<a:ListOfPoints>((-9225,-19688),(-9225,-13538))</a:ListOfPoints> <a:ListOfPoints>((-9225,-19688),(-9225,-13538))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o133"/> <o:TableSymbol Ref="o133"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -8738,7 +8722,6 @@ DESTINATION 0 宋体,9,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -8761,7 +8744,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -8784,7 +8766,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -8807,7 +8788,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -8830,7 +8810,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -8853,7 +8832,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -8876,7 +8854,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -8899,7 +8876,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -8922,7 +8898,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -8945,7 +8920,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -8968,7 +8942,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -8991,7 +8964,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9014,7 +8986,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9037,7 +9008,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9060,7 +9030,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9530,15 +9499,13 @@ Shadow=0</a:DisplayPreferences>
<o:ReferenceSymbol Id="o152"> <o:ReferenceSymbol Id="o152">
<a:CreationDate>1612889277</a:CreationDate> <a:CreationDate>1612889277</a:CreationDate>
<a:ModificationDate>1613576461</a:ModificationDate> <a:ModificationDate>1613576461</a:ModificationDate>
<a:Rect>((-14101,-3539), (-8701,4111))</a:Rect> <a:Rect>((-11626,-3539), (-11176,4111))</a:Rect>
<a:ListOfPoints>((-11401,-3539),(-11401,4111))</a:ListOfPoints> <a:ListOfPoints>((-11401,-3539),(-11401,4111))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o153"/> <o:TableSymbol Ref="o153"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -9552,15 +9519,13 @@ DESTINATION 0 宋体,9,N</a:FontList>
<o:ReferenceSymbol Id="o156"> <o:ReferenceSymbol Id="o156">
<a:CreationDate>1612889277</a:CreationDate> <a:CreationDate>1612889277</a:CreationDate>
<a:ModificationDate>1613576461</a:ModificationDate> <a:ModificationDate>1613576461</a:ModificationDate>
<a:Rect>((-5251,-4424), (149,3901))</a:Rect> <a:Rect>((-2776,-4424), (-2326,3901))</a:Rect>
<a:ListOfPoints>((-2551,-4424),(-2551,3901))</a:ListOfPoints> <a:ListOfPoints>((-2551,-4424),(-2551,3901))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o157"/> <o:TableSymbol Ref="o157"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -9574,15 +9539,13 @@ DESTINATION 0 宋体,9,N</a:FontList>
<o:ReferenceSymbol Id="o160"> <o:ReferenceSymbol Id="o160">
<a:CreationDate>1613576414</a:CreationDate> <a:CreationDate>1613576414</a:CreationDate>
<a:ModificationDate>1613576461</a:ModificationDate> <a:ModificationDate>1613576461</a:ModificationDate>
<a:Rect>((4725,-4050), (10125,3300))</a:Rect> <a:Rect>((7200,-4050), (7650,3300))</a:Rect>
<a:ListOfPoints>((7425,-4050),(7425,3300))</a:ListOfPoints> <a:ListOfPoints>((7425,-4050),(7425,3300))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o161"/> <o:TableSymbol Ref="o161"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -9596,15 +9559,13 @@ DESTINATION 0 宋体,9,N</a:FontList>
<o:ReferenceSymbol Id="o164"> <o:ReferenceSymbol Id="o164">
<a:CreationDate>1613577000</a:CreationDate> <a:CreationDate>1613577000</a:CreationDate>
<a:ModificationDate>1613577004</a:ModificationDate> <a:ModificationDate>1613577004</a:ModificationDate>
<a:Rect>((14288,-4125), (19688,3900))</a:Rect> <a:Rect>((16763,-4125), (17213,3900))</a:Rect>
<a:ListOfPoints>((16988,-4125),(16988,3900))</a:ListOfPoints> <a:ListOfPoints>((16988,-4125),(16988,3900))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o165"/> <o:TableSymbol Ref="o165"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -9618,15 +9579,13 @@ DESTINATION 0 宋体,9,N</a:FontList>
<o:ReferenceSymbol Id="o168"> <o:ReferenceSymbol Id="o168">
<a:CreationDate>1613577204</a:CreationDate> <a:CreationDate>1613577204</a:CreationDate>
<a:ModificationDate>1613869749</a:ModificationDate> <a:ModificationDate>1613869749</a:ModificationDate>
<a:Rect>((22575,-4162), (27975,3563))</a:Rect> <a:Rect>((23888,-4162), (26663,3563))</a:Rect>
<a:ListOfPoints>((23888,-4162),(23888,-300),(26663,-300),(26663,3563))</a:ListOfPoints> <a:ListOfPoints>((23888,-4162),(23888,-300),(26663,-300),(26663,3563))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o169"/> <o:TableSymbol Ref="o169"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -9640,15 +9599,13 @@ DESTINATION 0 宋体,9,N</a:FontList>
<o:ReferenceSymbol Id="o172"> <o:ReferenceSymbol Id="o172">
<a:CreationDate>1618220270</a:CreationDate> <a:CreationDate>1618220270</a:CreationDate>
<a:ModificationDate>1618220270</a:ModificationDate> <a:ModificationDate>1618220270</a:ModificationDate>
<a:Rect>((-23212,-3599), (-17812,3900))</a:Rect> <a:Rect>((-20737,-3599), (-20287,3900))</a:Rect>
<a:ListOfPoints>((-20512,-3599),(-20512,3900))</a:ListOfPoints> <a:ListOfPoints>((-20512,-3599),(-20512,3900))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o173"/> <o:TableSymbol Ref="o173"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -9662,15 +9619,13 @@ DESTINATION 0 宋体,9,N</a:FontList>
<o:ReferenceSymbol Id="o176"> <o:ReferenceSymbol Id="o176">
<a:CreationDate>1618996307</a:CreationDate> <a:CreationDate>1618996307</a:CreationDate>
<a:ModificationDate>1619014022</a:ModificationDate> <a:ModificationDate>1619014022</a:ModificationDate>
<a:Rect>((-22612,-17687), (-17212,-10612))</a:Rect> <a:Rect>((-20137,-17687), (-19687,-10612))</a:Rect>
<a:ListOfPoints>((-19912,-17687),(-19912,-10612))</a:ListOfPoints> <a:ListOfPoints>((-19912,-17687),(-19912,-10612))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o177"/> <o:TableSymbol Ref="o177"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -9691,7 +9646,6 @@ DESTINATION 0 宋体,9,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9714,7 +9668,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9737,7 +9690,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9760,7 +9712,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9783,7 +9734,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9806,7 +9756,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9829,7 +9778,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9852,7 +9800,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9875,7 +9822,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9898,7 +9844,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9921,7 +9866,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9944,7 +9888,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9967,7 +9910,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -9990,7 +9932,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -16467,15 +16408,13 @@ Shadow=0</a:DisplayPreferences>
<o:ReferenceSymbol Id="o458"> <o:ReferenceSymbol Id="o458">
<a:CreationDate>1630078689</a:CreationDate> <a:CreationDate>1630078689</a:CreationDate>
<a:ModificationDate>1630078691</a:ModificationDate> <a:ModificationDate>1630078691</a:ModificationDate>
<a:Rect>((-19875,5199), (-14475,11574))</a:Rect> <a:Rect>((-17400,5199), (-16950,11574))</a:Rect>
<a:ListOfPoints>((-17175,5199),(-17175,11574))</a:ListOfPoints> <a:ListOfPoints>((-17175,5199),(-17175,11574))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o459"/> <o:TableSymbol Ref="o459"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -16496,7 +16435,6 @@ DESTINATION 0 宋体,9,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -16519,7 +16457,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -16989,15 +16926,13 @@ Shadow=0</a:DisplayPreferences>
<o:ReferenceSymbol Id="o465"> <o:ReferenceSymbol Id="o465">
<a:CreationDate>1656491722</a:CreationDate> <a:CreationDate>1656491722</a:CreationDate>
<a:ModificationDate>1656491722</a:ModificationDate> <a:ModificationDate>1656491722</a:ModificationDate>
<a:Rect>((-21449,3675), (-16049,10500))</a:Rect> <a:Rect>((-18974,3675), (-18524,10500))</a:Rect>
<a:ListOfPoints>((-18749,3675),(-18749,10500))</a:ListOfPoints> <a:ListOfPoints>((-18749,3675),(-18749,10500))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o466"/> <o:TableSymbol Ref="o466"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -17011,15 +16946,13 @@ DESTINATION 0 宋体,9,N</a:FontList>
<o:ReferenceSymbol Id="o469"> <o:ReferenceSymbol Id="o469">
<a:CreationDate>1656491854</a:CreationDate> <a:CreationDate>1656491854</a:CreationDate>
<a:ModificationDate>1656491854</a:ModificationDate> <a:ModificationDate>1656491854</a:ModificationDate>
<a:Rect>((-21524,-5550), (-16124,2175))</a:Rect> <a:Rect>((-19049,-5550), (-18599,2175))</a:Rect>
<a:ListOfPoints>((-18824,-5550),(-18824,2175))</a:ListOfPoints> <a:ListOfPoints>((-18824,-5550),(-18824,2175))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle> <a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle> <a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>16711680</a:LineColor> <a:LineColor>16711680</a:LineColor>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>CENTER 0 宋体,9,N <a:FontList> 0 Arial,8,N</a:FontList>
SOURCE 0 宋体,9,N
DESTINATION 0 宋体,9,N</a:FontList>
<c:SourceSymbol> <c:SourceSymbol>
<o:TableSymbol Ref="o470"/> <o:TableSymbol Ref="o470"/>
</c:SourceSymbol> </c:SourceSymbol>
@ -17040,7 +16973,6 @@ DESTINATION 0 宋体,9,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -17063,7 +16995,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -17086,7 +17017,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -17109,7 +17039,6 @@ LABL 0 Arial Unicode MS,8,N</a:FontList>
<a:ShadowColor>12632256</a:ShadowColor> <a:ShadowColor>12632256</a:ShadowColor>
<a:FontList>STRN 0 Arial Unicode MS,8,N <a:FontList>STRN 0 Arial Unicode MS,8,N
DISPNAME 0 宋体,9,N DISPNAME 0 宋体,9,N
OWNRDISPNAME 0 宋体,9,N
Columns 0 宋体,9,N Columns 0 宋体,9,N
TablePkColumns 0 宋体,9,N TablePkColumns 0 宋体,9,N
TableFkColumns 0 宋体,9,N TableFkColumns 0 宋体,9,N
@ -102682,7 +102611,7 @@ Shadow=0</a:DisplayPreferences>
<a:Code>SystemManager7</a:Code> <a:Code>SystemManager7</a:Code>
<a:CreationDate>1248331945</a:CreationDate> <a:CreationDate>1248331945</a:CreationDate>
<a:Creator>Administrator</a:Creator> <a:Creator>Administrator</a:Creator>
<a:ModificationDate>1714120566</a:ModificationDate> <a:ModificationDate>1715421020</a:ModificationDate>
<a:Modifier>Administrator</a:Modifier> <a:Modifier>Administrator</a:Modifier>
<a:Comment>系统管理</a:Comment> <a:Comment>系统管理</a:Comment>
<a:PackageOptionsText>[FolderOptions] <a:PackageOptionsText>[FolderOptions]
@ -104662,7 +104591,7 @@ CheckRequested=Yes</a:PackageOptionsText>
<a:Code>SystemManager11</a:Code> <a:Code>SystemManager11</a:Code>
<a:CreationDate>1713342619</a:CreationDate> <a:CreationDate>1713342619</a:CreationDate>
<a:Creator>Administrator</a:Creator> <a:Creator>Administrator</a:Creator>
<a:ModificationDate>1714120566</a:ModificationDate> <a:ModificationDate>1715421020</a:ModificationDate>
<a:Modifier>Administrator</a:Modifier> <a:Modifier>Administrator</a:Modifier>
<a:DisplayPreferences>[DisplayPreferences] <a:DisplayPreferences>[DisplayPreferences]

@ -5,7 +5,7 @@
/// </summary> /// </summary>
[Produces("application/json")] [Produces("application/json")]
[Route("api/Common")] [Route("api/Common")]
[ApiExplorerSettings(GroupName = Grouping.GroupName_System)] [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_System)]
public class CommonController : BaseApiController public class CommonController : BaseApiController
{ {
private readonly ILogger<TiobonController> _logger; private readonly ILogger<TiobonController> _logger;

@ -10,7 +10,6 @@ namespace Tiobon.Core.Api.Controllers;
[ApiController, GlobalActionFilter] [ApiController, GlobalActionFilter]
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghre)] [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghre)]
public class Ghre_CourseClassController : BaseApiController public class Ghre_CourseClassController : BaseApiController
//public class Ghre_CourseClassController : BaseController<IGhre_CourseClassServices, Ghre_CourseClass, Ghre_CourseClassDto, InsertGhre_CourseClassInput, EditGhre_CourseClassInput>
{ {
protected IGhre_CourseClassServices _service; protected IGhre_CourseClassServices _service;
@ -19,8 +18,6 @@ public class Ghre_CourseClassController : BaseApiController
_service = service; _service = service;
} }
//public Ghre_CourseClassController(IGhre_CourseClassServices service) : base(service) { }
#region 基础接口 #region 基础接口
#region 查询 #region 查询

@ -1,6 +1,4 @@
using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Filters;
using System.Security.Claims;
using Tiobon.Core.Model;
namespace Tiobon.Core.Api.Filter namespace Tiobon.Core.Api.Filter
{ {

@ -119,5 +119,6 @@ public class JsonParam
{ {
public string columnValue { get; set; } public string columnValue { get; set; }
public string operationKey { get; set; } public string operationKey { get; set; }
public string token { get; set; }
} }

@ -1,140 +1,149 @@
using Tiobon.Core.Common.Swagger; using System.IdentityModel.Tokens.Jwt;
using Tiobon.Core.Model; using System.Security.Claims;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using System; using Newtonsoft.Json;
using System.Collections.Generic; using Tiobon.Core.Common.Swagger;
using System.IdentityModel.Tokens.Jwt; using Tiobon.Core.Model;
using System.Linq;
using System.Security.Claims;
namespace Tiobon.Core.Common.HttpContextUser namespace Tiobon.Core.Common.HttpContextUser;
public class AspNetUser : IUser
{ {
public class AspNetUser : IUser private readonly IHttpContextAccessor _accessor;
private readonly ILogger<AspNetUser> _logger;
public AspNetUser(IHttpContextAccessor accessor, ILogger<AspNetUser> logger)
{ {
private readonly IHttpContextAccessor _accessor; _accessor = accessor;
private readonly ILogger<AspNetUser> _logger; _logger = logger;
}
public AspNetUser(IHttpContextAccessor accessor, ILogger<AspNetUser> logger) public string Name => GetName();
private string GetName()
{
if (IsAuthenticated() && _accessor.HttpContext.User.Identity.Name.IsNotEmptyOrNull())
{ {
_accessor = accessor; return _accessor.HttpContext.User.Identity.Name;
_logger = logger;
} }
else
public string Name => GetName();
private string GetName()
{ {
if (IsAuthenticated() && _accessor.HttpContext.User.Identity.Name.IsNotEmptyOrNull()) var token = GetToken();
if (!string.IsNullOrEmpty(token))
{ {
return _accessor.HttpContext.User.Identity.Name; var getNameType = Permissions.IsUseIds4
? "name"
: "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name";
return GetUserInfoFromToken(getNameType, token).FirstOrDefault().ObjToString();
} }
else
{
if (!string.IsNullOrEmpty(GetToken()))
{
var getNameType = Permissions.IsUseIds4
? "name"
: "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name";
return GetUserInfoFromToken(getNameType).FirstOrDefault().ObjToString();
}
}
return "";
} }
public long ID => GetClaimValueByType("jti").FirstOrDefault().ObjToLong(); return "";
public long TenantId => GetClaimValueByType("TenantId").FirstOrDefault().ObjToLong(); }
public bool IsAuthenticated() public long ID => GetClaimValueByType("jti").FirstOrDefault().ObjToLong();
{ public long TenantId => GetClaimValueByType("TenantId").FirstOrDefault().ObjToLong();
return _accessor.HttpContext?.User?.Identity?.IsAuthenticated ?? false;
} public bool IsAuthenticated()
{
return _accessor.HttpContext?.User?.Identity?.IsAuthenticated ?? false;
}
public string GetToken() public string GetToken()
{
var token = _accessor.HttpContext?.Request?.Headers["Authorization"].ObjToString().Replace("Bearer ", "");
if (!token.IsNullOrEmpty())
return token;
//var request = _accessor.HttpContext?.Request;
//if (request != null && request?.Body != null)
//{
// var sr = new StreamReader(request?.Body);
// var BodyData = sr.ReadToEnd();
// var jsonParam = JsonConvert.DeserializeObject<JsonParam>(BodyData);
// if (jsonParam != null && !jsonParam.token.IsNullOrEmpty())
// {
// if (_accessor.HttpContext?.Request?.Headers.Any(x => x.Key == "Authorization") == true)
// _accessor.HttpContext.Request.Headers["Authorization"] = jsonParam.token;
// else
// _accessor.HttpContext.Request.Headers.Add("Authorization", "Bearer " + jsonParam.token);
// return jsonParam.token;
// }
//}
if (_accessor.HttpContext?.IsSuccessSwagger() == true)
{ {
var token = _accessor.HttpContext?.Request?.Headers["Authorization"].ObjToString().Replace("Bearer ", ""); token = _accessor.HttpContext.GetSuccessSwaggerJwt();
if (!token.IsNullOrEmpty()) if (token.IsNotEmptyOrNull())
{ {
if (_accessor.HttpContext.User.Claims.Any(s => s.Type == JwtRegisteredClaimNames.Jti))
return token;
var claims = new ClaimsIdentity(GetClaimsIdentity(token));
_accessor.HttpContext.User.AddIdentity(claims);
return token; return token;
} }
}
if (_accessor.HttpContext?.IsSuccessSwagger() == true) return token;
{ }
token = _accessor.HttpContext.GetSuccessSwaggerJwt();
if (token.IsNotEmptyOrNull())
{
if (_accessor.HttpContext.User.Claims.Any(s => s.Type == JwtRegisteredClaimNames.Jti))
{
return token;
}
var claims = new ClaimsIdentity(GetClaimsIdentity(token));
_accessor.HttpContext.User.AddIdentity(claims);
return token;
}
}
return token; public List<string> GetUserInfoFromToken(string ClaimType, string token)
} {
var jwtHandler = new JwtSecurityTokenHandler();
public List<string> GetUserInfoFromToken(string ClaimType) // token校验
if (token.IsNotEmptyOrNull() && jwtHandler.CanReadToken(token))
{ {
var jwtHandler = new JwtSecurityTokenHandler(); JwtSecurityToken jwtToken = jwtHandler.ReadJwtToken(token);
var token = "";
token = GetToken();
// token校验
if (token.IsNotEmptyOrNull() && jwtHandler.CanReadToken(token))
{
JwtSecurityToken jwtToken = jwtHandler.ReadJwtToken(token);
return (from item in jwtToken.Claims return (from item in jwtToken.Claims
where item.Type == ClaimType where item.Type == ClaimType
select item.Value).ToList(); select item.Value).ToList();
}
return new List<string>() { };
} }
public ServiceResult<string> MessageModel { get; set; } return new List<string>() { };
}
public IEnumerable<Claim> GetClaimsIdentity() public ServiceResult<string> MessageModel { get; set; }
{
if (_accessor.HttpContext == null) return ArraySegment<Claim>.Empty;
if (!IsAuthenticated()) return GetClaimsIdentity(GetToken()); public IEnumerable<Claim> GetClaimsIdentity()
{
if (_accessor.HttpContext == null) return ArraySegment<Claim>.Empty;
var claims = _accessor.HttpContext.User.Claims.ToList(); if (!IsAuthenticated()) return GetClaimsIdentity(GetToken());
var headers = _accessor.HttpContext.Request.Headers;
foreach (var header in headers)
{
claims.Add(new Claim(header.Key, header.Value));
}
return claims; var claims = _accessor.HttpContext.User.Claims.ToList();
var headers = _accessor.HttpContext.Request.Headers;
foreach (var header in headers)
{
claims.Add(new Claim(header.Key, header.Value));
} }
public IEnumerable<Claim> GetClaimsIdentity(string token) return claims;
{ }
var jwtHandler = new JwtSecurityTokenHandler();
// token校验
if (token.IsNotEmptyOrNull() && jwtHandler.CanReadToken(token))
{
var jwtToken = jwtHandler.ReadJwtToken(token);
return jwtToken.Claims; public IEnumerable<Claim> GetClaimsIdentity(string token)
} {
var jwtHandler = new JwtSecurityTokenHandler();
// token校验
if (token.IsNotEmptyOrNull() && jwtHandler.CanReadToken(token))
{
var jwtToken = jwtHandler.ReadJwtToken(token);
return new List<Claim>(); return jwtToken.Claims;
} }
public List<string> GetClaimValueByType(string ClaimType) return new List<Claim>();
{ }
return (from item in GetClaimsIdentity()
public List<string> GetClaimValueByType(string ClaimType)
{
return (from item in GetClaimsIdentity()
where item.Type == ClaimType where item.Type == ClaimType
select item.Value).ToList(); select item.Value).ToList();
}
} }
} }

@ -1,21 +1,19 @@
using System.Collections.Generic; using System.Security.Claims;
using System.Security.Claims;
using Tiobon.Core.Model; using Tiobon.Core.Model;
namespace Tiobon.Core.Common.HttpContextUser namespace Tiobon.Core.Common.HttpContextUser;
public interface IUser
{ {
public interface IUser string Name { get; }
{ long ID { get; }
string Name { get; } long TenantId { get; }
long ID { get; } bool IsAuthenticated();
long TenantId { get; } IEnumerable<Claim> GetClaimsIdentity();
bool IsAuthenticated(); List<string> GetClaimValueByType(string ClaimType);
IEnumerable<Claim> GetClaimsIdentity();
List<string> GetClaimValueByType(string ClaimType);
string GetToken(); string GetToken();
List<string> GetUserInfoFromToken(string ClaimType); List<string> GetUserInfoFromToken(string ClaimType, string token);
ServiceResult<string> MessageModel { get; set; } ServiceResult<string> MessageModel { get; set; }
}
} }

@ -1,50 +1,47 @@
using Tiobon.Core.Model; using System.Text.Encodings.Web;
using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Newtonsoft.Json; using Newtonsoft.Json;
using System;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
using Tiobon.Core.Common.HttpContextUser; using Tiobon.Core.Common.HttpContextUser;
using Tiobon.Core.Model;
namespace Tiobon.Core.AuthHelper namespace Tiobon.Core.AuthHelper;
public class ApiResponseHandler : AuthenticationHandler<AuthenticationSchemeOptions>
{ {
public class ApiResponseHandler : AuthenticationHandler<AuthenticationSchemeOptions> private readonly IUser _user;
public ApiResponseHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock, IUser user) : base(options, logger, encoder, clock)
{ {
private readonly IUser _user; _user = user;
}
public ApiResponseHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock, IUser user) : base(options, logger, encoder, clock) protected override Task<AuthenticateResult> HandleAuthenticateAsync()
{ {
_user = user; throw new NotImplementedException();
} }
protected override Task<AuthenticateResult> HandleAuthenticateAsync() protected override async Task HandleChallengeAsync(AuthenticationProperties properties)
{ {
throw new NotImplementedException(); Response.ContentType = "application/json";
} Response.StatusCode = StatusCodes.Status401Unauthorized;
await Response.WriteAsync(JsonConvert.SerializeObject((new ApiResponse(StatusCode.CODE401)).MessageModel));
}
protected override async Task HandleChallengeAsync(AuthenticationProperties properties) protected override async Task HandleForbiddenAsync(AuthenticationProperties properties)
{
Response.ContentType = "application/json";
if (_user.MessageModel != null)
{ {
Response.ContentType = "application/json"; Response.StatusCode = _user.MessageModel.Status;
Response.StatusCode = StatusCodes.Status401Unauthorized; await Response.WriteAsync(JsonConvert.SerializeObject(_user.MessageModel));
await Response.WriteAsync(JsonConvert.SerializeObject((new ApiResponse(StatusCode.CODE401)).MessageModel));
} }
else
protected override async Task HandleForbiddenAsync(AuthenticationProperties properties)
{ {
Response.ContentType = "application/json"; Response.StatusCode = StatusCodes.Status403Forbidden;
if (_user.MessageModel != null) await Response.WriteAsync(JsonConvert.SerializeObject((new ApiResponse(StatusCode.CODE403)).MessageModel));
{
Response.StatusCode = _user.MessageModel.Status;
await Response.WriteAsync(JsonConvert.SerializeObject(_user.MessageModel));
}
else
{
Response.StatusCode = StatusCodes.Status403Forbidden;
await Response.WriteAsync(JsonConvert.SerializeObject((new ApiResponse(StatusCode.CODE403)).MessageModel));
}
} }
} }
} }

@ -1,91 +1,87 @@
using System; using Microsoft.AspNetCore.Http;
using System.Threading.Tasks;
using Tiobon.Core.AuthHelper.OverWrite; using Tiobon.Core.AuthHelper.OverWrite;
using Microsoft.AspNetCore.Http;
namespace Tiobon.Core.Extensions.Middlewares namespace Tiobon.Core.Extensions.Middlewares;
/// <summary>
/// 中间件
/// 原做为自定义授权中间件
/// 先做检查 header token的使用
/// </summary>
public class JwtTokenAuthMiddleware
{ {
/// <summary> /// <summary>
/// 中间件 ///
/// 原做为自定义授权中间件 /// </summary>
/// 先做检查 header token的使用 private readonly RequestDelegate _next;
/// <summary>
///
/// </summary> /// </summary>
public class JwtTokenAuthMiddleware /// <param name="next"></param>
public JwtTokenAuthMiddleware(RequestDelegate next)
{ {
/// <summary> _next = next;
/// }
/// </summary>
private readonly RequestDelegate _next;
/// <summary>
///
/// </summary>
/// <param name="next"></param>
public JwtTokenAuthMiddleware(RequestDelegate next)
{
_next = next;
}
private void PreProceed(HttpContext next) private void PreProceed(HttpContext next)
{ {
//Console.WriteLine($"{DateTime.Now} middleware invoke preproceed"); //Console.WriteLine($"{DateTime.Now} middleware invoke preproceed");
//... //...
} }
private void PostProceed(HttpContext next) private void PostProceed(HttpContext next)
{ {
//Console.WriteLine($"{DateTime.Now} middleware invoke postproceed"); //Console.WriteLine($"{DateTime.Now} middleware invoke postproceed");
//.... //....
} }
/// <summary>
///
/// </summary>
/// <param name="httpContext"></param>
/// <returns></returns>
public Task Invoke(HttpContext httpContext)
{
PreProceed(httpContext);
/// <summary>
///
/// </summary>
/// <param name="httpContext"></param>
/// <returns></returns>
public Task Invoke(HttpContext httpContext)
{
PreProceed(httpContext);
//检测是否包含'Authorization'请求头
if (!httpContext.Request.Headers.ContainsKey("Authorization"))
{
PostProceed(httpContext);
return _next(httpContext); //检测是否包含'Authorization'请求头
} if (!httpContext.Request.Headers.ContainsKey("Authorization"))
//var tokenHeader = httpContext.Request.Headers["Authorization"].ToString(); {
var tokenHeader = httpContext.Request.Headers["Authorization"].ToString().Replace("Bearer ", ""); PostProceed(httpContext);
try return _next(httpContext);
{ }
if (tokenHeader.Length >= 128) //var tokenHeader = httpContext.Request.Headers["Authorization"].ToString();
{ var tokenHeader = httpContext.Request.Headers["Authorization"].ToString().Replace("Bearer ", "");
//Console.WriteLine($"{DateTime.Now} token :{tokenHeader}");
TokenModelJwt tm = JwtHelper.SerializeJwt(tokenHeader);
//授权
//var claimList = new List<Claim>();
//var claim = new Claim(ClaimTypes.Role, tm.Role);
//claimList.Add(claim);
//var identity = new ClaimsIdentity(claimList);
//var principal = new ClaimsPrincipal(identity);
//httpContext.User = principal;
}
} try
catch (Exception e) {
if (tokenHeader.Length >= 128)
{ {
Console.WriteLine($"{DateTime.Now} middleware wrong:{e.Message}"); //Console.WriteLine($"{DateTime.Now} token :{tokenHeader}");
TokenModelJwt tm = JwtHelper.SerializeJwt(tokenHeader);
//授权
//var claimList = new List<Claim>();
//var claim = new Claim(ClaimTypes.Role, tm.Role);
//claimList.Add(claim);
//var identity = new ClaimsIdentity(claimList);
//var principal = new ClaimsPrincipal(identity);
//httpContext.User = principal;
} }
}
catch (Exception e)
{
Console.WriteLine($"{DateTime.Now} middleware wrong:{e.Message}");
}
PostProceed(httpContext);
PostProceed(httpContext);
return _next(httpContext);
}
return _next(httpContext);
} }
} }

@ -8,104 +8,103 @@ using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt; using System.IdentityModel.Tokens.Jwt;
using System.Text; using System.Text;
namespace Tiobon.Core.Extensions namespace Tiobon.Core.Extensions;
/// <summary>
/// JWT权限 认证服务
/// </summary>
public static class Authentication_JWTSetup
{ {
/// <summary> public static void AddAuthentication_JWTSetup(this IServiceCollection services)
/// JWT权限 认证服务
/// </summary>
public static class Authentication_JWTSetup
{ {
public static void AddAuthentication_JWTSetup(this IServiceCollection services) if (services == null) throw new ArgumentNullException(nameof(services));
{
if (services == null) throw new ArgumentNullException(nameof(services));
var symmetricKeyAsBase64 = AppSecretConfig.Audience_Secret_String; var symmetricKeyAsBase64 = AppSecretConfig.Audience_Secret_String;
var keyByteArray = Encoding.ASCII.GetBytes(symmetricKeyAsBase64); var keyByteArray = Encoding.ASCII.GetBytes(symmetricKeyAsBase64);
var signingKey = new SymmetricSecurityKey(keyByteArray); var signingKey = new SymmetricSecurityKey(keyByteArray);
var Issuer = AppSettings.app(new string[] { "Audience", "Issuer" }); var Issuer = AppSettings.app(new string[] { "Audience", "Issuer" });
var Audience = AppSettings.app(new string[] { "Audience", "Audience" }); var Audience = AppSettings.app(new string[] { "Audience", "Audience" });
var signingCredentials = new SigningCredentials(signingKey, SecurityAlgorithms.HmacSha256); var signingCredentials = new SigningCredentials(signingKey, SecurityAlgorithms.HmacSha256);
// 令牌验证参数 // 令牌验证参数
var tokenValidationParameters = new TokenValidationParameters var tokenValidationParameters = new TokenValidationParameters
{ {
ValidateIssuerSigningKey = true, ValidateIssuerSigningKey = true,
IssuerSigningKey = signingKey, IssuerSigningKey = signingKey,
ValidateIssuer = true, ValidateIssuer = true,
ValidIssuer = Issuer,//发行人 ValidIssuer = Issuer,//发行人
ValidateAudience = true, ValidateAudience = true,
ValidAudience = Audience,//订阅人 ValidAudience = Audience,//订阅人
ValidateLifetime = true, ValidateLifetime = true,
ClockSkew = TimeSpan.FromSeconds(30), ClockSkew = TimeSpan.FromSeconds(30),
RequireExpirationTime = true, RequireExpirationTime = true,
}; };
// 开启Bearer认证 // 开启Bearer认证
services.AddAuthentication(o => services.AddAuthentication(o =>
{ {
o.DefaultScheme = JwtBearerDefaults.AuthenticationScheme; o.DefaultScheme = JwtBearerDefaults.AuthenticationScheme;
o.DefaultChallengeScheme = nameof(ApiResponseHandler); o.DefaultChallengeScheme = nameof(ApiResponseHandler);
o.DefaultForbidScheme = nameof(ApiResponseHandler); o.DefaultForbidScheme = nameof(ApiResponseHandler);
}) })
// 添加JwtBearer服务 // 添加JwtBearer服务
.AddJwtBearer(o => .AddJwtBearer(o =>
{
o.TokenValidationParameters = tokenValidationParameters;
o.Events = new JwtBearerEvents
{ {
o.TokenValidationParameters = tokenValidationParameters; OnMessageReceived = context =>
o.Events = new JwtBearerEvents
{ {
OnMessageReceived = context => var accessToken = context.Request.Query["access_token"];
{
var accessToken = context.Request.Query["access_token"];
// If the request is for our hub... // If the request is for our hub...
var path = context.HttpContext.Request.Path; var path = context.HttpContext.Request.Path;
if (!string.IsNullOrEmpty(accessToken) && if (!string.IsNullOrEmpty(accessToken) &&
(path.StartsWithSegments("/api2/chathub"))) (path.StartsWithSegments("/api2/chathub")))
{
// Read the token out of the query string
context.Token = accessToken;
}
return Task.CompletedTask;
},
OnChallenge = context =>
{ {
context.Response.Headers["Token-Error"] = context.ErrorDescription; // Read the token out of the query string
return Task.CompletedTask; context.Token = accessToken;
}, }
OnAuthenticationFailed = context => return Task.CompletedTask;
},
OnChallenge = context =>
{
context.Response.Headers["Token-Error"] = context.ErrorDescription;
return Task.CompletedTask;
},
OnAuthenticationFailed = context =>
{
var jwtHandler = new JwtSecurityTokenHandler();
var token = context.Request.Headers["Authorization"].ObjToString().Replace("Bearer ", "");
if (token.IsNotEmptyOrNull() && jwtHandler.CanReadToken(token))
{ {
var jwtHandler = new JwtSecurityTokenHandler(); var jwtToken = jwtHandler.ReadJwtToken(token);
var token = context.Request.Headers["Authorization"].ObjToString().Replace("Bearer ", "");
if (token.IsNotEmptyOrNull() && jwtHandler.CanReadToken(token)) if (jwtToken.Issuer != Issuer)
{ {
var jwtToken = jwtHandler.ReadJwtToken(token); context.Response.Headers["Token-Error-Iss"] = "issuer is wrong!";
if (jwtToken.Issuer != Issuer)
{
context.Response.Headers["Token-Error-Iss"] = "issuer is wrong!";
}
if (jwtToken.Audiences.FirstOrDefault() != Audience)
{
context.Response.Headers["Token-Error-Aud"] = "Audience is wrong!";
}
} }
if (jwtToken.Audiences.FirstOrDefault() != Audience)
// 如果过期,则把<是否过期>添加到,返回头信息中
if (context.Exception.GetType() == typeof(SecurityTokenExpiredException))
{ {
context.Response.Headers["Token-Expired"] = "true"; context.Response.Headers["Token-Error-Aud"] = "Audience is wrong!";
} }
return Task.CompletedTask;
} }
};
})
.AddScheme<AuthenticationSchemeOptions, ApiResponseHandler>(nameof(ApiResponseHandler), o => { });
}
// 如果过期,则把<是否过期>添加到,返回头信息中
if (context.Exception.GetType() == typeof(SecurityTokenExpiredException))
{
context.Response.Headers["Token-Expired"] = "true";
}
return Task.CompletedTask;
}
};
})
.AddScheme<AuthenticationSchemeOptions, ApiResponseHandler>(nameof(ApiResponseHandler), o => { });
} }
} }

@ -282,6 +282,14 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon
if (toolbar != null) { toolbar.fnKey = "TBD1YN"; } if (toolbar != null) { toolbar.fnKey = "TBD1YN"; }
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "UpdateYN").FirstOrDefault(); toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "UpdateYN").FirstOrDefault();
if (toolbar != null) { toolbar.fnKey = "TBD2YN"; } if (toolbar != null) { toolbar.fnKey = "TBD2YN"; }
}else if (param.menuName == "F_ExamPaperDraft")
{
var toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "NewYN").FirstOrDefault();
if (toolbar != null) { toolbar.fnKey = "TBD1YN"; }
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "UpdateYN").FirstOrDefault();
if (toolbar != null) { toolbar.fnKey = "TBD2YN"; }
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "DetailYN").FirstOrDefault();
if (toolbar != null) { toolbar.fnKey = "TBD3YN"; }
} }
#endregion #endregion

Loading…
Cancel
Save