Browse Source

处分管理,移动端接口调整

dzx 1 year ago
parent
commit
5d7a8ad64d

+ 0 - 4
src/main/java/com/xjrsoft/module/student/controller/BaseStudentBehaviorManageController.java

@@ -67,10 +67,6 @@ public class BaseStudentBehaviorManageController {
         return RT.ok(ConventPage.getPageOutput(page, BaseStudentBehaviorManageMobilePageVo.class));
     }
 
-    PageOutput<BaseStudentBehaviorManagePageVo> getData(BaseStudentBehaviorManagePageDto dto){
-
-        return null;
-    }
 
     @GetMapping(value = "/info")
     @ApiOperation(value="根据id查询学生操行分记录管理信息(pc端)")

+ 17 - 11
src/main/java/com/xjrsoft/module/student/controller/BaseStudentPunishmentInfoController.java

@@ -3,14 +3,16 @@ package com.xjrsoft.module.student.controller;
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
-import com.xjrsoft.module.base.mapper.BaseSemesterMapper;
-import com.xjrsoft.module.student.dto.*;
+import com.xjrsoft.module.student.dto.AddBaseStudentPunishmentInfoDto;
+import com.xjrsoft.module.student.dto.BaseStudentPunishmentInfoMobileDetailDto;
+import com.xjrsoft.module.student.dto.BaseStudentPunishmentInfoMobilePageDto;
+import com.xjrsoft.module.student.dto.BaseStudentPunishmentInfoPageDto;
+import com.xjrsoft.module.student.dto.UpdateBaseStudentPunishmentInfoDto;
 import com.xjrsoft.module.student.entity.BaseStudentPunishmentInfo;
-import com.xjrsoft.module.student.mapper.BasePunishmentStudentRelationMapper;
-import com.xjrsoft.module.student.mapper.BasePunishmentTypeMapper;
 import com.xjrsoft.module.student.service.IBaseStudentPunishmentInfoService;
 import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoDetailVo;
 import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoMobileDetailVo;
@@ -19,7 +21,14 @@ import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoPageVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
 import java.util.List;
@@ -38,9 +47,6 @@ public class BaseStudentPunishmentInfoController {
 
 
     private final IBaseStudentPunishmentInfoService baseStudentPunishmentInfoService;
-    private final BasePunishmentStudentRelationMapper basePunishmentStudentRelationMapper;
-    private final BasePunishmentTypeMapper basePunishmentTypeMapper;
-    private final BaseSemesterMapper baseSemesterMapper;
 
     @GetMapping(value = "/page")
     @ApiOperation(value="学生处分信息管理列表(分页)")
@@ -56,7 +62,7 @@ public class BaseStudentPunishmentInfoController {
     @SaCheckPermission("basestudentpunishmentinfo:detail")
     public RT<PageOutput<BaseStudentPunishmentInfoMobilePageVo>> mobilePage(@Valid BaseStudentPunishmentInfoMobilePageDto dto){
 
-        IPage<BaseStudentPunishmentInfoMobilePageVo> paglIst = baseStudentPunishmentInfoService.selectJoinListPageMobile(dto);
+        IPage<BaseStudentPunishmentInfoMobilePageVo> paglIst = baseStudentPunishmentInfoService.getMobilePage(new Page<>(dto.getLimit(), dto.getSize()), dto);
         PageOutput<BaseStudentPunishmentInfoMobilePageVo> pageOutput = ConventPage.getPageOutput(paglIst, BaseStudentPunishmentInfoMobilePageVo.class);
         return RT.ok(pageOutput);
     }
@@ -75,8 +81,8 @@ public class BaseStudentPunishmentInfoController {
     @GetMapping(value = "/mobile-info")
     @ApiOperation(value="根据id查询学生处分信息管理信息(移动端)")
     @SaCheckPermission("basestudentpunishmentinfo:detail")
-    public RT<BaseStudentPunishmentInfoMobileDetailVo> mobileInfo(@Valid BaseStudentPunishmentInfoMobileDetailDto dto){
-        BaseStudentPunishmentInfoMobileDetailVo baseStudentPunishmentInfoMobileDetailVo = baseStudentPunishmentInfoService.getDetailById(dto);
+    public RT<BaseStudentPunishmentInfoMobileDetailVo> mobileInfo(@RequestParam Long id){
+        BaseStudentPunishmentInfoMobileDetailVo baseStudentPunishmentInfoMobileDetailVo = baseStudentPunishmentInfoService.getMobileInfo(id);
         if (baseStudentPunishmentInfoMobileDetailVo == null) {
             return RT.error("找不到此数据!");
         }

+ 10 - 12
src/main/java/com/xjrsoft/module/student/dto/BaseStudentPunishmentInfoMobilePageDto.java

@@ -1,12 +1,13 @@
 package com.xjrsoft.module.student.dto;
 
-import com.alibaba.excel.annotation.ExcelProperty;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.xjrsoft.common.page.PageInput;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.util.List;
+
 
 /**
 * @title: 学生处分信息管理移动端列表查询入参
@@ -19,24 +20,21 @@ import lombok.EqualsAndHashCode;
 public class BaseStudentPunishmentInfoMobilePageDto extends PageInput {
     @JsonFormat(pattern = "yyyy-MM-dd")
     @ApiModelProperty("处分开始日期")
-    private String startTime;
+    private String startDate;
 
     @JsonFormat(pattern = "yyyy-MM-dd")
     @ApiModelProperty("处分结束日期")
-    private String endTime;
+    private String endDate;
 
-    @ApiModelProperty("处分类型id")
-    private Integer punishmentTypeId;
+    @ApiModelProperty("班级id")
+    private List<Long> punishmentTypeIds;
 
-    @ApiModelProperty("是否公示")
-    private Integer isPublicity;
+    @ApiModelProperty("是否处理(1:是 0:否)")
+    private Integer isHandle;
 
-    /**
-     * 学生姓名(模糊查询)
-     */
     @ApiModelProperty("学生姓名")
     private String studentName;
 
-    @ApiModelProperty("班级id")
-    private Long classId;
+    @ApiModelProperty("教师id")
+    private Long teacherId;
 }

+ 18 - 0
src/main/java/com/xjrsoft/module/student/mapper/BaseStudentPunishmentInfoMapper.java

@@ -1,8 +1,15 @@
 package com.xjrsoft.module.student.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.student.dto.BaseStudentBehaviorManageMobilePageDto;
+import com.xjrsoft.module.student.dto.BaseStudentPunishmentInfoMobileDetailDto;
+import com.xjrsoft.module.student.dto.BaseStudentPunishmentInfoMobilePageDto;
 import com.xjrsoft.module.student.entity.BaseStudentPunishmentInfo;
+import com.xjrsoft.module.student.vo.BaseStudentBehaviorManageMobilePageVo;
+import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoMobileDetailVo;
+import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoMobilePageVo;
 import org.apache.ibatis.annotations.Mapper;
 
 /**
@@ -13,5 +20,16 @@ import org.apache.ibatis.annotations.Mapper;
 */
 @Mapper
 public interface BaseStudentPunishmentInfoMapper extends MPJBaseMapper<BaseStudentPunishmentInfo> {
+    /**
+     * app分页查询
+     * @param page
+     * @param dto
+     * @return
+     */
+    Page<BaseStudentPunishmentInfoMobilePageVo> getMobilePage(Page<BaseStudentPunishmentInfoMobilePageDto> page, BaseStudentPunishmentInfoMobilePageDto dto);
 
+    /**
+     * app分页查询
+     */
+    BaseStudentPunishmentInfoMobileDetailVo getMobileInfo(Long id);
 }

+ 13 - 5
src/main/java/com/xjrsoft/module/student/service/IBaseStudentPunishmentInfoService.java

@@ -1,7 +1,7 @@
 package com.xjrsoft.module.student.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseService;
 import com.xjrsoft.module.student.dto.BaseStudentPunishmentInfoMobileDetailDto;
 import com.xjrsoft.module.student.dto.BaseStudentPunishmentInfoMobilePageDto;
@@ -11,7 +11,7 @@ import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoDetailVo;
 import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoMobileDetailVo;
 import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoMobilePageVo;
 import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoPageVo;
-import lombok.Data;
+
 import java.util.List;
 
 /**
@@ -38,17 +38,16 @@ public interface IBaseStudentPunishmentInfoService extends MPJBaseService<BaseSt
 
     /**
      * 学生处分信息详情
-     * @param dto 学生处分信息管理详情入参(移动端)
      * @return
      */
-    BaseStudentPunishmentInfoMobileDetailVo getDetailById(BaseStudentPunishmentInfoMobileDetailDto dto);
+    BaseStudentPunishmentInfoMobileDetailVo getMobileInfo(Long id);
 
     /**
      * 学生处分信息管理列表(分页)(移动端)
      * @param dto 处分管理信息前端请求实体对象(移动端)
      * @return
      */
-    IPage<BaseStudentPunishmentInfoMobilePageVo> selectJoinListPageMobile(BaseStudentPunishmentInfoMobilePageDto dto);
+    IPage<BaseStudentPunishmentInfoMobilePageVo> getMobilePage(BaseStudentPunishmentInfoMobilePageDto dto);
 
 
     /**
@@ -74,4 +73,13 @@ public interface IBaseStudentPunishmentInfoService extends MPJBaseService<BaseSt
     * @return
     */
     Boolean delete(List<Long> ids);
+
+    /**
+     * app分页查询
+     * @param page
+     * @param dto
+     * @return
+     */
+    Page<BaseStudentPunishmentInfoMobilePageVo> getMobilePage(Page<BaseStudentPunishmentInfoMobilePageDto> page, BaseStudentPunishmentInfoMobilePageDto dto);
+
 }

+ 16 - 60
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentPunishmentInfoServiceImpl.java

@@ -1,10 +1,12 @@
 package com.xjrsoft.module.student.service.impl;
 
+import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.github.yulichang.toolkit.MPJWrappers;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
@@ -16,8 +18,8 @@ import com.xjrsoft.module.student.dto.BaseStudentPunishmentInfoMobilePageDto;
 import com.xjrsoft.module.student.dto.BaseStudentPunishmentInfoPageDto;
 import com.xjrsoft.module.student.entity.BasePunishmentStudentRelation;
 import com.xjrsoft.module.student.entity.BasePunishmentType;
-import com.xjrsoft.module.student.mapper.BasePunishmentStudentRelationMapper;
 import com.xjrsoft.module.student.entity.BaseStudentPunishmentInfo;
+import com.xjrsoft.module.student.mapper.BasePunishmentStudentRelationMapper;
 import com.xjrsoft.module.student.mapper.BaseStudentPunishmentInfoMapper;
 import com.xjrsoft.module.student.service.IBasePunishStudentRelationService;
 import com.xjrsoft.module.student.service.IBaseStudentPunishmentInfoService;
@@ -25,14 +27,13 @@ import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoDetailVo;
 import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoMobileDetailVo;
 import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoMobilePageVo;
 import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoPageVo;
-import com.xjrsoft.module.teacher.entity.XjrUser;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+
 import java.util.List;
 import java.util.Objects;
 import java.util.stream.Collectors;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 
 /**
 * @title: 学生处分信息管理
@@ -77,31 +78,10 @@ public class BaseStudentPunishmentInfoServiceImpl extends MPJBaseServiceImpl<Bas
     }
 
     @Override
-    public IPage<BaseStudentPunishmentInfoMobilePageVo> selectJoinListPageMobile(BaseStudentPunishmentInfoMobilePageDto dto) {
-
-        MPJLambdaWrapper<BaseStudentPunishmentInfo> wrapper = MPJWrappers.<BaseStudentPunishmentInfo>lambdaJoin()
-                .select(BaseStudentPunishmentInfo::getId)
-                .select(BasePunishmentStudentRelation::getStudentId)
-                .select(BasePunishmentStudentRelation::getUserId)
-                .selectAs(BasePunishmentType::getPunishmentType, BaseStudentPunishmentInfoMobilePageVo::getPunishmentType)
-                .select(BaseStudentPunishmentInfo::getStartTime)
-                .selectAs(BasePunishmentStudentRelation::getName, BaseStudentPunishmentInfoMobilePageVo::getStudentName)
-                .select(BasePunishmentStudentRelation::getGender)
-                .select(BaseStudentPunishmentInfo::getReason)
-                .innerJoin(BasePunishmentStudentRelation.class, BasePunishmentStudentRelation::getPunishmentInfoId, BaseStudentPunishmentInfo::getId)
-                .innerJoin(BasePunishmentType.class, BasePunishmentType::getId, BaseStudentPunishmentInfo::getPunishmentTypeId)
-                .eq(ObjectUtil.isNotNull(dto.getIsPublicity()), BaseStudentPunishmentInfo::getIsPublicity, dto.getIsPublicity())
-                .eq(ObjectUtil.isNotNull(dto.getPunishmentTypeId()) && dto.getPunishmentTypeId() > 0, BaseStudentPunishmentInfo::getPunishmentTypeId, dto.getPunishmentTypeId())
-                .eq(ObjectUtil.isNotNull(dto.getClassId()) && dto.getClassId() > 0, BaseStudentPunishmentInfo::getClassId, dto.getClassId())
-                .eq(StrUtil.isNotBlank(dto.getStartTime()), BaseStudentPunishmentInfo::getStartTime, dto.getStartTime())
-                .eq(StrUtil.isNotBlank(dto.getEndTime()), BaseStudentPunishmentInfo::getEndTime, dto.getEndTime())
-                .like(StrUtil.isNotBlank(dto.getStudentName()), BasePunishmentStudentRelation::getName, dto.getStudentName())
-                .eq(BaseStudentPunishmentInfo::getDeleteMark, 0)
-                .orderByDesc(BaseStudentPunishmentInfo::getId);
+    public IPage<BaseStudentPunishmentInfoMobilePageVo> getMobilePage(BaseStudentPunishmentInfoMobilePageDto dto) {
 
-        IPage<BaseStudentPunishmentInfoMobilePageVo> pageList = this.selectJoinListPage(ConventPage.getPage(dto), BaseStudentPunishmentInfoMobilePageVo.class, wrapper);
 
-        return pageList;
+        return null;
     }
 
     /**
@@ -141,43 +121,12 @@ public class BaseStudentPunishmentInfoServiceImpl extends MPJBaseServiceImpl<Bas
 
     /**
      * 学生处分信息详情
-     * @param dto 学生处分信息管理详情入参(移动端)
      * @return
      */
     @Override
-    public BaseStudentPunishmentInfoMobileDetailVo getDetailById(BaseStudentPunishmentInfoMobileDetailDto dto) {
-        MPJLambdaWrapper<BaseStudentPunishmentInfo> wrapper = MPJWrappers.<BaseStudentPunishmentInfo>lambdaJoin()
-                .select(BaseStudentPunishmentInfo::getId)
-                .selectAs(BaseSemester::getName, BaseStudentPunishmentInfoPageVo::getBaseSemesterName)
-                .selectAs(BasePunishmentType::getPunishmentType, BaseStudentPunishmentInfoPageVo::getPunishmentType)
-                .selectAs(BaseClass::getName, BaseStudentPunishmentInfoPageVo::getClassName)
-                .select(BaseStudentPunishmentInfo::getStartTime)
-                .select(BaseStudentPunishmentInfo::getEndTime)
-                .select(BaseStudentPunishmentInfo::getIsPublicity)
-                .select(BaseStudentPunishmentInfo::getPushMessageObject)
-                .select(BaseStudentPunishmentInfo::getReason)
-                .selectAs(BasePunishmentStudentRelation::getName, BaseStudentPunishmentInfoMobileDetailVo::getStudentName)
-                .select(BasePunishmentStudentRelation::getGender)
-                .select(BasePunishmentStudentRelation::getStudentId)
-                .select(BasePunishmentStudentRelation::getStudentId)
-                .select(XjrUser::getCredentialNumber)
-                .select(BasePunishmentStudentRelation::getMajor)
-                .select(BasePunishmentStudentRelation::getAdjustType)
-                .select(BasePunishmentStudentRelation::getAdjustDate)
-                .select(BasePunishmentStudentRelation::getAdjustReason)
-                .select(BasePunishmentStudentRelation::getModifyDate)
-                .innerJoin(BaseSemester.class, BaseSemester::getId, BaseStudentPunishmentInfo::getBaseSemesterId)
-                .innerJoin(BasePunishmentType.class, BasePunishmentType::getId, BaseStudentPunishmentInfo::getPunishmentTypeId)
-                .innerJoin(BaseClass.class, BaseClass::getId, BaseStudentPunishmentInfo::getClassId)
-                .innerJoin(BasePunishmentStudentRelation.class, BasePunishmentStudentRelation::getPunishmentInfoId, BaseStudentPunishmentInfo::getId)
-                .innerJoin(XjrUser.class, XjrUser::getId, BasePunishmentStudentRelation::getUserId)
-                .eq(BaseStudentPunishmentInfo::getId, dto.getId())
-                .eq(BasePunishmentStudentRelation::getUserId, dto.getUserId())
-                .eq(BaseStudentPunishmentInfo::getDeleteMark, 0);
+    public BaseStudentPunishmentInfoMobileDetailVo getMobileInfo(Long id) {
 
-        BaseStudentPunishmentInfoMobileDetailVo baseStudentPunishmentInfoMobileDetailVo = this.selectJoinOne(BaseStudentPunishmentInfoMobileDetailVo.class, wrapper);
-
-        return baseStudentPunishmentInfoMobileDetailVo;
+        return baseStudentPunishmentInfoBaseStudentPunishmentInfoMapper.getMobileInfo(id);
     }
 
 
@@ -237,4 +186,11 @@ public class BaseStudentPunishmentInfoServiceImpl extends MPJBaseServiceImpl<Bas
 
         return true;
     }
+
+    @Override
+    public Page<BaseStudentPunishmentInfoMobilePageVo> getMobilePage(Page<BaseStudentPunishmentInfoMobilePageDto> page, BaseStudentPunishmentInfoMobilePageDto dto) {
+        dto.setTeacherId(StpUtil.getLoginIdAsLong());
+        Page<BaseStudentPunishmentInfoMobilePageVo> result = baseStudentPunishmentInfoBaseStudentPunishmentInfoMapper.getMobilePage(page, dto);
+        return result;
+    }
 }

+ 36 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentPunishmentInfoMobileDetailVo.java

@@ -74,4 +74,40 @@ public class BaseStudentPunishmentInfoMobileDetailVo extends BaseStudentPunishme
      */
     @ApiModelProperty("操作时间")
     private String modifyTime;
+
+    /**
+     * 处分日期
+     */
+    @ApiModelProperty("处分日期")
+    private String createTime;
+
+    /**
+     * 是否公示
+     */
+    @ApiModelProperty("是否公示")
+    private Integer isPublicity;
+
+    /**
+     * 处分开始日期
+     */
+    @ApiModelProperty("处分开始日期")
+    private String startTime;
+
+    /**
+     * 处分结束日期
+     */
+    @ApiModelProperty("处分结束日期")
+    private String endTime;
+
+    /**
+     * 处分原因
+     */
+    @ApiModelProperty("处分原因")
+    private String reason;
+
+    /**
+     * 处分类型
+     */
+    @ApiModelProperty("处分类型")
+    private String punishmentType;
 }

+ 4 - 3
src/main/java/com/xjrsoft/module/student/vo/BaseStudentPunishmentInfoMobilePageVo.java

@@ -38,10 +38,8 @@ public class BaseStudentPunishmentInfoMobilePageVo {
     @ApiModelProperty("处分原因")
     private String reason;
 
-    @ApiModelProperty("用户id")
-    private String userId;
 
-    @ApiModelProperty("学生id")
+    @ApiModelProperty("学号")
     private String studentId;
 
     @ApiModelProperty("学生姓名")
@@ -50,4 +48,7 @@ public class BaseStudentPunishmentInfoMobilePageVo {
     @ApiModelProperty("性别")
     private String gender;
 
+    @ApiModelProperty("证件号")
+    private String credentialNumber;
+
 }

+ 39 - 1
src/main/resources/mapper/student/BaseStudentPunishmentInfoMapper.xml

@@ -4,5 +4,43 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xjrsoft.module.student.mapper.BaseStudentPunishmentInfoMapper">
 
-
+    <select id="getMobilePage" parameterType="com.xjrsoft.module.student.dto.BaseStudentPunishmentInfoMobilePageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoMobilePageVo">
+        SELECT t.id,t3.name AS student_name,t3.gender,t3.credential_number,t4.punishment_type,t1.reason,t1.start_time FROM base_punishment_student_relation t
+        INNER JOIN base_student_punishment_info t1 ON t.punishment_info_id = t1.id
+        INNER JOIN base_student_school_roll t2 ON t.user_id = t2.user_id
+        INNER JOIN xjr_user t3 ON t.user_id = t3.id
+        LEFT JOIN base_punishment_type t4 ON t1.punishment_type_id = t4.id
+        LEFT JOIN base_class t5 ON t2.class_id = t5.id
+        WHERE t1.status = 1 AND t1.delete_mark = 0 AND t3.delete_mark = 0 AND t2.delete_mark = 0
+        AND t5.id IN (SELECT id  FROM base_class WHERE teacher_id  = #{dto.teacherId})
+        <if test="dto.punishmentTypeIds != null and dto.punishmentTypeIds != ''">
+            AND t4.id in
+            <foreach item="punishmentTypeId" index="index" collection="dto.punishmentTypeIds" open="(" close=")" separator=",">
+                #{punishmentTypeId}
+            </foreach>
+        </if>
+        <if test="dto.startDate != null and dto.startDate != ''">
+            and t1.start_time &gt;= #{dto.startDate}
+        </if>
+        <if test="dto.endDate != null and dto.endDate != ''">
+            and t1.start_time &lt;= #{dto.endDate}
+        </if>
+        <if test="dto.isHandle != null">
+            and t.adjust_type is not null
+        </if>
+        <if test="dto.studentName != null and dto.studentName != ''">
+            and t.name like concat('$',#{dto.studentName},'%')
+        </if>
+    </select>
+    <select id="getMobileInfo" parameterType="com.xjrsoft.module.student.dto.BaseStudentPunishmentInfoMobileDetailDto" resultType="com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoMobileDetailVo">
+        SELECT t.id,t3.name,t3.gender,t3.credential_number,t4.punishment_type,t1.reason,t1.start_time,t5.student_id,
+        t.adjust_date,t.adjust_type,t.adjust_reason,t.modify_date,t1.create_date,t1.is_publicity,t1.end_time,t.class_name,t.major FROM base_punishment_student_relation t
+        INNER JOIN base_student_punishment_info t1 ON t.punishment_info_id = t1.id
+        INNER JOIN base_student_school_roll t2 ON t.user_id = t2.user_id
+        INNER JOIN xjr_user t3 ON t.user_id = t3.id
+        INNER JOIN base_student t5 ON t5.user_id = t.user_id
+        LEFT JOIN base_punishment_type t4 ON t1.punishment_type_id = t4.id
+        WHERE t1.status = 1 AND t1.delete_mark = 0 AND t3.delete_mark = 0 AND t2.delete_mark = 0
+        and t.id = #{dto.id}
+    </select>
 </mapper>