package com.ltkj.hosp.mapper;
|
|
import java.util.List;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.ltkj.hosp.domain.TjAdvice;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Select;
|
|
/**
|
* adviceMapper接口
|
*
|
* @author ltkj
|
* @date 2022-11-24
|
*/
|
|
@Mapper
|
public interface TjAdviceMapper extends BaseMapper<TjAdvice> {
|
/**
|
* 查询advice
|
*
|
* @param id advice主键
|
* @return advice
|
*/
|
public TjAdvice selectTjAdviceById(Long id);
|
|
/**
|
* 查询advice列表
|
*
|
* @param tjAdvice advice
|
* @return advice集合
|
*/
|
public List<TjAdvice> selectTjAdviceList(TjAdvice tjAdvice);
|
|
/**
|
* 新增advice
|
*
|
* @param tjAdvice advice
|
* @return 结果
|
*/
|
public int insertTjAdvice(TjAdvice tjAdvice);
|
|
/**
|
* 修改advice
|
*
|
* @param tjAdvice advice
|
* @return 结果
|
*/
|
public int updateTjAdvice(TjAdvice tjAdvice);
|
|
/**
|
* 删除advice
|
*
|
* @param id advice主键
|
* @return 结果
|
*/
|
public int deleteTjAdviceById(Long id);
|
|
/**
|
* 批量删除advice
|
*
|
* @param ids 需要删除的数据主键集合
|
* @return 结果
|
*/
|
public int deleteTjAdviceByIds(Long[] ids);
|
|
|
|
@Select({"<script>", "select GROUP_CONCAT(a.title Separator ';') from tj_advice a where a.id in",
|
"<foreach collection='aList' item='id' open='(' separator=',' close=')'>",
|
"#{id}",
|
"</foreach>",
|
"</script>" })
|
public String getAdviceStringByIdss(@Param("aList") String[] aList);
|
|
|
|
@Select({"<script>", "select * from tj_advice a where a.id in",
|
"<foreach collection='aList' item='id' open='(' separator=',' close=')'>",
|
"#{id}",
|
"</foreach>",
|
"</script>" })
|
List<TjAdvice> getAdviceStringByIds(@Param("aList") String[] aList);
|
}
|