修改between逻辑

pull/1/head
潘建东 8 months ago
parent 6179fb1da1
commit b367d83eaf

@ -46,12 +46,12 @@ namespace ZKLT.Hadoop
if (row![_column.Key!] != null) { if (row![_column.Key!] != null) {
var _betweendata = JsonConvert.DeserializeObject<object[]>(JsonConvert.SerializeObject(row![_column.Key!])); var _betweendata = JsonConvert.DeserializeObject<object[]>(JsonConvert.SerializeObject(row![_column.Key!]));
if (_betweendata != null) { if (_betweendata != null) {
if (_betweendata[0] != null) if (_betweendata[0] != null && _betweendata[0].ToString() != "")
{ {
_wherestr.Append($@" AND `{_column.Key!}` >= @{_column.Key!}0"); _wherestr.Append($@" AND `{_column.Key!}` >= @{_column.Key!}0");
param.Add(_column.Key! + "0", _betweendata[0]); param.Add(_column.Key! + "0", _betweendata[0]);
} }
if (_betweendata[1] != null) if (_betweendata[1] != null && _betweendata[1].ToString() != "")
{ {
_wherestr.Append($@" AND `{_column.Key!}` <= @{_column.Key!}1"); _wherestr.Append($@" AND `{_column.Key!}` <= @{_column.Key!}1");
param.Add(_column.Key! + "1", _betweendata[1]); param.Add(_column.Key! + "1", _betweendata[1]);

Loading…
Cancel
Save