@@ -699,7 +699,7 @@ private String impl2ConS2Mehtod() {
699
699
for (int j =0 ; j <colStrs .length ; j ++){
700
700
if (colNames [i ].equals (colStrs [j ])){
701
701
result += " if(field.equals(\" " +colNames [i ]+"\" )){\n " +
702
- " builder.or(" +toLowerFirst (domainStr )+"." +colNames [i ]+".eq(s ));\n " +
702
+ " builder.or(" +toLowerFirst (domainStr )+"." +colNames [i ]+".like( \" % \" +s+ \" % \" ));\n " +
703
703
" }\n " ;
704
704
}
705
705
}
@@ -803,7 +803,7 @@ private String impl2ConSMehtod() {
803
803
for (int j =0 ; j <colStrs .length ; j ++){
804
804
if (colNames [i ].equals (colStrs [j ])){
805
805
result += " if(field.equals(\" " +colNames [i ]+"\" )){\n " +
806
- " builder.or(" +toLowerFirst (domainStr )+"." +colNames [i ]+".eq(s ));\n " +
806
+ " builder.or(" +toLowerFirst (domainStr )+"." +colNames [i ]+".like( \" % \" +s+ \" % \" ));\n " +
807
807
" }\n " ;
808
808
}
809
809
}
@@ -1565,7 +1565,8 @@ public String makeIndex() {
1565
1565
" <td class=\" font-12\" style=\" width:40px;\" >키워드</td>\n " +
1566
1566
" <td class=\" font-12 d-flex align-items-center\" style=\" width:190px;\" >\n " +
1567
1567
" <select id=\" field\" name=\" field\" style=\" width:80px;\" title=\" 키워드 선택\" autocomplete=\" on\" >\n " +
1568
- " <option th:value=\" id\" th:selected=\" ${#strings.trim(param.field) eq 'id'}\" >id</option>\n " +
1568
+ //" <option th:value=\"id\" th:selected=\"${#strings.trim(param.field) eq 'id'}\">id</option>\n" +
1569
+ optionStr ()+
1569
1570
// " <option th:value=\"all\" th:selected=\"${#strings.trim(param.field) eq 'addrFull'}\">주소검색</option>\n" +
1570
1571
// " <option th:value=\"zipcode\" th:selected=\"${#strings.trim(param.field) eq 'zipCode'}\">우편번호</option>\n" +
1571
1572
// " <option th:value=\"addr1\" th:selected=\"${#strings.trim(param.field) eq 'addr1'}\">도로명주소</option>\n" +
@@ -1709,6 +1710,43 @@ public String makeIndex() {
1709
1710
return result ;
1710
1711
}
1711
1712
1713
+ private String optionStr () {
1714
+ String result ="" ;
1715
+ //" <option th:value=\"id\" th:selected=\"${#strings.trim(param.field) eq 'id'}\">id</option>\n"
1716
+ for (int i =0 ; i <colNames .length ;i ++){
1717
+ if (colLongs !=null ){
1718
+ for (int j =0 ; j <colLongs .length ;j ++){
1719
+ if (colLongs [j ].equals (colNames [i ])){
1720
+ result += " <option th:value=\" " +colNames [i ]+"\" th:selected=\" ${#strings.trim(param.field) eq '" +colNames [i ]+"'}\" >" +colNames [i ]+"</option>\n " ;
1721
+ }
1722
+ }
1723
+
1724
+ }
1725
+ if (colStrs !=null ){
1726
+ for (int j =0 ; j <colStrs .length ; j ++){
1727
+ if (colStrs [j ].equals (colNames [i ])){
1728
+ result += " <option th:value=\" " +colNames [i ]+"\" th:selected=\" ${#strings.trim(param.field) eq '" +colNames [i ]+"'}\" >" +colNames [i ]+"</option>\n " ;
1729
+ }
1730
+ }
1731
+
1732
+ }
1733
+ if (colDates !=null ){
1734
+ for (int j =0 ; j <colDates .length ; j ++){
1735
+ if (colDates [j ].equals (colNames [i ])){
1736
+ result += " <option th:value=\" " +colNames [i ]+"\" th:selected=\" ${#strings.trim(param.field) eq '" +colNames [i ]+"'}\" >" +colNames [i ]+"</option>\n " ;
1737
+ }
1738
+ }
1739
+
1740
+ }
1741
+ }
1742
+ if (foreignCols !=null ){
1743
+ for (int i =0 ; i <foreignCols .length ; i ++){
1744
+ result += " <option th:value=\" " +toLowerFirst (foreignCols [i ])+"Id\" th:selected=\" ${#strings.trim(param.field) eq '" +toLowerFirst (foreignCols [i ])+"Id'}\" >" +toLowerFirst (foreignCols [i ])+"Id</option>\n " ;
1745
+ }
1746
+ }
1747
+ return result ;
1748
+ }
1749
+
1712
1750
private String tableColIndex2 () {
1713
1751
String result ="" ;
1714
1752
// " <td th:text=\"${board.id}\"></td>\n" +
0 commit comments