37 lines
1.2 KiB
Java
37 lines
1.2 KiB
Java
|
|
package com.gunshi.project.hsz.mapper;
|
||
|
|
|
||
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||
|
|
import com.gunshi.project.hsz.model.RotaB;
|
||
|
|
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 RotaBMapper extends BaseMapper<RotaB> {
|
||
|
|
|
||
|
|
|
||
|
|
@Select("""
|
||
|
|
<script>
|
||
|
|
select t.*,s.nick_name as userName from public.rota_b t left join public.sys_user s on t.user_id = s.user_id
|
||
|
|
where to_char(t.rota_date, 'YYYY-MM') = #{yearMonth}
|
||
|
|
</script>
|
||
|
|
""")
|
||
|
|
List<RotaB> query(@Param("yearMonth") String yearMonth);
|
||
|
|
|
||
|
|
@Select("""
|
||
|
|
<script>
|
||
|
|
select t.*,s.nick_name as userName from public.rota_b t left join public.sys_user s on t.user_id = s.user_id
|
||
|
|
where to_char(t.rota_date, 'YYYY-MM-DD') = #{rotaDate} order by rota_type
|
||
|
|
</script>
|
||
|
|
""")
|
||
|
|
List<RotaB> dateList(@Param("rotaDate") String rotaDate);
|
||
|
|
|
||
|
|
@Select("""
|
||
|
|
<script>
|
||
|
|
select s.user_id from public.sys_user s where s.phonenumber = #{value}
|
||
|
|
</script>
|
||
|
|
""")
|
||
|
|
Long queryUser(@Param("value") String value);
|
||
|
|
}
|