35 lines
1.3 KiB
Java
35 lines
1.3 KiB
Java
package com.gunshi.project.xyt.mapper;
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.gunshi.project.xyt.entity.so.TermiteSurveyPageSo;
|
|
import com.gunshi.project.xyt.model.TermiteSurvey;
|
|
import com.gunshi.project.xyt.model.TermiteSurveyDetail;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
/**
|
|
* 描述: 白蚁普查明细
|
|
* author: xusan
|
|
* date: 2024-08-28 10:25:17
|
|
*/
|
|
@Mapper
|
|
public interface TermiteSurveyDetailMapper extends BaseMapper<TermiteSurveyDetail> {
|
|
|
|
@Select("""
|
|
<script>
|
|
select d.*, s.report_date from termite_survey_detail d left join termite_survey s on d.survey_id = s.id
|
|
<where>
|
|
<if test="obj.searchDate != null and obj.searchDate != null">
|
|
and s.report_date = #{obj.searchDate}
|
|
</if>
|
|
<if test="obj.pileNumber != null and obj.pileNumber != '' ">
|
|
and d.pile_number = #{obj.pileNumber}
|
|
</if>
|
|
</where>
|
|
order by s.report_date desc
|
|
</script>
|
|
""")
|
|
Page<TermiteSurveyDetail> pageQuery(Page<TermiteSurveyDetail> page,@Param("obj") TermiteSurveyPageSo page1);
|
|
} |