Commit 90bd87c1 authored by yanzg's avatar yanzg

修改请求错误的显示

parent 9fa04351
......@@ -742,6 +742,7 @@ public abstract class BaseDaoSql {
if (i > 0) {
sb.append(",");
}
sb.append(from.getFrom());
switch (from.getGroupType()) {
case CaseSqlModel.GROUP_TYPE_SUM:
sb.append("SUM");
......@@ -776,7 +777,9 @@ public abstract class BaseDaoSql {
sb.append("?");
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());
}
......
package com.yanzuoguang.dao.impl;
import com.yanzuoguang.util.helper.StringHelper;
/**
* 行转列实体
*
......@@ -87,6 +89,15 @@ public class CaseSqlModel {
*/
private String andWhere;
/**
* 格式化-前面的字符
*/
private String from = StringHelper.EMPTY;
/**
* 格式化-后面的字符
*/
private String to = StringHelper.EMPTY;
public int getGroupType() {
return groupType;
}
......@@ -142,4 +153,20 @@ public class CaseSqlModel {
public void setAndWhere(String 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