dxq 3 nedēļas atpakaļ
vecāks
revīzija
f360817a0e

+ 2
- 2
sto/src/main/java/com/shinsoft/sto/controller/main/CustomerController.java Parādīt failu

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

+ 11
- 10
sto/src/main/java/com/shinsoft/sto/service/impl/main/CustomerServiceImp.java Parādīt failu

@@ -45,16 +45,17 @@ public class CustomerServiceImp extends ServiceImpl<CustomerMapper, Customer> im
45 45
         
46 46
         // 解析查询参数
47 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 61
         Page<Customer> list = customerMapper.selectPage(customerPage, queryWrapper);

Notiek ielāde…
Atcelt
Saglabāt