|  |  | 
 |  |  | package com.smartor.service.impl; | 
 |  |  |  | 
 |  |  | import java.util.List; | 
 |  |  |  | 
 |  |  | import com.ruoyi.common.exception.base.BaseException; | 
 |  |  | import com.ruoyi.common.utils.DateUtils; | 
 |  |  | import com.ruoyi.common.utils.DtoConversionUtils; | 
 |  |  | import com.smartor.domain.HeLibrary; | 
 |  |  | import com.smartor.domain.HeLibraryTag; | 
 |  |  | import com.smartor.domain.HeLibraryVO; | 
 |  |  | import com.smartor.domain.TempDetpRelevance; | 
 |  |  | import com.smartor.mapper.HeLibraryMapper; | 
 |  |  | import com.smartor.mapper.HeLibraryTagMapper; | 
 |  |  | import com.smartor.mapper.TempDetpRelevanceMapper; | 
 |  |  | import com.smartor.service.IHeLibraryService; | 
 |  |  | import lombok.extern.slf4j.Slf4j; | 
 |  |  | import org.apache.commons.collections4.CollectionUtils; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.stereotype.Service; | 
 |  |  |  | 
 |  |  | import java.util.List; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * 宣教资料库Service业务层处理 | 
 |  |  | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private HeLibraryTagMapper heLibraryTagMapper; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private TempDetpRelevanceMapper tempDetpRelevanceMapper; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 查询宣教资料库 | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     @Override | 
 |  |  |     public Integer saveOrUpdateScript(HeLibraryVO heLibraryVO) { | 
 |  |  |         Integer i = null; | 
 |  |  |         HeLibrary heLibrary = DtoConversionUtils.sourceToTarget(heLibraryVO, HeLibrary.class); | 
 |  |  |         if (heLibraryVO.getIsoperation() != null && heLibraryVO.getIsoperation() == 1) { | 
 |  |  |             //新增 | 
 |  |  |             i = heLibraryMapper.insertHeLibrary(heLibrary); | 
 |  |  |             heLibraryMapper.insertHeLibrary(heLibrary); | 
 |  |  |         } else if (heLibraryVO.getIsoperation() != null && heLibraryVO.getIsoperation() == 2) { | 
 |  |  |             //修改 | 
 |  |  |             i = heLibraryMapper.updateHeLibrary(heLibrary); | 
 |  |  |             heLibraryMapper.updateHeLibrary(heLibrary); | 
 |  |  |         } | 
 |  |  |         log.info("新增或修改宣教详情的id为:{}", heLibrary.getId()); | 
 |  |  | // | 
 |  |  | 
 |  |  | //            } | 
 |  |  | //        } | 
 |  |  |  | 
 |  |  |         return i; | 
 |  |  |         return heLibrary.getId().intValue(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Override |