Bladeren bron

采购详情、实施详情修改

tags/24080901
WendyYang 7 maanden geleden
bovenliggende
commit
057a7770d0
2 gewijzigde bestanden met toevoegingen van 6 en 2 verwijderingen
  1. +3
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/sys/controller/StagingController.java
  2. +3
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/sys/manage/StagingManage.java

+ 3
- 0
hz-pm-api/src/main/java/com/hz/pm/api/sys/controller/StagingController.java Bestand weergeven

@@ -3,6 +3,7 @@ package com.hz.pm.api.sys.controller;
import com.hz.pm.api.sys.manage.StagingManage;
import com.hz.pm.api.sys.model.dto.StagingDTO;
import com.hz.pm.api.sys.model.enumeration.StagingType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
@@ -17,6 +18,7 @@ import javax.validation.Valid;
* @author WendyYang
* @since 2024-03-25
*/
@Api(tags = "通用暂存控制器")
@RestController
@AllArgsConstructor
@RequestMapping("/api/v1/staging")
@@ -30,6 +32,7 @@ public class StagingController {
stagingManage.save(staging);
}

@ApiOperation("获取暂存详情")
@GetMapping(value = {"/detail/{type}", "/detail/{type}/{bizId}"})
public StagingDTO detail(@PathVariable StagingType type, @PathVariable(required = false) String bizId) {
return stagingManage.detail(type, bizId);


+ 3
- 2
hz-pm-api/src/main/java/com/hz/pm/api/sys/manage/StagingManage.java Bestand weergeven

@@ -44,7 +44,8 @@ public class StagingManage {
.eq(Staging::getType, type)
.eq(Staging::getCreateBy, LoginUserUtil.getUserId())
.eq(StrUtil.isNotBlank(bizId), Staging::getBizId, bizId)
.orderByDesc(Staging::getCreateOn, Staging::getId)
.orderByDesc(Staging::getCreateOn)
.orderByDesc(Staging::getId)
.last(BizConst.LIMIT_1);
Staging staging = stagingService.getOne(query);
if (staging == null) {
@@ -52,7 +53,7 @@ public class StagingManage {
}
StagingDTO detail = new StagingDTO();
detail.setId(staging.getId());
detail.setContent(staging.getType());
detail.setContent(staging.getContent());
detail.setType(StagingType.valueOf(staging.getType()));
detail.setBizId(staging.getBizId());
return detail;


Laden…
Annuleren
Opslaan