Skip to content

Commit f60fe16

Browse files
committed
Merge branch 'develop'
2 parents 0a401b8 + b56bb72 commit f60fe16

38 files changed

Lines changed: 396 additions & 123 deletions

.dockerignore

Lines changed: 163 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,167 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.sln.docstates
8+
9+
# Build results
10+
11+
[Dd]ebug/
12+
[Rr]elease/
13+
x64/
14+
build/
15+
[Bb]in/
16+
[Oo]bj/
17+
18+
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
19+
!packages/*/build/
20+
21+
# MSTest test Results
22+
[Tt]est[Rr]esult*/
23+
[Bb]uild[Ll]og.*
24+
25+
*_i.c
26+
*_p.c
27+
*.ilk
28+
*.meta
29+
*.obj
30+
*.pch
31+
*.pdb
32+
*.pgc
33+
*.pgd
34+
*.rsp
35+
*.sbr
36+
*.tlb
37+
*.tli
38+
*.tlh
39+
*.tmp
40+
*.tmp_proj
41+
*.log
42+
*.vspscc
43+
*.vssscc
44+
.builds
45+
*.pidb
46+
*.log
47+
*.scc
48+
49+
# Visual C++ cache files
50+
ipch/
51+
*.aps
52+
*.ncb
53+
*.opensdf
54+
*.sdf
55+
*.cachefile
56+
57+
# Visual Studio profiler
58+
*.psess
59+
*.vsp
60+
*.vspx
61+
62+
# Guidance Automation Toolkit
63+
*.gpState
64+
65+
# ReSharper is a .NET coding add-in
66+
_ReSharper*/
67+
*.[Rr]e[Ss]harper
68+
69+
# TeamCity is a build add-in
70+
_TeamCity*
71+
72+
# DotCover is a Code Coverage Tool
73+
*.dotCover
74+
75+
# NCrunch
76+
*.ncrunch*
77+
.*crunch*.local.xml
78+
79+
# Installshield output folder
80+
[Ee]xpress/
81+
82+
# DocProject is a documentation generator add-in
83+
DocProject/buildhelp/
84+
DocProject/Help/*.HxT
85+
DocProject/Help/*.HxC
86+
DocProject/Help/*.hhc
87+
DocProject/Help/*.hhk
88+
DocProject/Help/*.hhp
89+
DocProject/Help/Html2
90+
DocProject/Help/html
91+
92+
# Click-Once directory
93+
publish/
94+
95+
# Publish Web Output
96+
*.Publish.xml
97+
*.pubxml
98+
99+
# NuGet Packages Directory
100+
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
101+
#packages/
102+
103+
# Windows Azure Build Output
104+
csx
105+
*.build.csdef
106+
107+
# Windows Store app package directory
108+
AppPackages/
109+
110+
# Others
111+
sql/
112+
*.Cache
113+
ClientBin/
114+
[Ss]tyle[Cc]op.*
115+
~$*
116+
*~
117+
*.dbmdl
118+
*.[Pp]ublish.xml
119+
*.pfx
120+
*.publishsettings
121+
122+
# RIA/Silverlight projects
123+
Generated_Code/
124+
125+
# Backup & report files from converting an old project file to a newer
126+
# Visual Studio version. Backup files are not needed, because we have git ;-)
127+
_UpgradeReport_Files/
128+
Backup*/
129+
UpgradeLog*.XML
130+
UpgradeLog*.htm
131+
132+
# SQL Server files
133+
App_Data/*.mdf
134+
App_Data/*.ldf
135+
136+
# =========================
137+
# Windows detritus
138+
# =========================
139+
140+
# Windows image file caches
141+
Thumbs.db
142+
ehthumbs.db
143+
144+
# Folder config file
145+
Desktop.ini
146+
147+
# Recycle Bin used on file shares
148+
$RECYCLE.BIN/
149+
150+
# Mac crap
151+
.DS_Store
1152
.git
2153
.svn
3154
.vs
4-
.vscode
5-
bin
6-
obj
155+
*.mdf
156+
*.ldf
157+
src/ZKEACMS.WebHost/wwwroot/UpLoad
158+
src/ZKEACMS.WebHost/wwwroot/Logs
159+
Database/App_Data
7160
node_modules
8-
Release
161+
*.userprefs
162+
/*.userprefs
163+
164+
# ZKEACMS App Data
165+
App_Data/
166+
*.db
167+
/src/ZKEACMS.WebHost/Temp

src/EasyFrameWork/EasyFrameWork.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@
2727
<PackageReference Include="System.Reflection.Extensions" Version="4.3.0" />
2828
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" />
2929
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
30-
<PackageReference Include="YamlDotNet" Version="16.0.0" />
30+
<PackageReference Include="YamlDotNet" Version="16.1.0" />
3131
</ItemGroup>
3232
</Project>

src/EasyFrameWork/StartTask/IStartTask.cs renamed to src/EasyFrameWork/StartTask/IAppStartTask.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace Easy.StartTask
66
{
7-
public interface IStartTask
7+
public interface IAppStartTask
88
{
9-
void Excute();
9+
void OnStartup();
1010
}
1111
}

src/EasyFrameWork/Version.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ public static Version Parse(string version)
147147
return false;
148148
}
149149

150+
public static implicit operator Version(string version)
151+
{
152+
if (string.IsNullOrEmpty(version)) return null;
153+
154+
return Parse(version);
155+
}
156+
150157
public override bool Equals(object obj)
151158
{
152159
if (ReferenceEquals(this, obj))

src/ZKEACMS.GlobalScripts/Models/StatisticsScript.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ protected override void ViewConfigure()
2424
ViewConfig(m => m.Location).AsDropDownList().DataSource(() =>
2525
{
2626
Dictionary<string, string> data = new Dictionary<string, string>();
27-
data.Add(ScriptLocation.Footer.ToString("D"), "Head");
28-
data.Add(ScriptLocation.Header.ToString("D"), "Foot");
27+
data.Add(ScriptLocation.Header.ToString("D"), "Head");
28+
data.Add(ScriptLocation.Footer.ToString("D"), "Foot");
2929
return data;
3030
});
3131
ViewConfig(m => m.Script).AsTextArea();

src/ZKEACMS.Product/Controllers/ProductController.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,11 @@ public JsonResult Sort([FromBody] IEnumerable<ProductEntity> products)
106106
}
107107
public JsonResult GetProducts(int ProductCategoryID)
108108
{
109-
var ids = _productCategoryService.Get(m => m.ParentID == ProductCategoryID || m.ID == ProductCategoryID).Select(m => m.ID);
110-
return Json(Service.Get(m => ids.Contains(m.ProductCategoryID))
109+
var ids = _productCategoryService.Get(m => m.ParentID == ProductCategoryID || m.ID == ProductCategoryID).Select(m => m.ID).ToArray();
110+
return Json(Service.Get(m => ids.Contains(m.ProductCategoryID.Value))
111111
.OrderBy(m => m.OrderIndex)
112-
.ThenByDescending(m => m.ID).Select(m => new { m.ID, m.Title }));
112+
.ThenByDescending(m => m.ID)
113+
.Select(m => new { m.ID, m.Title }));
113114
}
114115
[HttpPost]
115116
public IActionResult ProduceTags(int productId, int ProductCategoryId)

src/ZKEACMS.Product/Service/ProductListWidgetService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public override object Display(WidgetDisplayContext widgetDisplayContext)
9797
else
9898
{
9999
var ids = _productCategoryService.Get(m => m.ID == currentWidget.ProductCategoryID || m.ParentID == currentWidget.ProductCategoryID).Select(m => m.ID).ToList();
100-
filter = m => m.Status == (int)RecordStatus.Active && m.IsPublish && ids.Contains(m.ProductCategoryID);
100+
filter = m => m.Status == (int)RecordStatus.Active && m.IsPublish && ids.Contains(m.ProductCategoryID.Value);
101101
}
102102
if (currentWidget.IsPageable)
103103
{

src/ZKEACMS.Product/Service/ProductUrlService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public IEnumerable<ProductUrl> GetAllPublicUrls()
3636
if (item.DetailPageUrl.IsNotNullAndWhiteSpace() && !excuted.Contains(typeDetail))
3737
{
3838
var ids = _productCategoryService.Get(m => m.ID == item.ProductCategoryID || m.ParentID == item.ProductCategoryID).Select(m => m.ID).ToList();
39-
var products = _productService.Get(m => m.IsPublish && ids.Contains(m.ProductCategoryID));
39+
var products = _productService.Get(m => m.IsPublish && ids.Contains(m.ProductCategoryID.Value));
4040
foreach (var product in products)
4141
{
4242
string post = product.Url.IsNullOrWhiteSpace() ? $"post-{product.ID}" : product.Url;
@@ -66,8 +66,8 @@ public string[] GetPublicUrl(int ID)
6666

6767
public string[] GetPublicUrl(ProductEntity product)
6868
{
69-
int categoryId = product.ProductCategoryID;
70-
if (categoryId == 0) return null;
69+
var categoryId = product.ProductCategoryID;
70+
if ((categoryId ?? 0) == 0) return null;
7171

7272
ProductCategory productCategory = _productCategoryService.Get(categoryId);
7373

src/ZKEACMS.Swagger/ZKEACMS.Swagger.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.7.0" />
19+
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.7.3" />
2020
<ProjectReference Include="..\ZKEACMS\ZKEACMS.csproj">
2121
<Private>false</Private>
2222
<ExcludeAssets>runtime</ExcludeAssets>

src/ZKEACMS.Updater/ApplicationStartup.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77

88
namespace ZKEACMS.Updater
99
{
10-
public class ApplicationStartup : IStartTask
10+
public class ApplicationStartup : IAppStartTask
1111
{
1212
private readonly IDbUpdaterService _dbUpdaterService;
1313
public ApplicationStartup(IDbUpdaterService dbUpdaterService)
1414
{
1515
_dbUpdaterService = dbUpdaterService;
1616
}
17-
public void Excute()
17+
public void OnStartup()
1818
{
1919
_dbUpdaterService.UpdateDatabase();
2020
}

0 commit comments

Comments
 (0)