| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- package com.template.mapper;
- import com.baomidou.mybatisplus.core.mapper.BaseMapper;
- import com.template.model.pojo.ClassSchedule;
- import org.apache.ibatis.annotations.Delete;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Param;
- import org.apache.ibatis.annotations.Select;
- import org.springframework.stereotype.Component;
- import java.time.LocalDate;
- import java.util.List;
- /**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author ceshi
- * @since 2023-11-06
- */
- @Mapper
- @Component
- public interface ClassScheduleMapper extends BaseMapper<ClassSchedule> {
- String remarks(@Param("localDate") LocalDate localDate,@Param("teacherName") String teacherName,@Param("jsgh")String jsgh);
- @Delete("delete from class_schedule where remark =#{remark} ")
- int removeByRemark(String remark);
- @Select({"<script>"+
- "select cs.*,o.name as orginizationName from class_schedule cs " +
- " left join users u on cs.jsgh=u.card_number and u.deleted=0" +
- " left join organization o on o.id=u.organ_id " +
- "where"+
- " cs.deleted=0" +
- " and cs.date_time = #{dateTime}\n" +
- " <if test=\"teacherName != null and teacherName != ''\">" +
- " and cs.jsxm like '%' #{teacherName} '%'" +
- " </if>" +
- " <if test=\"jsgh != null and jsgh != ''\">" +
- " and cs.jsgh = #{jsgh}\n" +
- " </if>"+
- "</script>"
- })
- List<ClassSchedule> listVo(String teacherName, String jsgh, LocalDate dateTime);
- }
|