瀏覽代碼

Merge remote-tracking branch 'origin/dev' into dev

fanxp 2 月之前
父節點
當前提交
dc5d1afd30
共有 26 個文件被更改,包括 533 次插入40 次删除
  1. 147 0
      src/main/java/com/xjrsoft/module/base/controller/BaseClassDynamicsController.java
  2. 0 2
      src/main/java/com/xjrsoft/module/base/controller/WhitelistManagementController.java
  3. 47 0
      src/main/java/com/xjrsoft/module/base/dto/AddBaseClassDynamicsDto.java
  4. 19 0
      src/main/java/com/xjrsoft/module/base/dto/BaseClassDynamicsPageDto.java
  5. 0 1
      src/main/java/com/xjrsoft/module/base/dto/SetWhitelistEndTimeDto.java
  6. 24 0
      src/main/java/com/xjrsoft/module/base/dto/UpdateBaseClassDynamicsDto.java
  7. 0 8
      src/main/java/com/xjrsoft/module/base/dto/UpdateWhitelistManagementDto.java
  8. 0 7
      src/main/java/com/xjrsoft/module/base/dto/WhitelistManagementPageDto.java
  9. 99 0
      src/main/java/com/xjrsoft/module/base/entity/BaseClassDynamics.java
  10. 16 0
      src/main/java/com/xjrsoft/module/base/mapper/BaseClassDynamicsMapper.java
  11. 0 1
      src/main/java/com/xjrsoft/module/base/mapper/BaseUserStudentMapper.java
  12. 0 2
      src/main/java/com/xjrsoft/module/base/mapper/WhitelistManagementMapper.java
  13. 14 0
      src/main/java/com/xjrsoft/module/base/service/IBaseClassDynamicsService.java
  14. 19 0
      src/main/java/com/xjrsoft/module/base/service/impl/BaseClassDynamicsServiceImpl.java
  15. 0 1
      src/main/java/com/xjrsoft/module/base/service/impl/BaseMajorSetServiceImpl.java
  16. 0 2
      src/main/java/com/xjrsoft/module/base/service/impl/WhitelistManagementServiceImpl.java
  17. 53 0
      src/main/java/com/xjrsoft/module/base/vo/BaseClassDynamicsPageVo.java
  18. 51 0
      src/main/java/com/xjrsoft/module/base/vo/BaseClassDynamicsVo.java
  19. 0 8
      src/main/java/com/xjrsoft/module/base/vo/WhitelistManagementPageVo.java
  20. 0 6
      src/main/java/com/xjrsoft/module/base/vo/WhitelistManagementVo.java
  21. 2 0
      src/main/java/com/xjrsoft/module/student/mapper/BaseStudentSchoolRollMapper.java
  22. 2 0
      src/main/java/com/xjrsoft/module/student/service/IBaseStudentSchoolRollService.java
  23. 4 0
      src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentSchoolRollServiceImpl.java
  24. 5 1
      src/main/java/com/xjrsoft/module/textbook/controller/TextbookStudentClaimController.java
  25. 6 1
      src/main/resources/mapper/student/BaseStudentSchoolRollMapper.xml
  26. 25 0
      src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java

+ 147 - 0
src/main/java/com/xjrsoft/module/base/controller/BaseClassDynamicsController.java

@@ -0,0 +1,147 @@
+package com.xjrsoft.module.base.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.dev33.satoken.stp.StpUtil;
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.xjrsoft.common.enums.RoleEnum;
+import com.xjrsoft.common.model.result.RT;
+import com.xjrsoft.common.page.ConventPage;
+import com.xjrsoft.common.page.PageOutput;
+import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.base.dto.AddBaseClassDynamicsDto;
+import com.xjrsoft.module.base.dto.BaseClassDynamicsPageDto;
+import com.xjrsoft.module.base.dto.UpdateBaseClassDynamicsDto;
+import com.xjrsoft.module.base.entity.BaseClassDynamics;
+import com.xjrsoft.module.base.entity.BaseUserStudent;
+import com.xjrsoft.module.base.service.IBaseClassDynamicsService;
+import com.xjrsoft.module.base.service.IBaseUserStudentService;
+import com.xjrsoft.module.base.vo.BaseClassDynamicsPageVo;
+import com.xjrsoft.module.base.vo.BaseClassDynamicsVo;
+import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
+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.Date;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+* @title: 班级动态表
+* @Author dzx
+* @Date: 2024-09-04
+* @Version 1.0
+*/
+@RestController
+@RequestMapping("/base" + "/baseClassDynamics")
+@Api(value = "/base"  + "/baseClassDynamics",tags = "班级动态表代码")
+@AllArgsConstructor
+public class BaseClassDynamicsController {
+
+
+    private final IBaseClassDynamicsService baseClassDynamicsService;
+    private final IBaseStudentSchoolRollService rollService;
+    private final IBaseUserStudentService userStudentService;
+
+    @GetMapping(value = "/page")
+    @ApiOperation(value="班级动态表列表(分页)")
+    @SaCheckPermission("baseclassdynamics:detail")
+    public RT<PageOutput<BaseClassDynamicsPageVo>> page(@Valid BaseClassDynamicsPageDto dto){
+        List<String> roleList = StpUtil.getRoleList();
+        long userId = StpUtil.getLoginIdAsLong();
+        Integer roleType = null;
+        List<Long> classIds = new ArrayList<>();
+        if(roleList.contains("STUDENT")){
+            roleType = 3;
+            classIds.add(rollService.getClassIdByUserId(userId));
+        }
+        if(roleList.contains("PARENT")){
+            roleType = 4;
+            List<BaseUserStudent> list = userStudentService.list(new QueryWrapper<BaseUserStudent>().lambda().eq(BaseUserStudent::getUserId, userId));
+            for (BaseUserStudent userStudent : list) {
+                classIds.add(rollService.getClassIdByUserId(userStudent.getStudentId()));
+            }
+        }
+
+        LambdaQueryWrapper<BaseClassDynamics> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper
+                .orderByDesc(BaseClassDynamics::getId)
+                .select(BaseClassDynamics.class,x -> VoToColumnUtil.fieldsToColumns(BaseClassDynamicsPageVo.class).contains(x.getProperty()))
+                .like(roleType != null, BaseClassDynamics::getRoleType, roleType)
+                .in(!classIds.isEmpty(), BaseClassDynamics::getClassId, classIds)
+        ;
+        IPage<BaseClassDynamics> page = baseClassDynamicsService.page(ConventPage.getPage(dto), queryWrapper);
+        PageOutput<BaseClassDynamicsPageVo> pageOutput = ConventPage.getPageOutput(page, BaseClassDynamicsPageVo.class);
+        return RT.ok(pageOutput);
+    }
+
+    @GetMapping(value = "/release-page")
+    @ApiOperation(value="班主任发布列表(分页)")
+    @SaCheckPermission("baseclassdynamics:detail")
+    public RT<PageOutput<BaseClassDynamicsPageVo>> releasePage(@Valid BaseClassDynamicsPageDto dto){
+        long userId = StpUtil.getLoginIdAsLong();
+        LambdaQueryWrapper<BaseClassDynamics> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper
+                .orderByDesc(BaseClassDynamics::getId)
+                .select(BaseClassDynamics.class,x -> VoToColumnUtil.fieldsToColumns(BaseClassDynamicsPageVo.class).contains(x.getProperty()))
+                .eq(BaseClassDynamics::getCreateUserId, userId);
+        IPage<BaseClassDynamics> page = baseClassDynamicsService.page(ConventPage.getPage(dto), queryWrapper);
+        PageOutput<BaseClassDynamicsPageVo> pageOutput = ConventPage.getPageOutput(page, BaseClassDynamicsPageVo.class);
+        return RT.ok(pageOutput);
+    }
+
+
+    @GetMapping(value = "/info")
+    @ApiOperation(value="根据id查询班级动态表信息")
+    @SaCheckPermission("baseclassdynamics:detail")
+    public RT<BaseClassDynamicsVo> info(@RequestParam Long id){
+        BaseClassDynamics baseClassDynamics = baseClassDynamicsService.getById(id);
+        if (baseClassDynamics == null) {
+           return RT.error("找不到此数据!");
+        }
+        return RT.ok(BeanUtil.toBean(baseClassDynamics, BaseClassDynamicsVo.class));
+    }
+
+
+    @PostMapping
+    @ApiOperation(value = "新增班级动态表")
+    @SaCheckPermission("baseclassdynamics:add")
+    public RT<Boolean> add(@Valid @RequestBody AddBaseClassDynamicsDto dto){
+        BaseClassDynamics baseClassDynamics = BeanUtil.toBean(dto, BaseClassDynamics.class);
+        baseClassDynamics.setCreateDate(new Date());
+        boolean isSuccess = baseClassDynamicsService.save(baseClassDynamics);
+        return RT.ok(isSuccess);
+    }
+
+    @PutMapping
+    @ApiOperation(value = "修改班级动态表")
+    @SaCheckPermission("baseclassdynamics:edit")
+    public RT<Boolean> update(@Valid @RequestBody UpdateBaseClassDynamicsDto dto){
+
+        BaseClassDynamics baseClassDynamics = BeanUtil.toBean(dto, BaseClassDynamics.class);
+        baseClassDynamics.setModifyDate(new Date());
+        return RT.ok(baseClassDynamicsService.updateById(baseClassDynamics));
+
+    }
+
+    @DeleteMapping
+    @ApiOperation(value = "删除班级动态表")
+    @SaCheckPermission("baseclassdynamics:delete")
+    public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
+        return RT.ok(baseClassDynamicsService.removeBatchByIds(ids));
+    }
+
+}

+ 0 - 2
src/main/java/com/xjrsoft/module/base/controller/WhitelistManagementController.java

@@ -3,7 +3,6 @@ package com.xjrsoft.module.base.controller;
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
 import com.alibaba.excel.EasyExcel;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xjrsoft.common.model.result.RT;
@@ -18,7 +17,6 @@ import com.xjrsoft.module.base.entity.WhitelistManagement;
 import com.xjrsoft.module.base.service.IWhitelistManagementService;
 import com.xjrsoft.module.base.vo.WhitelistManagementPageVo;
 import com.xjrsoft.module.base.vo.WhitelistManagementVo;
-import com.xjrsoft.module.room.entity.RoomBed;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;

+ 47 - 0
src/main/java/com/xjrsoft/module/base/dto/AddBaseClassDynamicsDto.java

@@ -0,0 +1,47 @@
+package com.xjrsoft.module.base.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+
+/**
+* @title: 班级动态表
+* @Author dzx
+* @Date: 2024-09-04
+* @Version 1.0
+*/
+@Data
+public class AddBaseClassDynamicsDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 班级id
+    */
+    @ApiModelProperty("班级id")
+    private Long classId;
+    /**
+    * 标题
+    */
+    @ApiModelProperty("标题")
+    private String title;
+    /**
+    * 发送范围(学生、家长)
+    */
+    @ApiModelProperty("发送范围(学生、家长)")
+    private String roleType;
+    /**
+    * 内容
+    */
+    @ApiModelProperty("内容")
+    private String content;
+    /**
+    * 附件
+    */
+    @ApiModelProperty("附件")
+    private Long folderId;
+
+}

+ 19 - 0
src/main/java/com/xjrsoft/module/base/dto/BaseClassDynamicsPageDto.java

@@ -0,0 +1,19 @@
+package com.xjrsoft.module.base.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+
+/**
+* @title: 班级动态表分页查询入参
+* @Author dzx
+* @Date: 2024-09-04
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class BaseClassDynamicsPageDto extends PageInput {
+
+
+}

+ 0 - 1
src/main/java/com/xjrsoft/module/base/dto/SetWhitelistEndTimeDto.java

@@ -6,7 +6,6 @@ import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serializable;
 import java.time.LocalDate;
-import java.time.LocalDateTime;
 import java.util.List;
 
 

+ 24 - 0
src/main/java/com/xjrsoft/module/base/dto/UpdateBaseClassDynamicsDto.java

@@ -0,0 +1,24 @@
+package com.xjrsoft.module.base.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+
+/**
+* @title: 班级动态表
+* @Author dzx
+* @Date: 2024-09-04
+* @Version 1.0
+*/
+@Data
+public class UpdateBaseClassDynamicsDto extends AddBaseClassDynamicsDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long id;
+}

+ 0 - 8
src/main/java/com/xjrsoft/module/base/dto/UpdateWhitelistManagementDto.java

@@ -2,14 +2,6 @@ package com.xjrsoft.module.base.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;
 
 
 

+ 0 - 7
src/main/java/com/xjrsoft/module/base/dto/WhitelistManagementPageDto.java

@@ -1,16 +1,9 @@
 package com.xjrsoft.module.base.dto;
 
-import com.tencentcloudapi.cam.v20190116.models.StrategyInfo;
 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;
 
 
 /**

+ 99 - 0
src/main/java/com/xjrsoft/module/base/entity/BaseClassDynamics.java

@@ -0,0 +1,99 @@
+package com.xjrsoft.module.base.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+* @title: 班级动态表
+* @Author dzx
+* @Date: 2024-09-04
+* @Version 1.0
+*/
+@Data
+@TableName("base_class_dynamics")
+@ApiModel(value = "base_class_dynamics", description = "班级动态表")
+public class BaseClassDynamics 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;
+    /**
+    * 班级id
+    */
+    @ApiModelProperty("班级id")
+    private Long classId;
+    /**
+    * 标题
+    */
+    @ApiModelProperty("标题")
+    private String title;
+    /**
+    * 发送范围(学生、家长)
+    */
+    @ApiModelProperty("发送范围(学生、家长)")
+    private String roleType;
+    /**
+    * 内容
+    */
+    @ApiModelProperty("内容")
+    private String content;
+    /**
+    * 附件
+    */
+    @ApiModelProperty("附件")
+    private Long folderId;
+
+
+}

+ 16 - 0
src/main/java/com/xjrsoft/module/base/mapper/BaseClassDynamicsMapper.java

@@ -0,0 +1,16 @@
+package com.xjrsoft.module.base.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.base.entity.BaseClassDynamics;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @title: 班级动态表
+* @Author dzx
+* @Date: 2024-09-04
+* @Version 1.0
+*/
+@Mapper
+public interface BaseClassDynamicsMapper extends MPJBaseMapper<BaseClassDynamics> {
+
+}

+ 0 - 1
src/main/java/com/xjrsoft/module/base/mapper/BaseUserStudentMapper.java

@@ -1,7 +1,6 @@
 package com.xjrsoft.module.base.mapper;
 
 import com.github.yulichang.base.MPJBaseMapper;
-import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.entity.BaseUserStudent;
 import org.apache.ibatis.annotations.Mapper;
 

+ 0 - 2
src/main/java/com/xjrsoft/module/base/mapper/WhitelistManagementMapper.java

@@ -3,11 +3,9 @@ package com.xjrsoft.module.base.mapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseMapper;
 import com.xjrsoft.module.base.dto.WhitelistManagementPageDto;
-import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.entity.WhiteBaseClass;
 import com.xjrsoft.module.base.entity.WhiteBaseGrade;
 import com.xjrsoft.module.base.entity.WhitelistManagement;
-import com.xjrsoft.module.base.service.impl.WhitelistManagementServiceImpl;
 import com.xjrsoft.module.base.vo.WhitelistManagementPageVo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;

+ 14 - 0
src/main/java/com/xjrsoft/module/base/service/IBaseClassDynamicsService.java

@@ -0,0 +1,14 @@
+package com.xjrsoft.module.base.service;
+
+import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.base.entity.BaseClassDynamics;
+
+/**
+* @title: 班级动态表
+* @Author dzx
+* @Date: 2024-09-04
+* @Version 1.0
+*/
+
+public interface IBaseClassDynamicsService extends MPJBaseService<BaseClassDynamics> {
+}

+ 19 - 0
src/main/java/com/xjrsoft/module/base/service/impl/BaseClassDynamicsServiceImpl.java

@@ -0,0 +1,19 @@
+package com.xjrsoft.module.base.service.impl;
+
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.module.base.entity.BaseClassDynamics;
+import com.xjrsoft.module.base.mapper.BaseClassDynamicsMapper;
+import com.xjrsoft.module.base.service.IBaseClassDynamicsService;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+* @title: 班级动态表
+* @Author dzx
+* @Date: 2024-09-04
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class BaseClassDynamicsServiceImpl extends MPJBaseServiceImpl<BaseClassDynamicsMapper, BaseClassDynamics> implements IBaseClassDynamicsService {
+}

+ 0 - 1
src/main/java/com/xjrsoft/module/base/service/impl/BaseMajorSetServiceImpl.java

@@ -1,6 +1,5 @@
 package com.xjrsoft.module.base.service.impl;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.xjrsoft.module.base.entity.BaseMajorSet;
 import com.xjrsoft.module.base.mapper.BaseMajorSetMapper;

+ 0 - 2
src/main/java/com/xjrsoft/module/base/service/impl/WhitelistManagementServiceImpl.java

@@ -2,7 +2,6 @@ package com.xjrsoft.module.base.service.impl;
 
 import cn.dev33.satoken.secure.BCrypt;
 import cn.hutool.core.util.IdUtil;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -48,7 +47,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.CompletableFuture;
-import java.util.function.Consumer;
 import java.util.stream.Collectors;
 
 /**

+ 53 - 0
src/main/java/com/xjrsoft/module/base/vo/BaseClassDynamicsPageVo.java

@@ -0,0 +1,53 @@
+package com.xjrsoft.module.base.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+* @title: 班级动态表分页列表出参
+* @Author dzx
+* @Date: 2024-09-04
+* @Version 1.0
+*/
+@Data
+public class BaseClassDynamicsPageVo {
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private String id;
+    /**
+    * 创建时间
+    */
+    @ApiModelProperty("发布时间")
+    private Date createDate;
+    /**
+    * 班级id
+    */
+    @ApiModelProperty("班级id")
+    private Long classId;
+    /**
+    * 标题
+    */
+    @ApiModelProperty("标题")
+    private String title;
+    /**
+    * 发送范围(学生、家长)
+    */
+    @ApiModelProperty("发送范围(学生、家长)")
+    private String roleType;
+    /**
+    * 内容
+    */
+    @ApiModelProperty("内容")
+    private String content;
+    /**
+    * 附件
+    */
+    @ApiModelProperty("附件")
+    private Long folderId;
+
+}

+ 51 - 0
src/main/java/com/xjrsoft/module/base/vo/BaseClassDynamicsVo.java

@@ -0,0 +1,51 @@
+package com.xjrsoft.module.base.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+* @title: 班级动态表表单出参
+* @Author dzx
+* @Date: 2024-09-04
+* @Version 1.0
+*/
+@Data
+public class BaseClassDynamicsVo {
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long id;
+    /**
+    * 班级id
+    */
+    @ApiModelProperty("班级id")
+    private Long classId;
+    /**
+    * 标题
+    */
+    @ApiModelProperty("标题")
+    private String title;
+    /**
+    * 发送范围(学生、家长)
+    */
+    @ApiModelProperty("发送范围(学生、家长)")
+    private String roleType;
+    /**
+    * 内容
+    */
+    @ApiModelProperty("内容")
+    private String content;
+    /**
+    * 附件
+    */
+    @ApiModelProperty("附件")
+    private Long folderId;
+
+    @ApiModelProperty("发布时间")
+    private Date createDate;
+
+}

+ 0 - 8
src/main/java/com/xjrsoft/module/base/vo/WhitelistManagementPageVo.java

@@ -1,19 +1,11 @@
 package com.xjrsoft.module.base.vo;
 
 import com.alibaba.excel.annotation.ExcelProperty;
-import com.alibaba.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.write.style.ContentStyle;
-import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-import com.xjrsoft.common.annotation.Trans;
-import com.xjrsoft.common.enums.TransType;
-
 import java.time.LocalDate;
-import java.time.LocalTime;
-import java.time.LocalDateTime;
-import java.math.BigDecimal;
 import java.util.Date;
 
 /**

+ 0 - 6
src/main/java/com/xjrsoft/module/base/vo/WhitelistManagementVo.java

@@ -3,12 +3,6 @@ package com.xjrsoft.module.base.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 brealinxx

+ 2 - 0
src/main/java/com/xjrsoft/module/student/mapper/BaseStudentSchoolRollMapper.java

@@ -51,5 +51,7 @@ public interface BaseStudentSchoolRollMapper extends MPJBaseMapper<BaseStudentSc
 
     String getClassNameByUserId(@Param("userId") Long userId);
 
+    Long getClassIdByUserId(@Param("userId") Long userId);
+
 }
 

+ 2 - 0
src/main/java/com/xjrsoft/module/student/service/IBaseStudentSchoolRollService.java

@@ -53,4 +53,6 @@ public interface IBaseStudentSchoolRollService extends MPJBaseService<BaseStuden
     List<BaseStudentSompleInfoVo> getInfosByParam(BaseStudentSimpleInfoDto dto);
 
     String getClassNameByUserId(Long userId);
+
+    Long getClassIdByUserId(Long userId);
 }

+ 4 - 0
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentSchoolRollServiceImpl.java

@@ -211,4 +211,8 @@ public class BaseStudentSchoolRollServiceImpl extends MPJBaseServiceImpl<BaseStu
     public String getClassNameByUserId(Long userId){
         return baseStudentSchoolRollMapper.getClassNameByUserId(userId);
     }
+
+    public Long getClassIdByUserId(Long userId){
+        return baseStudentSchoolRollMapper.getClassIdByUserId(userId);
+    }
 }

+ 5 - 1
src/main/java/com/xjrsoft/module/textbook/controller/TextbookStudentClaimController.java

@@ -62,10 +62,14 @@ public class TextbookStudentClaimController {
     @ApiOperation(value="学生教材认领记录列表(分页)")
     @SaCheckPermission("textbookstudentclaim:detail")
     public RT<PageOutput<TextbookStudentClaimPageVo>> page(@Valid TextbookStudentClaimPageDto dto){
+        long userId = StpUtil.getLoginIdAsLong();
         LambdaQueryWrapper<TextbookStudentClaim> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper
                 .orderByDesc(TextbookStudentClaim::getId)
-                .select(TextbookStudentClaim.class,x -> VoToColumnUtil.fieldsToColumns(TextbookStudentClaimPageVo.class).contains(x.getProperty()));
+                .select(TextbookStudentClaim.class,x -> VoToColumnUtil.fieldsToColumns(TextbookStudentClaimPageVo.class).contains(x.getProperty()))
+                .eq(dto.getStudentUserId() != null, TextbookStudentClaim::getStudentUserId, dto.getStudentUserId())
+                .eq(TextbookStudentClaim::getIsClaim, 1)
+        ;
         IPage<TextbookStudentClaim> page = textbookStudentClaimService.page(ConventPage.getPage(dto), queryWrapper);
         PageOutput<TextbookStudentClaimPageVo> pageOutput = ConventPage.getPageOutput(page, TextbookStudentClaimPageVo.class);
         return RT.ok(pageOutput);

+ 6 - 1
src/main/resources/mapper/student/BaseStudentSchoolRollMapper.xml

@@ -196,7 +196,12 @@
 
     <select id="getClassNameByUserId" resultType="java.lang.String">
         SELECT t1.name FROM base_class t1
-        INNER JOIN base_student_school_roll ON t1.id = t2.class_id
+        INNER JOIN base_student_school_roll t2 ON t1.id = t2.class_id
+        WHERE t2.user_id = #{userId}
+    </select>
+    <select id="getClassIdByUserId" resultType="java.lang.Long">
+        SELECT t1.id FROM base_class t1
+        INNER JOIN base_student_school_roll t2 ON t1.id = t2.class_id
         WHERE t2.user_id = #{userId}
     </select>
 </mapper>

+ 25 - 0
src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java

@@ -3742,4 +3742,29 @@ public class FreeMarkerGeneratorTest {
 
         apiGeneratorService.generateCodes(params);
     }
+
+    @Test
+    public void gcBaseClassDynamics() throws IOException {
+        List<TableConfig> tableConfigs = new ArrayList<>();
+        TableConfig mainTable = new TableConfig();
+        mainTable.setTableName("base_class_dynamics");//init_sql中的表名
+        mainTable.setIsMain(true);//是否是主表,一般默认为true
+        mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
+        mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
+        tableConfigs.add(mainTable);
+
+        ApiGenerateCodesDto params = new ApiGenerateCodesDto();
+        params.setAuthor("dzx");//作者名称
+        params.setPackageName("base");//包名
+        params.setTableConfigs(tableConfigs);
+        params.setPage(true);//是否生成分页接口
+        params.setImport(false);//是否生成导入接口
+        params.setExport(false);//是否生成导出接口
+        params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
+        params.setDs(ds);
+
+        IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
+
+        apiGeneratorService.generateCodes(params);
+    }
 }