|
|
@ -59,6 +59,8 @@ public class EnterpriseServiceImpl implements EnterpriseService { |
|
|
|
private EnterpriseTagMapper enterpriseTagMapper; |
|
|
|
private EnterpriseTagMapper enterpriseTagMapper; |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private UserRoleMapper userRoleMapper; |
|
|
|
private UserRoleMapper userRoleMapper; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private AdminUserService adminUserService; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
@ -106,8 +108,14 @@ public class EnterpriseServiceImpl implements EnterpriseService { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
|
public Long pccreateEnterprise(EnterpriseSaveReqVO createReqVO) { |
|
|
|
public Long pccreateEnterprise(EnterpriseSaveReqVO createReqVO) { |
|
|
|
|
|
|
|
//专管员所属部门
|
|
|
|
|
|
|
|
final AdminUserDO user = adminUserService.getUser(createReqVO.getUserId()); |
|
|
|
|
|
|
|
if (user == null) { |
|
|
|
|
|
|
|
throw exception(USER_NOT_EXISTS); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
createReqVO.setDeptId(user.getDeptId()); |
|
|
|
EnterpriseDO enterprise = BeanUtils.toBean(createReqVO, EnterpriseDO.class); |
|
|
|
EnterpriseDO enterprise = BeanUtils.toBean(createReqVO, EnterpriseDO.class); |
|
|
|
enterprise.setDepartmentId(1L); |
|
|
|
enterprise.setDepartmentId(createReqVO.getDeptId()); |
|
|
|
enterpriseMapper.insert(enterprise); |
|
|
|
enterpriseMapper.insert(enterprise); |
|
|
|
if (createReqVO.getFileIds() != null && createReqVO.getFileIds().length > 0) { |
|
|
|
if (createReqVO.getFileIds() != null && createReqVO.getFileIds().length > 0) { |
|
|
|
for (Long fileId : createReqVO.getFileIds()) { |
|
|
|
for (Long fileId : createReqVO.getFileIds()) { |
|
|
|