|
|
@@ -56,11 +56,14 @@ public class ResourceSupplyAndDemandService {
|
|
|
} else {
|
|
|
record.getResSnD().setStatus(AuditStatus.PENDING);
|
|
|
record.getResSnD().setPublishersId(SecurityUtils.getAuthenticatedUser().getId());
|
|
|
- if (SecurityUtils.getAuthenticatedUser() == null ||
|
|
|
- SecurityUtils.getAuthenticatedUser().getOrgInfo() == null ||
|
|
|
- SecurityUtils.getAuthenticatedUser().getOrgInfo().getId() == null) {
|
|
|
- return R.error("请先完成企业认证");
|
|
|
+
|
|
|
+ try {
|
|
|
+ SecurityUtils.getAuthenticatedUser().getOrgInfo().getId();
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ throw new BusinessException("请先完成企业认证");
|
|
|
}
|
|
|
+
|
|
|
record.getResSnD().setOrgId(SecurityUtils.getAuthenticatedUser().getOrgInfo().getId());
|
|
|
record.setResSnD(resourceSupplyAndDemandRepo.save(record.getResSnD()));
|
|
|
}
|