|
|
|
@ -24,6 +24,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -90,6 +91,23 @@ public class userPersonController {
|
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "新增本企业负责人信息", response = BaseResponse.class)
|
|
|
|
|
@PostMapping("/sup/company/person/addPerSon")
|
|
|
|
|
public BaseResponse addPerSon(@RequestBody UserPersonFilterRequest userPersonFilterRequest ,BindingResult bindingResult ){
|
|
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
|
|
|
|
}
|
|
|
|
|
UserPersonEntity userPerson = new UserPersonEntity();
|
|
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(userPersonFilterRequest,userPerson);
|
|
|
|
|
userPerson.setPassword(userPersonFilterRequest.getCheckPassword());
|
|
|
|
|
userPerson.setCompanyId(Long.valueOf(userPersonFilterRequest.getCompanyId()));
|
|
|
|
|
// userPerson.setId(Long.valueOf(Long.parseLong(userPersonFilterRequest.getCompanyId())));
|
|
|
|
|
userPerson.setCreateTime(new Date());
|
|
|
|
|
userPersonService.add(userPerson);
|
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getCompanyId() {
|
|
|
|
|
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
|
|
|
|
if (attributes == null) {
|
|
|
|
@ -101,4 +119,5 @@ public class userPersonController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|