/** * 新增或保存客户资料 * * @param customerCompany * @param request * @param response * @return */ @ResponseBody @RequestMapping( value = "/jsonSaveOrupdateCompany.do", method = RequestMethod.POST, produces = {"text/html;charset=UTF-8"}) public JsonResult<CustomerCompany> saveOrupdateCompany( CustomerCompany customerCompany, HttpServletRequest request, HttpServletResponse response) { JsonResult<CustomerCompany> js = new JsonResult<CustomerCompany>(); js.setCode(new Integer(1)); js.setMessage("保存失败!"); try { customerCompany.setFlag(0); customerCompany.setCreateUser(this.getLoginUser().getId()); customerCompany.setCreatetTime(new Date()); customerService.saveCustomerCompany(customerCompany); js.setCode(new Integer(0)); js.setMessage("保存成功!"); } catch (Exception e) { e.printStackTrace(); } return js; }