Commit 38b8a1e3 authored by lcl's avatar lcl

update

parent adb0d27a
......@@ -69,15 +69,16 @@ public class CustomerController extends BaseController {
@RepeatSubmit
public AjaxResult add(@RequestBody Customer customer) {
if (ObjectUtils.isEmpty(customer.getCompanyName())) throw new BeanException("企业名称不能为空");
try {
Map<String, Object> map = opportunityRadarService.enterpriseByName(customer.getCompanyName());
if(!ObjectUtils.isEmpty(map.get("data"))) {
customer.setCompanyId(MapUtil.getInt(BeanUtil.beanToMap(map.get("data")), "jskEid"));
if (ObjectUtils.isEmpty(customer.getCompanyId())) {
try {
Map<String, Object> map = opportunityRadarService.enterpriseByName(customer.getCompanyName());
if (!ObjectUtils.isEmpty(map.get("data"))) {
customer.setCompanyId(MapUtil.getInt(BeanUtil.beanToMap(map.get("data")), "jskEid"));
}
} catch (Exception e) {
logger.debug("获取企业id错误!error:{}", e.getMessage());
}
} catch (Exception e) {
logger.debug("获取企业id错误!error:{}", e.getMessage());
}
baseService.add(customer);
return AjaxResult.success(baseService.add(customer));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment