Skip to content

Commit 02ea361

Browse files
authored
Merge pull request #7 from liaozb/master
Sync
2 parents ce61e3b + eeae0f4 commit 02ea361

File tree

4 files changed

+11
-23
lines changed

4 files changed

+11
-23
lines changed

‎APIJSON.NET/APIJSON.NET/APIJSON.NET.csproj‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,15 @@
1616

1717
<ItemGroup>
1818
<PackageReferenceInclude="AspectCore.Extensions.Reflection"Version="1.2.0" />
19-
<PackageReferenceInclude="Microsoft.AspNetCore.App"Version="2.2.3" />
19+
<PackageReferenceInclude="Microsoft.AspNetCore.App"Version="2.2.4" />
2020
<PackageReferenceInclude="Microsoft.AspNetCore.Authentication.JwtBearer"Version="2.2.0" />
2121
<PackageReferenceInclude="Microsoft.AspNetCore.Cors"Version="2.2.0" />
2222
<PackageReferenceInclude="Microsoft.AspNetCore.Rewrite"Version="2.2.0" />
2323
<PackageReferenceInclude="Microsoft.AspNetCore.Server.Kestrel.Https"Version="2.2.0" />
2424
<PackageReferenceInclude="Microsoft.VisualStudio.Web.CodeGeneration.Design"Version="2.2.3" />
2525
<PackageReferenceInclude="MySql.Data"Version="8.0.15" />
26-
<PackageReferenceInclude="Oracle.ManagedDataAccess.Core"Version="2.18.5" />
27-
<PackageReferenceInclude="SqlKata"Version="1.1.7" />
28-
<PackageReferenceInclude="SqlKata.Execution"Version="1.1.7" />
29-
<PackageReferenceInclude="sqlSugarCore"Version="4.9.9.2" />
26+
<PackageReferenceInclude="Oracle.ManagedDataAccess.Core"Version="2.18.6" />
27+
<PackageReferenceInclude="sqlSugarCore"Version="4.9.9.6" />
3028
<PackageReferenceInclude="Swashbuckle.AspNetCore"Version="4.0.1" />
3129
<PackageReferenceInclude="Swashbuckle.AspNetCore.Annotations"Version="4.0.1" />
3230
<PackageReferenceInclude="Swashbuckle.AspNetCore.Swagger"Version="4.0.1" />

‎APIJSON.NET/APIJSON.NET/Controllers/JsonController.cs‎

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,13 @@ public JsonController(SelectTable _selectTable, DbContext _db,IIdentityService i
3737
/// <returns></returns>
3838
[HttpPost("/get")]
3939

40-
publicActionResultQuery([FromBody]stringjson)
40+
publicActionResultQuery([FromBody]JObjectjobject)
4141
{
42-
json=HttpUtility.UrlDecode(json);
4342
JObjectht=newJObject();
4443
ht.Add("code","200");
4544
ht.Add("msg","success");
4645
try
4746
{
48-
JObjectjobject=JObject.Parse(json);
4947
intpage=0,count=0,query=0,total=0;
5048
foreach(variteminjobject)
5149
{
@@ -178,16 +176,16 @@ public ActionResult Query([FromBody]string json)
178176
/// <param name="json"></param>
179177
/// <returns></returns>
180178
[HttpPost("/add")]
181-
publicActionResultAdd([FromBody]stringjson)
179+
publicActionResultAdd([FromBody]JObjectjobject)
182180
{
183-
json=HttpUtility.UrlDecode(json);
181+
184182
JObjectht=newJObject();
185183
ht.Add("code","200");
186184
ht.Add("msg","success");
187185
try
188186
{
189-
JObjectjobject=JObject.Parse(json);
190-
varsb=newSystem.Text.StringBuilder(100);
187+
188+
191189

192190
foreach(variteminjobject)
193191
{
@@ -222,16 +220,13 @@ public ActionResult Add([FromBody]string json)
222220
/// <param name="json"></param>
223221
/// <returns></returns>
224222
[HttpPost("/edit")]
225-
publicActionResultEdit([FromBody]stringjson)
223+
publicActionResultEdit([FromBody]JObjectjobject)
226224
{
227-
json=HttpUtility.UrlDecode(json);
228225
JObjectht=newJObject();
229226
ht.Add("code","200");
230227
ht.Add("msg","success");
231228
try
232229
{
233-
JObjectjobject=JObject.Parse(json);
234-
235230
foreach(variteminjobject)
236231
{
237232
stringkey=item.Key.Trim();
@@ -276,16 +271,14 @@ public ActionResult Edit([FromBody]string json)
276271
/// <param name="json"></param>
277272
/// <returns></returns>
278273
[HttpPost("/remove")]
279-
publicActionResultRemove([FromBody]stringjson)
274+
publicActionResultRemove([FromBody]JObjectjobject)
280275
{
281-
json=HttpUtility.UrlDecode(json);
282276
JObjectht=newJObject();
283277
ht.Add("code","200");
284278
ht.Add("msg","success");
285279
try
286280
{
287281
varrole=_identitySvc.GetRole();
288-
JObjectjobject=JObject.Parse(json);
289282
foreach(variteminjobject)
290283
{
291284
stringkey=item.Key.Trim();

‎APIJSON.NET/APIJSON.NET/Startup.cs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
usingMicrosoft.Extensions.Configuration;
1313
usingMicrosoft.Extensions.DependencyInjection;
1414
usingMicrosoft.IdentityModel.Tokens;
15-
usingSqlKata.Execution;
1615
usingSwashbuckle.AspNetCore.Swagger;
17-
usingMySql.Data.MySqlClient;
18-
usingSqlKata.Compilers;
1916

2017
publicclassStartup
2118
{

‎APIJSON.NET/APIJSON.NET/wwwroot/js/main.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
url: $('#rest-url').val(),
148148
type: "POST",dataType: "json",
149149
contentType: "application/json;charset=utf-8",
150-
data: JSON.stringify($('#vInput').val()),
150+
data: $('#vInput').val(),
151151
success: function(data){
152152

153153
App.jsonhtml=data;

0 commit comments

Comments
(0)