ccjgmwz 3 年之前
父节点
当前提交
68b639f474

+ 11 - 6
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseInOutInfoServiceImpl.java

@@ -752,11 +752,16 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
      */
     @Override
     public Integer selectCountByPhone(String phone) {
-        Map<String, Object> pageView = new HashMap<>();
-        pageView.put("statusFlag", 1);
-        pageView.put("phone", phone);
-        // 查询记录总数
-        Integer dataCount = baseMapper.getCountByCondition(pageView);
-        return dataCount;
+        if(phone == null || phone.isEmpty()){
+           return 0;
+        }
+        else{
+            Map<String, Object> pageView = new HashMap<>();
+            pageView.put("statusFlag", '1');
+            pageView.put("phone", phone);
+            // 查询记录总数
+            Integer dataCount = baseMapper.getCountByCondition(pageView);
+            return dataCount;
+        }
     }
 }