|
|
@ -4,19 +4,25 @@ import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
|
|
|
|
import com.ruoyi.common.core.domain.BaseEntity; |
|
|
|
import com.ruoyi.common.exception.ServiceException; |
|
|
|
import com.ruoyi.common.exception.ServiceException; |
|
|
|
import com.ruoyi.common.utils.DateUtils; |
|
|
|
import com.ruoyi.common.utils.DateUtils; |
|
|
|
|
|
|
|
import com.ruoyi.system.domain.EnterpriseQualification; |
|
|
|
import com.ruoyi.system.domain.EnterpriseUsers; |
|
|
|
import com.ruoyi.system.domain.EnterpriseUsers; |
|
|
|
import com.ruoyi.system.domain.vo.EnterpriseUserInsertVo; |
|
|
|
import com.ruoyi.system.domain.vo.EnterpriseUserInsertVo; |
|
|
|
import com.ruoyi.system.domain.vo.LabelValueVo; |
|
|
|
import com.ruoyi.system.domain.vo.LabelValueVo; |
|
|
|
import com.ruoyi.system.mapper.EnterpriseUsersMapper; |
|
|
|
import com.ruoyi.system.mapper.EnterpriseUsersMapper; |
|
|
|
|
|
|
|
import com.ruoyi.system.mapper.EnterprisesQualificationMapper; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import com.ruoyi.system.mapper.EnterprisesMapper; |
|
|
|
import com.ruoyi.system.mapper.EnterprisesMapper; |
|
|
|
import com.ruoyi.system.domain.Enterprises; |
|
|
|
import com.ruoyi.system.domain.Enterprises; |
|
|
|
import com.ruoyi.system.service.IEnterprisesService; |
|
|
|
import com.ruoyi.system.service.IEnterprisesService; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 企业Service业务层处理 |
|
|
|
* 企业Service业务层处理 |
|
|
@ -27,12 +33,14 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
@Service |
|
|
|
@Service |
|
|
|
@Slf4j |
|
|
|
@Slf4j |
|
|
|
|
|
|
|
|
|
|
|
public class EnterprisesServiceImpl implements IEnterprisesService |
|
|
|
public class EnterprisesServiceImpl extends ServiceImpl<EnterprisesMapper, Enterprises> implements IEnterprisesService |
|
|
|
{ |
|
|
|
{ |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private EnterprisesMapper enterprisesMapper; |
|
|
|
private EnterprisesMapper enterprisesMapper; |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private EnterpriseUsersMapper enterpriseUsersMapper; |
|
|
|
private EnterpriseUsersMapper enterpriseUsersMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
private IEnterprisesService iEnterprisesService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 查询企业 |
|
|
|
* 查询企业 |
|
|
@ -78,10 +86,14 @@ public class EnterprisesServiceImpl implements IEnterprisesService |
|
|
|
* @return 结果 |
|
|
|
* @return 结果 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public int updateEnterprises(Enterprises enterprises) |
|
|
|
public int updateEnterprises(@RequestBody Enterprises enterprises) |
|
|
|
{ |
|
|
|
{ |
|
|
|
enterprises.setUpdateTime(DateUtils.getNowDate()); |
|
|
|
final Enterprises enterprises1 = enterprisesMapper.selectById(enterprises.getId()); |
|
|
|
return enterprisesMapper.updateEnterprises(enterprises); |
|
|
|
if (enterprises == null) { |
|
|
|
|
|
|
|
throw new ServiceException("企业信息不存在"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BeanUtils.copyProperties(enterprises, enterprises1); |
|
|
|
|
|
|
|
return enterprisesMapper.updateById(enterprises1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|