From bd8b3f8e4b5d8af99f267eb5c6efaac03406c620 Mon Sep 17 00:00:00 2001 From: cjl <276999030@qq.com> Date: Tue, 26 Sep 2023 20:03:01 +0800 Subject: [PATCH] Merge branch 'wb' into qa --- screen-api/src/main/java/com/moral/api/service/impl/AllocationExtensionServiceImpl.java | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/screen-api/src/main/java/com/moral/api/service/impl/AllocationExtensionServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/AllocationExtensionServiceImpl.java index 998576e..ff1f734 100644 --- a/screen-api/src/main/java/com/moral/api/service/impl/AllocationExtensionServiceImpl.java +++ b/screen-api/src/main/java/com/moral/api/service/impl/AllocationExtensionServiceImpl.java @@ -16,6 +16,7 @@ import com.moral.api.service.AllocationExtensionService; import com.moral.api.service.AllocationService; import com.moral.api.service.FileTableService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -30,11 +31,11 @@ @Service public class AllocationExtensionServiceImpl extends ServiceImpl<AllocationExtensionMapper, AllocationExtension> implements AllocationExtensionService { - private final AllocationService allocationService; + @Autowired + private AllocationService allocationService; private final FileTableService fileTableService; - public AllocationExtensionServiceImpl(AllocationService allocationService, FileTableService fileTableService) { - this.allocationService = allocationService; + public AllocationExtensionServiceImpl( FileTableService fileTableService) { this.fileTableService = fileTableService; } @@ -73,16 +74,16 @@ @Override @Transactional - public boolean check(Integer id, Integer sate) { + public boolean check(Integer id, Integer state) { AllocationExtensionExt extensionExt = this.baseMapper.extOne(id); if(!AllocationExtensionApproveEnum.APPLYING.value.equals(extensionExt.getState())){ throw new BusinessException("������������������������������"); } AllocationExtension allocationExtension = new AllocationExtension(); allocationExtension.setId(id); - allocationExtension.setState(sate); + allocationExtension.setState(state); this.baseMapper.updateById(allocationExtension); - if(AllocationExtensionApproveEnum.PASS.value.equals(sate)){ + if(AllocationExtensionApproveEnum.PASS.value.equals(state)){ Allocation allocation = new Allocation(); allocation.setAllocationId(extensionExt.getAllocationId()); allocation.setChangeDay(extensionExt.getChangeDay()+extensionExt.getExtensionNum()); -- Gitblit v1.8.0