Commit 06fc5a46 authored by chenhao's avatar chenhao

bug修改

parent ca08556b
...@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
...@@ -80,6 +81,9 @@ public class MaintenanceCompanyController extends BaseController { ...@@ -80,6 +81,9 @@ public class MaintenanceCompanyController extends BaseController {
@PostMapping(value = "/person/save") @PostMapping(value = "/person/save")
@ApiOperation(httpMethod = "POST", value = "新增维保人员", notes = "新增维保人员") @ApiOperation(httpMethod = "POST", value = "新增维保人员", notes = "新增维保人员")
public ResponseModel<MaintenanceCompany> saveMaintenancePerson(@RequestBody MaintenanceCompany model) { public ResponseModel<MaintenanceCompany> saveMaintenancePerson(@RequestBody MaintenanceCompany model) {
if(model.getSequenceNbr()!= null) {
throw new BadRequest("当前用户已经存在");
}
model.setType(PERSON); model.setType(PERSON);
return ResponseHelper.buildResponse(maintenanceCompanyService.savePersonDetail(model)); return ResponseHelper.buildResponse(maintenanceCompanyService.savePersonDetail(model));
} }
......
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