mirror of
https://github.com/suyiiyii/SIMS.git
synced 2025-06-03 12:56:10 +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.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import top.suyiiyii.sims.dto.RecordDto;
|
import top.suyiiyii.sims.dto.RecordDto;
|
||||||
import top.suyiiyii.sims.dto.UserRecordDto;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author tortoise
|
* @Author tortoise
|
||||||
|
@ -43,7 +43,6 @@ RecordController {
|
|||||||
List<Record> records = recordService.getAllRecords(page, size);
|
List<Record> records = recordService.getAllRecords(page, size);
|
||||||
List<RecordDto> recordDtos = new ArrayList<>();
|
List<RecordDto> recordDtos = new ArrayList<>();
|
||||||
for (Record record : records) {
|
for (Record record : records) {
|
||||||
|
|
||||||
RecordDto recordDto = modelMapper.map(record, RecordDto.class);
|
RecordDto recordDto = modelMapper.map(record, RecordDto.class);
|
||||||
recordDto.setCategoryName(categoryService.getCategoryName(record.getCategoryId()));
|
recordDto.setCategoryName(categoryService.getCategoryName(record.getCategoryId()));
|
||||||
recordDto.setSubCategoryName(categoryService.getsubCategoryName(record.getCategoryId()));
|
recordDto.setSubCategoryName(categoryService.getsubCategoryName(record.getCategoryId()));
|
||||||
@ -66,8 +65,6 @@ RecordController {
|
|||||||
RecordDto recordDto = modelMapper.map(record, RecordDto.class);
|
RecordDto recordDto = modelMapper.map(record, RecordDto.class);
|
||||||
recordDto.setCategoryName(categoryService.getCategoryName(record.getCategoryId()));
|
recordDto.setCategoryName(categoryService.getCategoryName(record.getCategoryId()));
|
||||||
recordDto.setSubCategoryName(categoryService.getsubCategoryName(record.getCategoryId()));
|
recordDto.setSubCategoryName(categoryService.getsubCategoryName(record.getCategoryId()));
|
||||||
|
|
||||||
|
|
||||||
recordDtos.add(recordDto);
|
recordDtos.add(recordDto);
|
||||||
}
|
}
|
||||||
return Result.success(recordDtos);
|
return Result.success(recordDtos);
|
||||||
@ -106,7 +103,7 @@ RecordController {
|
|||||||
recordService.addRecord(record);
|
recordService.addRecord(record);
|
||||||
return Result.msg("添加成功");
|
return Result.msg("添加成功");
|
||||||
}
|
}
|
||||||
@AuthAccess(allowRoles = {"admin"})
|
@AuthAccess(allowRoles = {"admin"})
|
||||||
@Operation(summary = "模糊查询奖惩记录")
|
@Operation(summary = "模糊查询奖惩记录")
|
||||||
@GetMapping("/admin/likeRecords")
|
@GetMapping("/admin/likeRecords")
|
||||||
public Result<List<RecordDto>> searchRecords(
|
public Result<List<RecordDto>> searchRecords(
|
||||||
|
@ -3,6 +3,7 @@ package top.suyiiyii.sims.controller;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.validation.constraints.Max;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -54,7 +55,6 @@ public class UserController {
|
|||||||
response.setToken(token);
|
response.setToken(token);
|
||||||
return Result.success(response);
|
return Result.success(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AuthAccess(allowRoles = {"guest"})
|
@AuthAccess(allowRoles = {"guest"})
|
||||||
@PostMapping("/user/register")
|
@PostMapping("/user/register")
|
||||||
public Result<CommonResponse> register(@RequestBody RegisterRequest request) {
|
public Result<CommonResponse> register(@RequestBody RegisterRequest request) {
|
||||||
@ -113,7 +113,6 @@ public class UserController {
|
|||||||
private String username;
|
private String username;
|
||||||
private Integer studentId;
|
private Integer studentId;
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
private String email;
|
private String email;
|
||||||
private String grade;
|
private String grade;
|
||||||
private String userGroup;
|
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