31 lines
1.3 KiB
Java
31 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.RotaLogPageSo;
|
|
import com.gunshi.project.xyt.model.RotaLog;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
@Mapper
|
|
public interface RotaLogMapper extends BaseMapper<RotaLog> {
|
|
|
|
@Select("""
|
|
<script>
|
|
select t.*,s.nick_name as leaderUserName,m.nick_name as dutyUserName from public.rota_log t
|
|
left join public.sys_user s on t.leader_user_id = s.user_id
|
|
left join public.sys_user m on t.duty_user_id = m.user_id
|
|
<where>
|
|
<if test="obj.dateSo != null and obj.dateSo.start != null">
|
|
t.rota_date <![CDATA[>=]]> #{obj.dateSo.start}
|
|
</if>
|
|
<if test="obj.dateSo != null and obj.dateSo.end != null">
|
|
and t.rota_date <![CDATA[<=]]> #{obj.dateSo.end}
|
|
</if>
|
|
</where>
|
|
order by t.rota_date desc
|
|
</script>
|
|
""")
|
|
Page<RotaLog> queryPage(Page<RotaLog> page,@Param("obj") RotaLogPageSo rotaLogPageSo);
|
|
} |