We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f64c5bc commit 42db861Copy full SHA for 42db861
APIJSON.NET/APIJSON.NET/appsettings.json
@@ -1,7 +1,7 @@
1
{
2
"ConnectionStrings": {
3
"DbType": 0, //0:MySql,1:SqlServer,2:Sqlite
4
- "ConnectionString": "Server=192.168.2.25;Database=yunwei;Uid=root;Pwd=xmjk;Port=3306;Character Set=utf8;"
+ "ConnectionString": "Server=192.168.2.25;Database=yunwei1.8;Uid=root;Pwd=xmjk;Port=3306;Character Set=utf8;"
5
//"ConnectionString": "Server=119.29.9.25;Port=3306;Database=test;Uid=root;Pwd=1q,2w.3e?;CharSet=UTF8;"
6
},
7
"Authentication": {
@@ -16,8 +16,8 @@
16
17
"name": "role1", //权限名称 唯一
18
"select": { //查询权限
19
- "table": [ "moment", "User", "Comment" ], //可操作的表
20
- "column": [ "*", "*", "*" ], //可操作的字段
+ "table": [ "*" ], //可操作的表
+ "column": [ "*" ], //可操作的字段
21
"where": []
22
23
"update": { //修改权限
APIJSON.NET/APIJSON.NET/wwwroot/index.html
@@ -35,7 +35,7 @@
35
<option value="add">add</option>
36
<option value="edit">edit</option>
37
<option value="remove">remove</option>
38
- <!--<option value="org">org</option>-->
+ <option value="org">org</option>
39
40
</select>
41
<button @click="hpost()">发送请求</button>
APIJSON.NET/APIJSON.NET/wwwroot/js/main.js
@@ -142,12 +142,11 @@
142
143
methods: {
144
hpost: function () {
145
-
146
$.ajax({
147
url: $('#rest-url').val(),
148
type: "POST", dataType: "json",
149
contentType: "application/json;charset=utf-8",
150
- data: $('#vInput').val(),
+ data: $('#vInput').val(),//JSON.stringify($('#vInput').val()),
151
success: function (data) {
152
153
App.jsonhtml = data;
APIJSON.NET/APIJSONCommon/ApiJson.Common.csproj
@@ -2,8 +2,9 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
- <Version>0.0.8</Version>
- <Description>0.0.8 清理SelectTable 支持重载
+ <Version>0.0.10</Version>
+ <Description>0.0.10 处理别名如果为关键字的缺陷
+0.0.8 清理SelectTable 支持重载
8
0.0.7 修复not in的缺陷,增加~ 不等于的支持
9
0.0.6 增加ToSql接口,处理sql注入的情况
10
通用查询组件</Description>
APIJSON.NET/APIJSONCommon/Properties/AssemblyInfo.cs
@@ -5,7 +5,7 @@
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("ApiJson.Common")]
-[assembly: AssemblyDescription("修复not in的缺陷,增加~ 不等于的支持")]
+[assembly: AssemblyDescription("0.0.19 处理别名如果为关键字的缺陷")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
11
[assembly: AssemblyProduct("ApiJson.Common")]
@@ -31,5 +31,5 @@
31
//可以指定所有这些值,也可以使用"生成号"和"修订号"的默认值
32
//通过使用 "*",如下所示:
33
// [assembly: AssemblyVersion("1.0.*")]
34
-[assembly: AssemblyVersion("0.0.7.0")]
-[assembly: AssemblyFileVersion("0.0.7.0")]
+[assembly: AssemblyVersion("0.0.10.0")]
+[assembly: AssemblyFileVersion("0.0.10.0")]
APIJSON.NET/APIJSONCommon/SelectTable.cs
@@ -456,7 +456,10 @@ private ISugarQueryable<ExpandoObject> sugarQueryable(string subtable, string se
456
457
string vakey = va.Key.Trim();
458
string fieldValue = va.Value.ToString();
459
+ if (vakey.StartsWith("@"))
460
+ {
461
+ continue;
462
+ }
463
if (vakey.EndsWith("$"))//模糊查询
464
465
FuzzyQuery(subtable, conModels, va);
@@ -531,10 +534,10 @@ private void ProcessColumn(string subtable, string selectrole, JObject values, I
531
534
532
535
throw new Exception("别名不能超过20个字符");
533
536
}
- str.Append(ziduan[0] + " as " + ReplaceSQLChar(ziduan[1]) + ",");
537
+ str.Append(ziduan[0] + " as `" + ReplaceSQLChar(ziduan[1]) + "`,");
538
539
else
- str.Append(ziduan[0] + ",");
540
+ str.Append("`"+ziduan[0]+"`" + ",");
541
542
543
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments