|
|
@@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
import java.net.URLDecoder;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
@@ -103,10 +104,14 @@ public class ProductGetController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/searchProducts", method = RequestMethod.GET)
|
|
|
- public SPage<Product> searchProducts(int page, int size, String filters, String notEqualFilters, String keyword) {
|
|
|
+ public SPage<Product> searchProducts(int page, int size, String filters, String notEqualFilters, String keyword, String keywordSearchColumns) {
|
|
|
Map<String, Object> equalMap = JSON.parseObject(filters);
|
|
|
Map<String, Object> notEqualMap = JSON.parseObject(notEqualFilters);
|
|
|
- PageParams pageParams = new PageParams(page, size, equalMap, notEqualMap);
|
|
|
+ List<String> searchColumns = new ArrayList<>();
|
|
|
+ if (null != keywordSearchColumns) {
|
|
|
+ searchColumns = JSON.parseArray(keywordSearchColumns, String.class);
|
|
|
+ }
|
|
|
+ PageParams pageParams = new PageParams(page, size, equalMap, notEqualMap, searchColumns);
|
|
|
return searchService.searchProducts(keyword, pageParams);
|
|
|
}
|
|
|
|
|
|
@@ -123,7 +128,7 @@ public class ProductGetController {
|
|
|
public SPage<ProductUsers> findProductUsersByPageInfo(int page, int size, String filters, String notEqualFilters, Sort sort, String keyword) {
|
|
|
Map<String, Object> equalMap = JSON.parseObject(filters);
|
|
|
Map<String, Object> notEqualMap = JSON.parseObject(notEqualFilters);
|
|
|
- PageParams pageParams = new PageParams(page, size, equalMap, notEqualMap);
|
|
|
+ PageParams pageParams = new PageParams(page, size, equalMap, notEqualMap, null);
|
|
|
if (StringUtils.isEmpty(keyword)) {
|
|
|
PageInfo pageInfo = new PageInfo(page, size);
|
|
|
for (Map.Entry<String, Object> map : equalMap.entrySet()) {
|