gunshi-project-ss/src/main/java/com/gunshi/project/xyt/mapper/OsmoticPressRMapper.java

43 lines
1.7 KiB
Java
Raw Normal View History

2024-07-08 17:47:02 +08:00
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.OsmoticQueryPageSo;
2024-07-08 17:47:02 +08:00
import com.gunshi.project.xyt.model.OsmoticPressR;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
2024-07-08 17:47:02 +08:00
/**
* :
* author: xusan
* date: 2024-07-08 15:44:07
*/
@Mapper
public interface OsmoticPressRMapper extends BaseMapper<OsmoticPressR> {
@Select("""
<script>
select t.*,s.*
from public.osmotic_press_r t
left join public.att_dam_profile s
on t.profile_code = s.profile_code
<where>
<if test="obj.stationCode != null and obj.stationCode !=''">
t.station_code =#{obj.stationCode}
</if>
<if test="obj.profileCode != null and obj.profileCode !=''">
t.profile_code =#{obj.profileCode}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
</where>
order by t.tm,t.station_code desc
</script>
""")
Page<OsmoticPressR> queryPage(Page<OsmoticPressR> page,@Param("obj") OsmoticQueryPageSo osmoticQueryPageSo);
2024-07-08 17:47:02 +08:00
}