mirror of
https://github.com/suyiiyii/SIMS.git
synced 2025-06-02 00:16:11 +08:00
调整个人查询
This commit is contained in:
parent
df55f364b0
commit
8767c5c554
@ -5,7 +5,6 @@ import org.modelmapper.convention.MatchingStrategies;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import top.suyiiyii.sims.dto.RecordDto;
|
||||
import top.suyiiyii.sims.dto.UserRecordDto;
|
||||
|
||||
/**
|
||||
* @Author tortoise
|
||||
|
@ -43,7 +43,6 @@ RecordController {
|
||||
List<Record> records = recordService.getAllRecords(page, size);
|
||||
List<RecordDto> recordDtos = new ArrayList<>();
|
||||
for (Record record : records) {
|
||||
|
||||
RecordDto recordDto = modelMapper.map(record, RecordDto.class);
|
||||
recordDto.setCategoryName(categoryService.getCategoryName(record.getCategoryId()));
|
||||
recordDto.setSubCategoryName(categoryService.getsubCategoryName(record.getCategoryId()));
|
||||
@ -66,8 +65,6 @@ RecordController {
|
||||
RecordDto recordDto = modelMapper.map(record, RecordDto.class);
|
||||
recordDto.setCategoryName(categoryService.getCategoryName(record.getCategoryId()));
|
||||
recordDto.setSubCategoryName(categoryService.getsubCategoryName(record.getCategoryId()));
|
||||
|
||||
|
||||
recordDtos.add(recordDto);
|
||||
}
|
||||
return Result.success(recordDtos);
|
||||
@ -106,7 +103,7 @@ RecordController {
|
||||
recordService.addRecord(record);
|
||||
return Result.msg("添加成功");
|
||||
}
|
||||
@AuthAccess(allowRoles = {"admin"})
|
||||
@AuthAccess(allowRoles = {"admin"})
|
||||
@Operation(summary = "模糊查询奖惩记录")
|
||||
@GetMapping("/admin/likeRecords")
|
||||
public Result<List<RecordDto>> searchRecords(
|
||||
|
@ -3,6 +3,7 @@ package top.suyiiyii.sims.controller;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -54,7 +55,6 @@ public class UserController {
|
||||
response.setToken(token);
|
||||
return Result.success(response);
|
||||
}
|
||||
|
||||
@AuthAccess(allowRoles = {"guest"})
|
||||
@PostMapping("/user/register")
|
||||
public Result<CommonResponse> register(@RequestBody RegisterRequest request) {
|
||||
@ -113,7 +113,6 @@ public class UserController {
|
||||
private String username;
|
||||
private Integer studentId;
|
||||
private String password;
|
||||
|
||||
private String email;
|
||||
private String grade;
|
||||
private String userGroup;
|
||||
|
@ -1,39 +0,0 @@
|
||||
package top.suyiiyii.sims.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author tortoise
|
||||
* @Date 2024/8/29 21:02
|
||||
* @PackageName:top.suyiiyii.sims.dto
|
||||
* @ClassName: UserRecordDto
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserRecordDto {
|
||||
// 用户ID
|
||||
private Integer studentId;
|
||||
|
||||
|
||||
private String categoryName;
|
||||
|
||||
private String subCategoryName;
|
||||
// 奖惩日期
|
||||
private Long date;
|
||||
// 奖惩内容
|
||||
private String content;
|
||||
// 奖惩原因
|
||||
private String reason;
|
||||
// 奖惩金额
|
||||
private Double amount;
|
||||
// 奖惩备注
|
||||
private String remark;
|
||||
// 是否撤销
|
||||
private Boolean isRevoked;
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user