mirror of
https://github.com/suyiiyii/SIMS.git
synced 2025-06-02 00:16:11 +08:00
cherry
This commit is contained in:
parent
31dbdd57e4
commit
17c3e251f2
@ -101,6 +101,7 @@ RecordController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@AuthAccess(allowRoles = {"admin"})
|
@AuthAccess(allowRoles = {"admin"})
|
||||||
@Operation(summary = "添加奖惩记录")
|
@Operation(summary = "添加奖惩记录")
|
||||||
@PostMapping("/admin/record")
|
@PostMapping("/admin/record")
|
||||||
|
@ -3,12 +3,14 @@ package top.suyiiyii.sims.controller;
|
|||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.modelmapper.ModelMapper;
|
import org.modelmapper.ModelMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import top.suyiiyii.sims.common.AuthAccess;
|
import top.suyiiyii.sims.common.AuthAccess;
|
||||||
|
import top.suyiiyii.sims.common.JwtInterceptor;
|
||||||
import top.suyiiyii.sims.common.Result;
|
import top.suyiiyii.sims.common.Result;
|
||||||
import top.suyiiyii.sims.dto.CommonResponse;
|
import top.suyiiyii.sims.dto.CommonResponse;
|
||||||
import top.suyiiyii.sims.dto.RecordDto;
|
import top.suyiiyii.sims.dto.RecordDto;
|
||||||
@ -45,6 +47,7 @@ public class RevokedController {
|
|||||||
CategoryService categoryService;
|
CategoryService categoryService;
|
||||||
@Autowired
|
@Autowired
|
||||||
RecordService recordService;
|
RecordService recordService;
|
||||||
|
|
||||||
//TODO 普通成员向管理员申请撤销
|
//TODO 普通成员向管理员申请撤销
|
||||||
@AuthAccess(allowRoles = {"user"})
|
@AuthAccess(allowRoles = {"user"})
|
||||||
@Operation(summary = "成员申请撤销")
|
@Operation(summary = "成员申请撤销")
|
||||||
|
@ -123,4 +123,15 @@ public class RecordService {
|
|||||||
public Integer getCategoryIdById(Integer id) {
|
public Integer getCategoryIdById(Integer id) {
|
||||||
return recordMapper.getCategoryIdById(id);
|
return recordMapper.getCategoryIdById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void update(Integer id, String userId, String adminRemark, String reason, Long handleTime) {
|
||||||
|
Boolean isRevoked=true;
|
||||||
|
recordMapper.update(id, isRevoked,userId, adminRemark, reason, handleTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void revokeUpdate(Integer id, String reason,String userId) {
|
||||||
|
String revokeReason="申请撤销";
|
||||||
|
Boolean isRevoked=true;
|
||||||
|
recordMapper.Rupdate(id, reason,isRevoked,revokeReason,userId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,11 +36,12 @@ public class RevokedService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void updateRevokeRequest(Integer id, String status, String adminRemark, String reason, Long handleTime) {
|
public void updateRevokeRequest(Integer id, String status, String adminRemark, String reason, Long handleTime) {
|
||||||
|
|
||||||
mpRevRequestMapper.update(id, status, adminRemark, reason, handleTime);
|
mpRevRequestMapper.update(id, status, adminRemark, reason, handleTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addRevokedRecord(Integer id, String userId, String reason, Long handleTime) {
|
||||||
|
mpRevRecord.addRevokedRecord(id, userId, reason, handleTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user