| | |
| | | package com.hrt.system.service.impl; |
| | | |
| | | import com.hrt.system.domain.poji.Agreement; |
| | | import com.hrt.system.mapper.AgreementMapper; |
| | | import com.hrt.system.service.AgreementService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.hrt.common.core.exception.ServiceException; |
| | | import com.hrt.system.constant.AppErrorConstant; |
| | | import com.hrt.system.domain.dto.AppAgreementDto; |
| | | import com.hrt.system.domain.poji.sys.Agreement; |
| | | import com.hrt.system.domain.vo.AppAgreementVo; |
| | | import com.hrt.system.mapper.sys.AgreementMapper; |
| | | import com.hrt.system.service.sys.AgreementService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class AgreementServiceImpl extends ServiceImpl<AgreementMapper, Agreement> implements AgreementService { |
| | | |
| | | |
| | | @Resource |
| | | private AgreementMapper agreementMapper; |
| | | |
| | | /** |
| | | * 获取各种协议 |
| | | * @param appAgreementDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public AppAgreementVo getAppAgreement(AppAgreementDto appAgreementDto){ |
| | | AppAgreementVo appAgreementVo = agreementMapper.getAppAgreementVoByType(appAgreementDto.getType()); |
| | | if(appAgreementVo==null){ |
| | | throw new ServiceException(AppErrorConstant.AGREEMENT_FAILED); |
| | | } |
| | | return appAgreementVo; |
| | | } |
| | | } |