|
|
|
@ -21,7 +21,7 @@ public class CustomerService { |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private CustomerMapper customerMapper; |
|
|
|
|
|
|
|
|
|
//添加客户
|
|
|
|
|
public HashMap<String, Object> addCustomer(Customer customer){ |
|
|
|
|
HashMap<String, Object> resp = new HashMap<String, Object>(); |
|
|
|
|
try { |
|
|
|
@ -30,12 +30,12 @@ public class CustomerService { |
|
|
|
|
} catch (RuntimeException e) { |
|
|
|
|
logger.error(e.getMessage()); |
|
|
|
|
resp.put("retcode", 500); |
|
|
|
|
resp.put("retvalue", "Inquiry Failed"); |
|
|
|
|
resp.put("retvalue", "添加客户失败!"); |
|
|
|
|
return resp; |
|
|
|
|
} |
|
|
|
|
return resp; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//客户管理添加用户
|
|
|
|
|
public HashMap<String, Object> addAdmin(UserM userm){ |
|
|
|
|
HashMap<String, Object> resp = new HashMap<String, Object>(); |
|
|
|
|
try { |
|
|
|
@ -44,7 +44,7 @@ public class CustomerService { |
|
|
|
|
} catch (RuntimeException e) { |
|
|
|
|
logger.error(e.getMessage()); |
|
|
|
|
resp.put("retcode", 500); |
|
|
|
|
resp.put("retvalue", "Inquiry Failed"); |
|
|
|
|
resp.put("retvalue", "客户管理添加用户失败!"); |
|
|
|
|
return resp; |
|
|
|
|
} |
|
|
|
|
return resp; |
|
|
|
@ -74,7 +74,7 @@ public class CustomerService { |
|
|
|
|
} catch (RuntimeException e) { |
|
|
|
|
logger.error(e.getMessage()); |
|
|
|
|
resp.put("retcode", 500); |
|
|
|
|
resp.put("retvalue", "Inquiry Failed"); |
|
|
|
|
resp.put("retvalue", "查询客户失败!"); |
|
|
|
|
return resp; |
|
|
|
|
} |
|
|
|
|
return resp; |
|
|
|
@ -88,7 +88,7 @@ public class CustomerService { |
|
|
|
|
} catch (RuntimeException e) { |
|
|
|
|
logger.error(e.getMessage()); |
|
|
|
|
resp.put("retcode", 500); |
|
|
|
|
resp.put("retvalue", "Inquiry Failed"); |
|
|
|
|
resp.put("retvalue", "查询客户详情失败!"); |
|
|
|
|
return resp; |
|
|
|
|
} |
|
|
|
|
return resp; |
|
|
|
@ -102,12 +102,12 @@ public class CustomerService { |
|
|
|
|
} catch (RuntimeException e) { |
|
|
|
|
logger.error(e.getMessage()); |
|
|
|
|
resp.put("retcode", 500); |
|
|
|
|
resp.put("retvalue", "Inquiry Failed"); |
|
|
|
|
resp.put("retvalue", "查询客户是否存在失败!"); |
|
|
|
|
return resp; |
|
|
|
|
} |
|
|
|
|
return resp; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//删除客户
|
|
|
|
|
public HashMap<String, Object> deleteCustomer(Customer customer){ |
|
|
|
|
HashMap<String, Object> resp = new HashMap<String, Object>(); |
|
|
|
|
try { |
|
|
|
@ -116,12 +116,12 @@ public class CustomerService { |
|
|
|
|
} catch (RuntimeException e) { |
|
|
|
|
logger.error(e.getMessage()); |
|
|
|
|
resp.put("retcode", 500); |
|
|
|
|
resp.put("retvalue", "Inquiry Failed"); |
|
|
|
|
resp.put("retvalue", "删除客户失败!"); |
|
|
|
|
return resp; |
|
|
|
|
} |
|
|
|
|
return resp; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//更新客户
|
|
|
|
|
public HashMap<String, Object> updateCustomer(Customer customer){ |
|
|
|
|
HashMap<String, Object> resp = new HashMap<String, Object>(); |
|
|
|
|
try { |
|
|
|
@ -130,7 +130,7 @@ public class CustomerService { |
|
|
|
|
} catch (RuntimeException e) { |
|
|
|
|
logger.error(e.getMessage()); |
|
|
|
|
resp.put("retcode", 500); |
|
|
|
|
resp.put("retvalue", "Inquiry Failed"); |
|
|
|
|
resp.put("retvalue", "更新客户失败!"); |
|
|
|
|
return resp; |
|
|
|
|
} |
|
|
|
|
return resp; |
|
|
|
@ -145,7 +145,7 @@ public class CustomerService { |
|
|
|
|
} catch (RuntimeException e) { |
|
|
|
|
logger.error(e.getMessage()); |
|
|
|
|
resp.put("retcode", 500); |
|
|
|
|
resp.put("retvalue", "Inquiry Failed"); |
|
|
|
|
resp.put("retvalue", "查询行业类失败!"); |
|
|
|
|
return resp; |
|
|
|
|
} |
|
|
|
|
return resp; |
|
|
|
@ -160,7 +160,7 @@ public class CustomerService { |
|
|
|
|
} catch (RuntimeException e) { |
|
|
|
|
logger.error(e.getMessage()); |
|
|
|
|
resp.put("retcode", 500); |
|
|
|
|
resp.put("retvalue", "Inquiry Failed"); |
|
|
|
|
resp.put("retvalue", "查询行业失败!"); |
|
|
|
|
return resp; |
|
|
|
|
} |
|
|
|
|
return resp; |
|
|
|
|