Like 参数问题解决

pull/1/head
潘建东 9 months ago
parent e060777868
commit 83585e3ca4

@ -39,13 +39,35 @@ namespace ZKLT.Hadoop.API
#region Cors¿çÓò #region Cors¿çÓò
app.UseCors("all"); app.UseCors("all");
#endregion #endregion
app.UseHadoop((c) => {
c.Host = "172.17.0.1"; //app.UseHadoop((c) =>
//{
// c.Host = "127.0.0.1";
// c.Account = "root";
// c.PassWord = "root";
// c.Key = "devdb";
// c.Port = 3306;
//});
//app.UseHadoop((c) =>
//{
// c.Host = "172.17.0.1";
// c.Account = "root";
// c.PassWord = "root";
// c.Key = "testdb";
// c.Port = 4000;
//});
app.UseHadoop((c) =>
{
c.Host = "118.195.165.218";
c.Account = "root"; c.Account = "root";
c.PassWord = "root"; c.PassWord = "root";
c.Key = "testdb"; c.Key = "testdb";
c.Port = 4000; c.Port = 4000;
}); });
// Configure the HTTP request pipeline. // Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment()) if (app.Environment.IsDevelopment())
{ {

@ -40,5 +40,10 @@ namespace ZKLT.Hadoop.Model
/// 布尔值 /// 布尔值
/// </summary> /// </summary>
public const string BOOL = "BOOL"; public const string BOOL = "BOOL";
/// <summary>
/// 大文本
/// </summary>
public const string LONGTEXT = "LONGTEXT";
} }
} }

@ -611,7 +611,7 @@ namespace ZKLT.Hadoop
switch (where[_column.Key!]) switch (where[_column.Key!])
{ {
case HDP_WhereType.LIKE: case HDP_WhereType.LIKE:
_wherestr.Append($@" AND `{_column.Key!}` {where[_column.Key!]} '%' + @{_column.Key!} + '%'"); _wherestr.Append($@" AND `{_column.Key!}` {where[_column.Key!]} CONCAT('%',@{_column.Key!},'%')");
break; break;
default: default:
_wherestr.Append($@" AND `{_column.Key!}` {where[_column.Key!]} @{_column.Key!}"); _wherestr.Append($@" AND `{_column.Key!}` {where[_column.Key!]} @{_column.Key!}");

Loading…
Cancel
Save