Commit 32579922 authored by caixingbing's avatar caixingbing
parents 99c54a92 7650e89b
......@@ -23,6 +23,7 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -68,7 +69,7 @@ public class CustomerController extends BaseController {
@RepeatSubmit
public AjaxResult add(@RequestBody Customer customer) {
dealWithcustomerData(customer);
return AjaxResult.success(baseService.add(customer));
return toAjax(baseService.add(customer));
}
/**
......@@ -80,7 +81,13 @@ public class CustomerController extends BaseController {
public AjaxResult claim(@RequestBody Customer customer) {
if (ObjectUtils.isEmpty(customer.getUipId())) throw new BeanException("城投uipId不能为空");
dealWithcustomerData(customer);
return AjaxResult.success(baseService.add(customer));
boolean add = baseService.add(customer);
if (add) {
Map<String, Object> map = new HashMap<>();
map.put("customerId", customer.getCustomerId());
return AjaxResult.success(map);
}
return AjaxResult.error();
}
private void dealWithcustomerData(Customer customer) {
......
......@@ -76,7 +76,7 @@ public class EnterpriseService {
List<CustomerStatusListVo> claimStatusList = iCustomerService.selectStatusList(uipIds);
if (CollectionUtils.isNotEmpty(claimStatusList)) {
companyMap.put("claimStatus", 1);
companyData.put("claimStatus", 1);
}
return R.ok(companyData);
......
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