Commit bfdbb9911820361949b7bf8e46bfe8c2fbcd1aec

Authored by 王彬
1 parent 6811f8ba

1.StringUtils utils donot use springframework

@@ -32,12 +32,6 @@ task sourcesJar(type: Jar, dependsOn: classes) { @@ -32,12 +32,6 @@ task sourcesJar(type: Jar, dependsOn: classes) {
32 from sourceSets.main.allSource 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 artifacts { 35 artifacts {
41 archives sourcesJar 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,7 +16,6 @@ import javax.persistence.Id;
16 import javax.persistence.Table; 16 import javax.persistence.Table;
17 17
18 import org.springframework.jdbc.core.JdbcTemplate; 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,7 +304,7 @@ public class CustomJdbcTemplate<T, ID extends Serializable> {
305 StringBuffer pql = new StringBuffer(sql.toString()); 304 StringBuffer pql = new StringBuffer(sql.toString());
306 List<Object> list = new ArrayList<Object>(); 305 List<Object> list = new ArrayList<Object>();
307 this.appendWhereCondition(sql, pql, list, condition); 306 this.appendWhereCondition(sql, pql, list, condition);
308 - if(!StringUtils.isEmpty(sortCondition)){ 307 + if(sortCondition != null && !sortCondition.equals("")){
309 sql.append(" " + sortCondition + " "); 308 sql.append(" " + sortCondition + " ");
310 pql.append(" " + sortCondition + " "); 309 pql.append(" " + sortCondition + " ");
311 } 310 }
@@ -360,7 +359,7 @@ public class CustomJdbcTemplate&lt;T, ID extends Serializable&gt; { @@ -360,7 +359,7 @@ public class CustomJdbcTemplate&lt;T, ID extends Serializable&gt; {
360 page_list.add((page - 1) * pageSize); 359 page_list.add((page - 1) * pageSize);
361 page_list.add(pageSize); 360 page_list.add(pageSize);
362 361
363 - if(!StringUtils.isEmpty(sortCondition)){ 362 + if(sortCondition != null && !sortCondition.equals("")){
364 sql.append(" " + sortCondition + " "); 363 sql.append(" " + sortCondition + " ");
365 pql.append(" " + sortCondition + " "); 364 pql.append(" " + sortCondition + " ");
366 } 365 }