|
|
@@ -50,7 +50,7 @@ import com.goafanti.customer.bo.UserDetailBo;
|
|
|
import com.goafanti.customer.service.CustomerService;
|
|
|
|
|
|
@RestController
|
|
|
-@RequestMapping("/api/admin/customer")
|
|
|
+@RequestMapping("/open/api/admin/customer")
|
|
|
public class AdminCustomerApiController extends BaseApiController{
|
|
|
@Resource
|
|
|
private CustomerService customerService;
|
|
|
@@ -177,14 +177,15 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
* @throws Exception
|
|
|
* @throws NumberFormatException **/
|
|
|
@RequestMapping(value = "/addCustomer", method = RequestMethod.POST)
|
|
|
- public Result addCustomer(String name,String contacts,String contactMobile,Integer type,Integer source,String societyTag) throws Exception{
|
|
|
+ public Result addCustomer(String name,String contacts,String contactMobile,Integer type,
|
|
|
+ Integer province ,Integer city, Integer area,Integer source,String societyTag) throws Exception{
|
|
|
Result res = new Result();
|
|
|
if(StringUtils.isBlank(name) || StringUtils.isBlank(contacts)
|
|
|
- || StringUtils.isBlank(contactMobile) || StringUtils.isBlank(societyTag)){
|
|
|
- res.getError().add(buildError("","客户名称、联系人、联系电话、社会性质不能为空"));
|
|
|
+ || StringUtils.isBlank(contactMobile) || StringUtils.isBlank(societyTag)||null==province||null==city||null==area){
|
|
|
+ res.getError().add(buildError("","客户名称、联系人、联系电话、社会性质、地址不能为空"));
|
|
|
return res;
|
|
|
}
|
|
|
- customerService.addCustomer(name, contacts, contactMobile,type,source,societyTag);
|
|
|
+ customerService.addCustomer(name, contacts, contactMobile,type,source,societyTag,province,city,area);
|
|
|
return res;
|
|
|
}
|
|
|
|