Commit 7650e89b authored by lcl's avatar lcl

添加认领返回值

parent 2ac02146
......@@ -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) {
......
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