提交 9a97608c 编写于 作者: shuzheng5201314's avatar shuzheng5201314

修复表格排序bug

上级 60f9be23
......@@ -68,9 +68,6 @@ zheng
| ├── zheng-oss-web -- 前台接口[端口:7771]
| └── zheng-oss-admin -- 后台管理[端口:7772]
├── zheng-shop -- 电子商务系统
├── zheng-im -- 即时通讯系统
├── zheng-oa -- 办公自动化系统
├── zheng-eoms -- 运维系统
└── zheng-demo -- 示例模块(包含一些示例代码等)
├── zheng-demo-rpc-api -- rpc接口包
├── zheng-demo-rpc-service -- rpc服务提供者
......
......@@ -28,9 +28,6 @@
<module>zheng-ucenter</module>
<module>zheng-wechat</module>
<module>zheng-shop</module>
<module>zheng-im</module>
<module>zheng-oa</module>
<module>zheng-eoms</module>
<module>zheng-api</module>
<module>zheng-demo</module>
</modules>
......
......@@ -38,21 +38,12 @@ public class StringUtil {
return str;
}
/**
* 驼峰转下划线(简单写法,效率低于{@link #humpToLine2(String)})
* @param str
* @return
*/
public static String humpToLine(String str) {
return str.replaceAll("[A-Z]", "_$0").toLowerCase();
}
/**
* 驼峰转下划线,效率比上面高
* @param str
* @return
*/
public static String humpToLine2(String str) {
public static String humpToLine(String str) {
Matcher matcher = humpPattern.matcher(str);
StringBuffer sb = new StringBuffer();
while (matcher.find()) {
......@@ -62,6 +53,15 @@ public class StringUtil {
return sb.toString();
}
/**
* 驼峰转下划线(简单写法,效率低于{@link #humpToLine(String)})
* @param str
* @return
*/
public static String humpToLine2(String str) {
return str.replaceAll("[A-Z]", "_$0").toLowerCase();
}
/**
* 首字母转小写
* @param s
......
# zheng-eoms
运维系统
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.zheng</groupId>
<artifactId>zheng-eoms</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<name>zheng-eoms</name>
<url>http://www.zhangshuzheng.cn</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
</properties>
</project>
# zheng-im
即时通讯系统
\ No newline at end of file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.zheng</groupId>
<artifactId>zheng-im</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<name>zheng-im</name>
<url>http://www.zhangshuzheng.cn</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
</properties>
</project>
# zheng-oa
办公自动化系统
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.zheng</groupId>
<artifactId>zheng-oa</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<name>zheng-oa</name>
<url>http://www.zhangshuzheng.cn</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
</properties>
</project>
package com.zheng.upms.server.controller.manage;
import com.zheng.common.base.BaseController;
import com.zheng.common.util.StringUtil;
import com.zheng.upms.common.constant.UpmsResult;
import com.zheng.upms.common.constant.UpmsResultConstant;
import com.zheng.upms.dao.model.UpmsLog;
......@@ -53,7 +54,7 @@ public class UpmsLogController extends BaseController {
@RequestParam(required = false, value = "order") String order) {
UpmsLogExample upmsLogExample = new UpmsLogExample();
if (!StringUtils.isBlank(sort) && !StringUtils.isBlank(order)) {
upmsLogExample.setOrderByClause(sort + " " + order);
upmsLogExample.setOrderByClause(StringUtil.humpToLine(sort) + " " + order);
}
if (StringUtils.isNotBlank(search)) {
upmsLogExample.or()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册