Commit 90bd87c1 authored by yanzg's avatar yanzg

修改请求错误的显示

parent 9fa04351
...@@ -742,6 +742,7 @@ public abstract class BaseDaoSql { ...@@ -742,6 +742,7 @@ public abstract class BaseDaoSql {
if (i > 0) { if (i > 0) {
sb.append(","); sb.append(",");
} }
sb.append(from.getFrom());
switch (from.getGroupType()) { switch (from.getGroupType()) {
case CaseSqlModel.GROUP_TYPE_SUM: case CaseSqlModel.GROUP_TYPE_SUM:
sb.append("SUM"); sb.append("SUM");
...@@ -776,7 +777,9 @@ public abstract class BaseDaoSql { ...@@ -776,7 +777,9 @@ public abstract class BaseDaoSql {
sb.append("?"); sb.append("?");
paras.add(from.getValue()); paras.add(from.getValue());
} }
sb.append(" ELSE 0 END ) AS "); sb.append(" ELSE 0 END )");
sb.append(from.getTo());
sb.append(" AS ");
sb.append(from.getToName()); sb.append(from.getToName());
} }
......
package com.yanzuoguang.dao.impl; package com.yanzuoguang.dao.impl;
import com.yanzuoguang.util.helper.StringHelper;
/** /**
* 行转列实体 * 行转列实体
* *
...@@ -87,6 +89,15 @@ public class CaseSqlModel { ...@@ -87,6 +89,15 @@ public class CaseSqlModel {
*/ */
private String andWhere; private String andWhere;
/**
* 格式化-前面的字符
*/
private String from = StringHelper.EMPTY;
/**
* 格式化-后面的字符
*/
private String to = StringHelper.EMPTY;
public int getGroupType() { public int getGroupType() {
return groupType; return groupType;
} }
...@@ -142,4 +153,20 @@ public class CaseSqlModel { ...@@ -142,4 +153,20 @@ public class CaseSqlModel {
public void setAndWhere(String andWhere) { public void setAndWhere(String andWhere) {
this.andWhere = andWhere; this.andWhere = andWhere;
} }
public String getFrom() {
return from;
}
public void setFrom(String from) {
this.from = from;
}
public String getTo() {
return to;
}
public void setTo(String to) {
this.to = to;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment