Переглянути джерело

学生荣誉,提交列表和树的查询接口

dzx 1 рік тому
батько
коміт
ae92b1e655

+ 122 - 0
src/main/java/com/xjrsoft/module/student/controller/StudentHonorsController.java

@@ -0,0 +1,122 @@
+package com.xjrsoft.module.student.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.hutool.core.bean.BeanUtil;
+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.common.utils.TreeUtil;
+import com.xjrsoft.module.student.dto.AddStudentHonorsDto;
+import com.xjrsoft.module.student.dto.StudentHonorsPageDto;
+import com.xjrsoft.module.student.dto.UpdateStudentHonorsDto;
+import com.xjrsoft.module.student.entity.StudentHonors;
+import com.xjrsoft.module.student.service.IStudentHonorsService;
+import com.xjrsoft.module.student.vo.StudentHonorsPageVo;
+import com.xjrsoft.module.student.vo.StudentHonorsTreeVo;
+import com.xjrsoft.module.student.vo.StudentHonorsVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+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.ArrayList;
+import java.util.List;
+
+/**
+* @title: 学生荣誉
+* @Author dzx
+* @Date: 2023-12-05
+* @Version 1.0
+*/
+@RestController
+@RequestMapping("/student" + "/studentHonors")
+@Api(value = "/student"  + "/studentHonors",tags = "学生荣誉代码")
+@AllArgsConstructor
+public class StudentHonorsController {
+
+
+    private final IStudentHonorsService studentHonorsService;
+
+    @GetMapping(value = "/page")
+    @ApiOperation(value="学生荣誉列表(分页)")
+    @SaCheckPermission("studenthonors:detail")
+    public RT<PageOutput<StudentHonorsPageVo>> page(@Valid StudentHonorsPageDto dto){
+
+        Page<StudentHonorsPageVo> page = studentHonorsService.getPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
+        PageOutput<StudentHonorsPageVo> pageOutput = ConventPage.getPageOutput(page, StudentHonorsPageVo.class);
+        return RT.ok(pageOutput);
+    }
+
+    @GetMapping(value = "/tree")
+    @ApiOperation(value = "学生荣誉列表(树)")
+    @SaCheckPermission("studenthonors:detail")
+    public RT<List<StudentHonorsTreeVo>> tree() {
+
+        List<StudentHonorsTreeVo> voList = new ArrayList<>();
+        studentHonorsService.getSemesterInfo().forEach((node) -> {
+            voList.add(new StudentHonorsTreeVo(){{
+                setId(node.getId());
+                setName(node.getName());
+            }});
+        });
+        studentHonorsService.getClassInfo().forEach((node) -> {
+            voList.add(new StudentHonorsTreeVo(){{
+                setId(node.getId());
+                setName(node.getName());
+                setParentId(node.getParentId());
+            }});
+        });
+        List<StudentHonorsTreeVo> treeVoList = TreeUtil.build(voList);
+
+        return RT.ok(treeVoList);
+    }
+
+    @GetMapping(value = "/info")
+    @ApiOperation(value="根据id查询学生荣誉信息")
+    @SaCheckPermission("studenthonors:detail")
+    public RT<StudentHonorsVo> info(@RequestParam Long id){
+        StudentHonors studentHonors = studentHonorsService.getById(id);
+        if (studentHonors == null) {
+           return RT.error("找不到此数据!");
+        }
+        return RT.ok(BeanUtil.toBean(studentHonors, StudentHonorsVo.class));
+    }
+
+
+    @PostMapping
+    @ApiOperation(value = "新增学生荣誉")
+    @SaCheckPermission("studenthonors:add")
+    public RT<Boolean> add(@Valid @RequestBody AddStudentHonorsDto dto){
+        StudentHonors studentHonors = BeanUtil.toBean(dto, StudentHonors.class);
+        boolean isSuccess = studentHonorsService.save(studentHonors);
+    return RT.ok(isSuccess);
+    }
+
+    @PutMapping
+    @ApiOperation(value = "修改学生荣誉")
+    @SaCheckPermission("studenthonors:edit")
+    public RT<Boolean> update(@Valid @RequestBody UpdateStudentHonorsDto dto){
+
+        StudentHonors studentHonors = BeanUtil.toBean(dto, StudentHonors.class);
+        return RT.ok(studentHonorsService.updateById(studentHonors));
+
+    }
+
+    @DeleteMapping
+    @ApiOperation(value = "删除学生荣誉")
+    @SaCheckPermission("studenthonors:delete")
+    public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
+        return RT.ok(studentHonorsService.removeBatchByIds(ids));
+
+    }
+
+}

+ 103 - 0
src/main/java/com/xjrsoft/module/student/dto/AddStudentHonorsDto.java

@@ -0,0 +1,103 @@
+package com.xjrsoft.module.student.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Date;
+
+
+
+/**
+* @title: 学生荣誉
+* @Author dzx
+* @Date: 2023-12-05
+* @Version 1.0
+*/
+@Data
+public class AddStudentHonorsDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 序号
+    */
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+    * 申请人
+    */
+    @ApiModelProperty("申请人")
+    private Long applicantUserId;
+    /**
+    * 数据录入方式 1=推荐 2=登记
+    */
+    @ApiModelProperty("数据录入方式 1=推荐 2=登记")
+    private Integer dataEntryMethod;
+    /**
+    * 学期ID(base_semester)
+    */
+    @ApiModelProperty("学期ID(base_semester)")
+    private Long baseSemesterId;
+    /**
+    * 班级id
+    */
+    @ApiModelProperty("班级id")
+    private Long classId;
+    /**
+    * 学生用户编号
+    */
+    @ApiModelProperty("学生用户编号")
+    private Long studentUserId;
+    /**
+    * 学号
+    */
+    @ApiModelProperty("学号")
+    private String studentId;
+    /**
+    * 所学专业
+    */
+    @ApiModelProperty("所学专业")
+    private String majorName;
+    /**
+    * 荣誉级别(xjr_dictionary_item[honors_level])
+    */
+    @ApiModelProperty("荣誉级别(xjr_dictionary_item[honors_level])")
+    private String honorsLevel;
+    /**
+    * 荣誉等级(xjr_dictionary_item[honors_grade])
+    */
+    @ApiModelProperty("荣誉等级(xjr_dictionary_item[honors_grade])")
+    private String honorsGrade;
+    /**
+    * 荣誉类型(xjr_dictionary_item[honors_type])
+    */
+    @ApiModelProperty("荣誉类型(xjr_dictionary_item[honors_type])")
+    private String honorsType;
+    /**
+    * 荣誉名称
+    */
+    @ApiModelProperty("荣誉名称")
+    private String name;
+    /**
+    * 获奖日期
+    */
+    @ApiModelProperty("获奖日期")
+    private Date awardDate;
+    /**
+    * 附件文件id
+    */
+    @ApiModelProperty("附件文件id")
+    private Long fileId;
+    /**
+    * 状态(1:结束 0:未结束)
+    */
+    @ApiModelProperty("状态(1:结束 0:未结束)")
+    private Integer status;
+
+}

+ 28 - 0
src/main/java/com/xjrsoft/module/student/dto/StudentHonorsPageDto.java

@@ -0,0 +1,28 @@
+package com.xjrsoft.module.student.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.Date;
+
+
+/**
+* @title: 学生荣誉分页查询入参
+* @Author dzx
+* @Date: 2023-12-05
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class StudentHonorsPageDto extends PageInput {
+
+    @ApiModelProperty("班级id")
+    public Long classId;
+
+}

+ 32 - 0
src/main/java/com/xjrsoft/module/student/dto/UpdateStudentHonorsDto.java

@@ -0,0 +1,32 @@
+package com.xjrsoft.module.student.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.io.Serializable;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import java.util.List;
+import java.util.Date;
+
+
+
+/**
+* @title: 学生荣誉
+* @Author dzx
+* @Date: 2023-12-05
+* @Version 1.0
+*/
+@Data
+public class UpdateStudentHonorsDto extends AddStudentHonorsDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    private Long id;
+}

+ 153 - 0
src/main/java/com/xjrsoft/module/student/entity/StudentHonors.java

@@ -0,0 +1,153 @@
+package com.xjrsoft.module.student.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.github.yulichang.annotation.EntityMapping;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.io.Serializable;
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Date;
+
+
+/**
+* @title: 学生荣誉
+* @Author dzx
+* @Date: 2023-12-05
+* @Version 1.0
+*/
+@Data
+@TableName("student_honors")
+@ApiModel(value = "student_honors", description = "学生荣誉")
+public class StudentHonors implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    @TableId
+    private Long id;
+    /**
+    * 创建人
+    */
+    @ApiModelProperty("创建人")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+    /**
+    * 创建时间
+    */
+    @ApiModelProperty("创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private Date createDate;
+    /**
+    * 修改人
+    */
+    @ApiModelProperty("修改人")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long modifyUserId;
+    /**
+    * 修改时间
+    */
+    @ApiModelProperty("修改时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private Date modifyDate;
+    /**
+    * 删除标记
+    */
+    @ApiModelProperty("删除标记")
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer deleteMark;
+    /**
+    * 有效标志
+    */
+    @ApiModelProperty("有效标志")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer enabledMark;
+    /**
+    * 序号
+    */
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+    * 申请人
+    */
+    @ApiModelProperty("申请人")
+    private Long applicantUserId;
+    /**
+    * 数据录入方式 1=推荐 2=登记
+    */
+    @ApiModelProperty("数据录入方式 1=推荐 2=登记")
+    private Integer dataEntryMethod;
+    /**
+    * 学期ID(base_semester)
+    */
+    @ApiModelProperty("学期ID(base_semester)")
+    private Long baseSemesterId;
+    /**
+    * 班级id
+    */
+    @ApiModelProperty("班级id")
+    private Long classId;
+    /**
+    * 学生用户编号
+    */
+    @ApiModelProperty("学生用户编号")
+    private Long studentUserId;
+    /**
+    * 学号
+    */
+    @ApiModelProperty("学号")
+    private String studentId;
+    /**
+    * 所学专业
+    */
+    @ApiModelProperty("所学专业")
+    private String majorName;
+    /**
+    * 荣誉级别(xjr_dictionary_item[honors_level])
+    */
+    @ApiModelProperty("荣誉级别(xjr_dictionary_item[honors_level])")
+    private String honorsLevel;
+    /**
+    * 荣誉等级(xjr_dictionary_item[honors_grade])
+    */
+    @ApiModelProperty("荣誉等级(xjr_dictionary_item[honors_grade])")
+    private String honorsGrade;
+    /**
+    * 荣誉类型(xjr_dictionary_item[honors_type])
+    */
+    @ApiModelProperty("荣誉类型(xjr_dictionary_item[honors_type])")
+    private String honorsType;
+    /**
+    * 荣誉名称
+    */
+    @ApiModelProperty("荣誉名称")
+    private String name;
+    /**
+    * 获奖日期
+    */
+    @ApiModelProperty("获奖日期")
+    private Date awardDate;
+    /**
+    * 附件文件id
+    */
+    @ApiModelProperty("附件文件id")
+    private Long fileId;
+    /**
+    * 状态(1:结束 0:未结束)
+    */
+    @ApiModelProperty("状态(1:结束 0:未结束)")
+    private Integer status;
+
+
+}

+ 28 - 0
src/main/java/com/xjrsoft/module/student/mapper/StudentHonorsMapper.java

@@ -0,0 +1,28 @@
+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.StudentHonorsPageDto;
+import com.xjrsoft.module.student.entity.StudentHonors;
+import com.xjrsoft.module.student.vo.StudentHonorsListVo;
+import com.xjrsoft.module.student.vo.StudentHonorsPageVo;
+import com.xjrsoft.module.student.vo.StudentHonorsTreeVo;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+* @title: 学生荣誉
+* @Author dzx
+* @Date: 2023-12-05
+* @Version 1.0
+*/
+@Mapper
+public interface StudentHonorsMapper extends MPJBaseMapper<StudentHonors> {
+    Page<StudentHonorsPageVo> getPage(Page<StudentHonorsPageDto> page, StudentHonorsPageDto dto);
+
+    List<StudentHonorsListVo> getClassInfo();
+
+    List<StudentHonorsListVo> getSemesterInfo();
+}

+ 27 - 0
src/main/java/com/xjrsoft/module/student/service/IStudentHonorsService.java

@@ -0,0 +1,27 @@
+package com.xjrsoft.module.student.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.student.dto.StudentHonorsPageDto;
+import com.xjrsoft.module.student.entity.StudentHonors;
+import com.xjrsoft.module.student.vo.StudentHonorsListVo;
+import com.xjrsoft.module.student.vo.StudentHonorsPageVo;
+import com.xjrsoft.module.student.vo.StudentHonorsTreeVo;
+
+import java.util.List;
+
+/**
+* @title: 学生荣誉
+* @Author dzx
+* @Date: 2023-12-05
+* @Version 1.0
+*/
+
+public interface IStudentHonorsService extends MPJBaseService<StudentHonors> {
+
+    Page<StudentHonorsPageVo> getPage(Page<StudentHonorsPageDto> page, StudentHonorsPageDto dto);
+
+    List<StudentHonorsListVo> getClassInfo();
+
+    List<StudentHonorsListVo> getSemesterInfo();
+}

+ 44 - 0
src/main/java/com/xjrsoft/module/student/service/impl/StudentHonorsServiceImpl.java

@@ -0,0 +1,44 @@
+package com.xjrsoft.module.student.service.impl;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.module.student.dto.StudentHonorsPageDto;
+import com.xjrsoft.module.student.entity.StudentHonors;
+import com.xjrsoft.module.student.mapper.StudentHonorsMapper;
+import com.xjrsoft.module.student.service.IStudentHonorsService;
+import com.xjrsoft.module.student.vo.StudentHonorsListVo;
+import com.xjrsoft.module.student.vo.StudentHonorsPageVo;
+import com.xjrsoft.module.student.vo.StudentHonorsTreeVo;
+import com.xjrsoft.module.system.service.IFileService;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+* @title: 学生荣誉
+* @Author dzx
+* @Date: 2023-12-05
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class StudentHonorsServiceImpl extends MPJBaseServiceImpl<StudentHonorsMapper, StudentHonors> implements IStudentHonorsService {
+    private final StudentHonorsMapper studentHonorsMapper;
+    private final IFileService fileService;
+    @Override
+    public Page<StudentHonorsPageVo> getPage(Page<StudentHonorsPageDto> page, StudentHonorsPageDto dto) {
+        Page<StudentHonorsPageVo> result = studentHonorsMapper.getPage(page, dto);
+        return result;
+    }
+
+    @Override
+    public List<StudentHonorsListVo> getClassInfo() {
+        return studentHonorsMapper.getClassInfo();
+    }
+
+    @Override
+    public List<StudentHonorsListVo> getSemesterInfo() {
+        return studentHonorsMapper.getSemesterInfo();
+    }
+}

+ 24 - 0
src/main/java/com/xjrsoft/module/student/vo/StudentHonorsListVo.java

@@ -0,0 +1,24 @@
+package com.xjrsoft.module.student.vo;
+
+import com.xjrsoft.common.model.tree.ITreeNode;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+public class StudentHonorsListVo implements ITreeNode<StudentHonorsListVo,Long>, Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private Long id;
+
+    @ApiModelProperty("名字")
+    private String name;
+
+    @ApiModelProperty("父级id")
+    private Long parentId;
+
+    private List<StudentHonorsListVo> children;
+}

+ 74 - 0
src/main/java/com/xjrsoft/module/student/vo/StudentHonorsPageVo.java

@@ -0,0 +1,74 @@
+package com.xjrsoft.module.student.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+* @title: 学生荣誉分页列表出参
+* @Author dzx
+* @Date: 2023-12-05
+* @Version 1.0
+*/
+@Data
+public class StudentHonorsPageVo {
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    private String id;
+    /**
+    * 序号
+    */
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+    * 学生姓名
+    */
+    @ApiModelProperty("学生姓名")
+    private String studentName;
+    /**
+    * 学号
+    */
+    @ApiModelProperty("学号")
+    private String studentId;
+    /**
+    * 荣誉级别(xjr_dictionary_item[honors_level])
+    */
+    @ApiModelProperty("荣誉级别(xjr_dictionary_item[honors_level])")
+    private String honorsLevel;
+    /**
+    * 荣誉等级(xjr_dictionary_item[honors_grade])
+    */
+    @ApiModelProperty("荣誉等级(xjr_dictionary_item[honors_grade])")
+    private String honorsGrade;
+    /**
+    * 荣誉类型(xjr_dictionary_item[honors_type])
+    */
+    @ApiModelProperty("荣誉类型(xjr_dictionary_item[honors_type])")
+    private String honorsType;
+    /**
+    * 荣誉名称
+    */
+    @ApiModelProperty("荣誉名称")
+    private String name;
+    /**
+    * 获奖日期
+    */
+    @ApiModelProperty("获奖日期")
+    private Date awardDate;
+    /**
+    * 附件文件id
+    */
+    @ApiModelProperty("附件文件id")
+    private Long fileId;
+    /**
+    * 状态(1:结束 0:未结束)
+    */
+    @ApiModelProperty("状态(1:结束 0:未结束)")
+    private Integer status;
+
+
+}

+ 24 - 0
src/main/java/com/xjrsoft/module/student/vo/StudentHonorsTreeVo.java

@@ -0,0 +1,24 @@
+package com.xjrsoft.module.student.vo;
+
+import com.xjrsoft.common.model.tree.ITreeNode;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+public class StudentHonorsTreeVo implements ITreeNode<StudentHonorsTreeVo,Long>, Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private Long id;
+
+    @ApiModelProperty("名字")
+    private String name;
+
+    @ApiModelProperty("父级id")
+    private Long parentId;
+
+    private List<StudentHonorsTreeVo> children;
+}

+ 104 - 0
src/main/java/com/xjrsoft/module/student/vo/StudentHonorsVo.java

@@ -0,0 +1,104 @@
+package com.xjrsoft.module.student.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Date;
+
+/**
+* @title: 学生荣誉表单出参
+* @Author dzx
+* @Date: 2023-12-05
+* @Version 1.0
+*/
+@Data
+public class StudentHonorsVo {
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    private Long id;
+    /**
+    * 序号
+    */
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+    * 申请人
+    */
+    @ApiModelProperty("申请人")
+    private Long applicantUserId;
+    /**
+    * 数据录入方式 1=推荐 2=登记
+    */
+    @ApiModelProperty("数据录入方式 1=推荐 2=登记")
+    private Integer dataEntryMethod;
+    /**
+    * 学期ID(base_semester)
+    */
+    @ApiModelProperty("学期ID(base_semester)")
+    private Long baseSemesterId;
+    /**
+    * 班级id
+    */
+    @ApiModelProperty("班级id")
+    private Long classId;
+    /**
+    * 学生用户编号
+    */
+    @ApiModelProperty("学生用户编号")
+    private Long studentUserId;
+    /**
+    * 学号
+    */
+    @ApiModelProperty("学号")
+    private String studentId;
+    /**
+    * 所学专业
+    */
+    @ApiModelProperty("所学专业")
+    private String majorName;
+    /**
+    * 荣誉级别(xjr_dictionary_item[honors_level])
+    */
+    @ApiModelProperty("荣誉级别(xjr_dictionary_item[honors_level])")
+    private String honorsLevel;
+    /**
+    * 荣誉等级(xjr_dictionary_item[honors_grade])
+    */
+    @ApiModelProperty("荣誉等级(xjr_dictionary_item[honors_grade])")
+    private String honorsGrade;
+    /**
+    * 荣誉类型(xjr_dictionary_item[honors_type])
+    */
+    @ApiModelProperty("荣誉类型(xjr_dictionary_item[honors_type])")
+    private String honorsType;
+    /**
+    * 荣誉名称
+    */
+    @ApiModelProperty("荣誉名称")
+    private String name;
+    /**
+    * 获奖日期
+    */
+    @ApiModelProperty("获奖日期")
+    private Date awardDate;
+    /**
+    * 附件文件id
+    */
+    @ApiModelProperty("附件文件id")
+    private Long fileId;
+    /**
+    * 状态(1:结束 0:未结束)
+    */
+    @ApiModelProperty("状态(1:结束 0:未结束)")
+    private Integer status;
+
+
+
+}

+ 26 - 0
src/main/resources/mapper/student/StudentHonorsMapper.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xjrsoft.module.student.mapper.StudentHonorsMapper">
+    <select id="getPage" parameterType="com.xjrsoft.module.student.dto.StudentHonorsPageDto" resultType="com.xjrsoft.module.student.vo.StudentHonorsPageVo">
+        SELECT t1.id,t1.sort_code,t2.name AS student_name,t1.student_id,t3.name AS honors_level,t4.name AS honors_type,
+        t5.name AS honors_grade,t1.name AS honors_name, t1.award_date,t1.status,t1.file_id FROM student_honors t1
+        LEFT JOIN xjr_user t2 ON t1.student_user_id = t2.id
+        LEFT JOIN xjr_dictionary_detail t3 ON t1.honors_level = t3.code AND t3.item_id = 1731576278748352514
+        LEFT JOIN xjr_dictionary_detail t4 ON t1.honors_type = t4.code AND t4.item_id = 1731577666295418881
+        LEFT JOIN xjr_dictionary_detail t5 ON t1.honors_grade = t5.code AND t5.item_id = 1731577201793028098
+        WHERE t1.delete_mark = 0 AND t1.class_id = #{dto.classId}
+    </select>
+
+    <select id="getSemesterInfo" resultType="com.xjrsoft.module.student.vo.StudentHonorsListVo">
+        SELECT DISTINCT t1.base_semester_id as id,t2.name FROM student_honors t1
+        INNER JOIN base_semester t2 ON t1.base_semester_id = t2.id
+        WHERE t1.delete_mark = 0
+    </select>
+    <select id="getClassInfo" resultType="com.xjrsoft.module.student.vo.StudentHonorsListVo">
+        SELECT DISTINCT t1.class_id as id,t2.name,t1.base_semester_id as parent_id FROM student_honors t1
+        INNER JOIN base_class t2 ON t1.class_id = t2.id
+        WHERE t1.delete_mark = 0
+    </select>
+</mapper>