package com.ots.project.exam.service;
|
|
import com.ots.project.exam.domain.TTextContent;
|
import com.ots.project.exam.domain.TTextContentAndQuestion;
|
|
import java.util.Date;
|
import java.util.List;
|
import java.util.function.Function;
|
|
/**
|
* 题目的内容Service接口
|
*
|
* @author ots
|
* @date 2019-11-24
|
*/
|
public interface ITTextContentService {
|
/**
|
* 查询题目的内容
|
*
|
* @param id 题目的内容ID
|
* @return 题目的内容
|
*/
|
public TTextContent selectTTextContentById(Long id);
|
|
public List<TTextContent> selectTTextContentByIds(String[] ids);
|
|
public List<TTextContentAndQuestion> selectTextContentAndQuestion(String[] ids);
|
|
/**
|
* 查询题目的内容列表
|
*
|
* @param tTextContent 题目的内容
|
* @return 题目的内容集合
|
*/
|
public List<TTextContent> selectTTextContentList(TTextContent tTextContent);
|
|
/**
|
* 新增题目的内容
|
*
|
* @param tTextContent 题目的内容
|
* @return 结果
|
*/
|
public int insertTTextContent(TTextContent tTextContent);
|
|
/**
|
* 修改题目的内容
|
*
|
* @param tTextContent 题目的内容
|
* @return 结果
|
*/
|
public int updateTTextContent(TTextContent tTextContent);
|
|
/**
|
* 批量删除题目的内容
|
*
|
* @param ids 需要删除的数据ID
|
* @return 结果
|
*/
|
public int deleteTTextContentByIds(String ids);
|
|
/**
|
* 删除题目的内容信息
|
*
|
* @param id 题目的内容ID
|
* @return 结果
|
*/
|
public int deleteTTextContentById(Long id);
|
|
|
/**
|
* 创建一个TextContent,将内容转化为json,回写到content中,不入库
|
*
|
* @param list
|
* @param now
|
* @param mapper
|
* @param <T>
|
* @param <R>
|
* @return
|
*/
|
<T, R> TTextContent jsonConvertInsert(List<T> list, Date now, Function<? super T, ? extends R> mapper);
|
|
/**
|
* 修改一个TextContent,将内容转化为json,回写到content中,不入库
|
*
|
* @param textContent
|
* @param list
|
* @param mapper
|
* @param <T>
|
* @param <R>
|
* @return
|
*/
|
<T, R> TTextContent jsonConvertUpdate(TTextContent textContent, List<T> list, Function<? super T, ? extends R> mapper);
|
|
}
|