Commit bfdbb9911820361949b7bf8e46bfe8c2fbcd1aec

Authored by 王彬
1 parent 6811f8ba

1.StringUtils utils donot use springframework

build.gradle
... ... @@ -32,12 +32,6 @@ task sourcesJar(type: Jar, dependsOn: classes) {
32 32 from sourceSets.main.allSource
33 33 }
34 34  
35   -task javadocJar(type: Jar, dependsOn: javadoc) {
36   - classifier = 'javadoc'
37   - from javadoc.destinationDir
38   -}
39   -
40 35 artifacts {
41 36 archives sourcesJar
42   - archives javadocJar
43 37 }
... ...
src/main/java/com/taover/repository/CustomJdbcTemplate.java
... ... @@ -16,7 +16,6 @@ import javax.persistence.Id;
16 16 import javax.persistence.Table;
17 17  
18 18 import org.springframework.jdbc.core.JdbcTemplate;
19   -import org.springframework.util.StringUtils;
20 19  
21 20 /**
22 21 *
... ... @@ -305,7 +304,7 @@ public class CustomJdbcTemplate<T, ID extends Serializable> {
305 304 StringBuffer pql = new StringBuffer(sql.toString());
306 305 List<Object> list = new ArrayList<Object>();
307 306 this.appendWhereCondition(sql, pql, list, condition);
308   - if(!StringUtils.isEmpty(sortCondition)){
  307 + if(sortCondition != null && !sortCondition.equals("")){
309 308 sql.append(" " + sortCondition + " ");
310 309 pql.append(" " + sortCondition + " ");
311 310 }
... ... @@ -360,7 +359,7 @@ public class CustomJdbcTemplate&lt;T, ID extends Serializable&gt; {
360 359 page_list.add((page - 1) * pageSize);
361 360 page_list.add(pageSize);
362 361  
363   - if(!StringUtils.isEmpty(sortCondition)){
  362 + if(sortCondition != null && !sortCondition.equals("")){
364 363 sql.append(" " + sortCondition + " ");
365 364 pql.append(" " + sortCondition + " ");
366 365 }
... ...