25 lines
818 B
Java
25 lines
818 B
Java
package com.gunshi.project.ss.mapper;
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
import com.gunshi.project.ss.model.MentencePlanDetail;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
import java.util.List;
|
|
|
|
@Mapper
|
|
public interface MentencePlanDetailMapper extends BaseMapper<MentencePlanDetail> {
|
|
|
|
@Select("""
|
|
select t1.*,t2.name as mentenceStDetailName,t3.id as mentenceStId,t3.st_name as mentenceStName from
|
|
mentence_plan_detail t1
|
|
left join mentence_st_detail t2
|
|
on t1.mentence_st_detail_id = t2.id and t2.is_enable = 0
|
|
left join mentence_st t3
|
|
on t2.mentence_st_id = t3.id
|
|
where t1.mentence_plan_id = #{id}
|
|
""")
|
|
List<MentencePlanDetail> selectDetail(@Param("id") Long id);
|
|
}
|