dxq 3 weeks ago
parent
commit
f360817a0e

+ 2
- 2
sto/src/main/java/com/shinsoft/sto/controller/main/CustomerController.java View File

24
 
24
 
25
     @RequestMapping(value = "/query")
25
     @RequestMapping(value = "/query")
26
     public ResultJSON query(int page, int rows,
26
     public ResultJSON query(int page, int rows,
27
-                            String params,
27
+                            String customerNm,
28
                             HttpServletRequest request) {
28
                             HttpServletRequest request) {
29
         try {
29
         try {
30
             String userId = (String) request.getHeader("userId");
30
             String userId = (String) request.getHeader("userId");
31
             Map<String, Object> map = new HashMap<>();
31
             Map<String, Object> map = new HashMap<>();
32
-            resultJSON = customerService.query(page, rows, params, map);
32
+            resultJSON = customerService.query(page, rows, customerNm, map);
33
         } catch (Exception ex) {
33
         } catch (Exception ex) {
34
             ex.printStackTrace();
34
             ex.printStackTrace();
35
             resultJSON = JSONTools.toResultJSON(ResponseCodeMsg.CODE_EX, ex);
35
             resultJSON = JSONTools.toResultJSON(ResponseCodeMsg.CODE_EX, ex);

+ 11
- 10
sto/src/main/java/com/shinsoft/sto/service/impl/main/CustomerServiceImp.java View File

45
         
45
         
46
         // 解析查询参数
46
         // 解析查询参数
47
         if (!ObjectUtils.isEmpty(params)) {
47
         if (!ObjectUtils.isEmpty(params)) {
48
-            JSONObject jsonObject = JSON.parseObject(params);
49
-            if (!ObjectUtils.isEmpty(jsonObject.get("customerNm"))) {
50
-                queryWrapper.like("customer_nm", jsonObject.getString("customerNm"));
51
-            }
52
-            if (!ObjectUtils.isEmpty(jsonObject.get("customerShortNm"))) {
53
-                queryWrapper.like("customer_short_nm", jsonObject.getString("customerShortNm"));
54
-            }
55
-            if (!ObjectUtils.isEmpty(jsonObject.get("contactPerson"))) {
56
-                queryWrapper.like("contact_person", jsonObject.getString("contactPerson"));
57
-            }
48
+            queryWrapper.like("customer_nm", params);
49
+//            JSONObject jsonObject = JSON.parseObject(params);
50
+//            if (!ObjectUtils.isEmpty(jsonObject.get("customerNm"))) {
51
+
52
+//            }
53
+//            if (!ObjectUtils.isEmpty(jsonObject.get("customerShortNm"))) {
54
+//                queryWrapper.like("customer_short_nm", jsonObject.getString("customerShortNm"));
55
+//            }
56
+//            if (!ObjectUtils.isEmpty(jsonObject.get("contactPerson"))) {
57
+//                queryWrapper.like("contact_person", jsonObject.getString("contactPerson"));
58
+//            }
58
         }
59
         }
59
         
60
         
60
         Page<Customer> list = customerMapper.selectPage(customerPage, queryWrapper);
61
         Page<Customer> list = customerMapper.selectPage(customerPage, queryWrapper);

Loading…
Cancel
Save