Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
90bd87c1
Commit
90bd87c1
authored
Oct 13, 2020
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改请求错误的显示
parent
9fa04351
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
1 deletion
+31
-1
BaseDaoSql.java
...db/src/main/java/com/yanzuoguang/dao/impl/BaseDaoSql.java
+4
-1
CaseSqlModel.java
.../src/main/java/com/yanzuoguang/dao/impl/CaseSqlModel.java
+27
-0
No files found.
yzg-util-db/src/main/java/com/yanzuoguang/dao/impl/BaseDaoSql.java
View file @
90bd87c1
...
...
@@ -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
());
}
...
...
yzg-util-db/src/main/java/com/yanzuoguang/dao/impl/CaseSqlModel.java
View file @
90bd87c1
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
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment