提交 488cad8e 编写于 作者: 刘兴

优化了根据客户名查询客户接口

上级 e8b21a80
......@@ -48,14 +48,13 @@ public class CustomerController {
customer.put("message","查询名不为空");
} else {
List<Customer> customerList = customerService.queryByCusName(name);
if (customerList != null) {
if (customerList.size() == 0) {
customer.put("code", 0);
customer.put("message", "没有查询到姓名为:" + name + "的客户信息");
} else {
customer.put("code", 1);
customer.put("message", "查询成功");
customer.put("data", customerList);
} else {
customer.put("code", 0);
customer.put("message", "没有查询到姓名为:" + name + "的客户信息");
}
}
return customer;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册