mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-05 06:51:23 +08:00
Gets the userID of the current login, and the transaction now committed is visible only to the approved object it is committed to. Fixed a bug where the transaction id was too long for approval.
This commit is contained in:
@@ -5,6 +5,7 @@ import com.cfive.pinnacle.entity.Affair;
|
||||
import com.cfive.pinnacle.entity.common.ResponseCode;
|
||||
import com.cfive.pinnacle.entity.common.ResponseResult;
|
||||
import com.cfive.pinnacle.service.IAffairService;
|
||||
import com.cfive.pinnacle.utils.WebUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -32,7 +33,7 @@ public class AffairController {
|
||||
@GetMapping("/NotApproved")
|
||||
public ResponseResult select_NotApproved() {
|
||||
LambdaQueryWrapper<Affair> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(Affair::getStatus, 0);
|
||||
wrapper.eq(Affair::getStatus, 0).eq(Affair::getInspectorId,WebUtil.getLoginUser().getUser().getId());
|
||||
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK, "success", affairService.list(wrapper));
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -30,6 +32,8 @@ public class Affair implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@TableId("id")
|
||||
private Long id;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user