package com.gunshi.project.ss.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.gunshi.project.ss.entity.so.ByLogPageSo; import com.gunshi.project.ss.model.ByLogDetail; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.io.Serializable; import java.util.List; @Mapper public interface ByLogDetailMapper extends BaseMapper { @Select(""" """) List selectDetail(@Param("logId") Long id,@Param("dto") ByLogPageSo pageSo); @Select(""" select t1.id,t1.by_log_id,t1.pre_place_detail_id as ppdi,t1.pre_method,t1.pre_effect,t1.pre_person_id, t2.detail_name as ppdn,t3.id as ppi,t3.pre_name as ppn from by_log_detail t1 join pre_place_detail t2 on t1.pre_place_detail_id = t2.id join pre_place t3 on t2.pre_id = t3.id where t1.by_log_id = #{logId} """) List selectDetailList(@Param("logId") Long id); @Select(""" select count(*) from by_log_detail t1 where t1.pre_place_detail_id = #{id} """) int selectByPPDi(@Param("id") Serializable id); }