admin
2020-07-29 c338aa60df58bee9f4c25afedf94fe6930a119c1
fanli/src/main/java/com/yeshi/fanli/service/inter/help/HelpCenterService.java
@@ -3,29 +3,23 @@
import java.util.List;
import com.yeshi.fanli.entity.SystemEnum;
import org.springframework.cache.annotation.Cacheable;
import com.yeshi.fanli.entity.bus.help.HelpCenter;
import com.yeshi.fanli.entity.bus.help.HelpInfo;
import com.yeshi.fanli.exception.HelpCenterException;
import com.yeshi.fanli.exception.config.HelpCenterException;
public interface HelpCenterService {
   
   /**
    * 插入对象
    * @param record
    * @return
    * @throws HelpCenterException
    */
   public int insertSelective(HelpCenter record) throws HelpCenterException;
   /**
    * 更新当前对象所有数据
    * @param record
    * @return
    * @throws HelpCenterException
    */
   public int updateByPrimaryKey(HelpCenter record) throws HelpCenterException;
   public int updateByPrimaryKey(HelpCenter record) ;
   
   /**
    * 选择性更新内容——不为空则更新该字段
@@ -33,7 +27,7 @@
    * @return
    * @throws HelpCenterException
    */
   public int updateByPrimaryKeySelective(HelpCenter record) throws HelpCenterException;
   public int updateByPrimaryKeySelective(HelpCenter record);
   
   
@@ -43,10 +37,10 @@
    * @return
    * @throws HelpCenterException
    */
   public HelpCenter selectByPrimaryKey(Long id) throws HelpCenterException;
   public HelpCenter selectByPrimaryKey(Long id) ;
   
   @Cacheable(value = "helpCenterCache")
   public HelpCenter selectByPrimaryKeyCache(Long id) throws HelpCenterException;
   public HelpCenter selectByPrimaryKeyCache(Long id);
   
   
   /**
@@ -54,13 +48,11 @@
    * @param pageIndex 页码
    * @param pageSize  页面条数
    * @param key      搜索条件
    * @param startTime 起始时间
    * @param endTime   结束时间
    * @return
    */
   public List<HelpCenter> query(int pageIndex, int pageSize, String key, Integer orderMode) throws HelpCenterException;
   public List<HelpCenter> query(int pageIndex, int pageSize, String key, Long cid, Integer orderMode, Integer state, SystemEnum system) ;
   
   public long countQuery(String key) throws HelpCenterException;
   public long countQuery(String key, Long cid,Integer state, SystemEnum system);
   
   /**
@@ -71,7 +63,7 @@
    * @return 
    * @throws Exception
    */
   public String save(HelpCenter helpCenter, String content, String html) throws Exception;
   public String save(HelpCenter helpCenter, String content, String html) throws HelpCenterException, Exception;
   
   /**
@@ -80,7 +72,7 @@
    * @return
    * @throws HelpCenterException
    */
   public int deleteBatchById(List<String> idList) throws HelpCenterException;
   public int deleteBatchById(List<String> idList);
   /**
    * 
@@ -88,17 +80,16 @@
    * @return
    * @throws HelpCenterException
    */
   public HelpInfo getHelpInfo(Long id) throws HelpCenterException;
   public HelpInfo getHelpInfo(Long id);
   /**
    * 查询 只返回id、title
    * @param pageIndex
    * @param pageSize
    * @param key
    * @return
    * @throws HelpCenterException
    */
   public List<HelpCenter> queryIdAndTitle(int pageIndex, int pageSize, String key) throws HelpCenterException;
   public List<HelpCenter> listValid(long pageId, int pageSize, String key, Long cid, SystemEnum system);
   
   /**
@@ -106,10 +97,26 @@
    * @param idList
    * @throws HelpCenterException
    */
   public void deleteInfoBatchById(List<String> idList) throws HelpCenterException;
   public void deleteInfoBatchById(List<String> idList);
   
   
   public HelpInfo getHelpInfoCache(Long id) throws HelpCenterException;
   public HelpInfo getHelpInfoCache(Long id);
   /**
    * 版本设置
    * @param id
    * @param versions
    * @throws HelpCenterException
    */
   public void setVersions(Long id, List<Long> versions) throws HelpCenterException;
   /**
    * 状态切换
    * @param id
    * @throws HelpCenterException
    */
   public void switchState(Long id) throws HelpCenterException;
   
}