提交 a043a962 编写于 作者: N nrd

优化了查询客户信息的代码

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