From 5f88f615ea49de4253739b205e6c1e4d7a79b8b9 Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Fri, 27 Nov 2020 10:40:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E6=B5=81=E7=A8=8B=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dq-financial-guarantee/pom.xml | 2 -- ...gGuaranteeLetterAssignUserServiceImpl.java | 1 + .../guarantee/util/AuditProcessUtil.java | 32 +++++++++---------- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/dq-financial-guarantee/pom.xml b/dq-financial-guarantee/pom.xml index 34b8e4d5..06bbfb6a 100644 --- a/dq-financial-guarantee/pom.xml +++ b/dq-financial-guarantee/pom.xml @@ -76,8 +76,6 @@ mybatis-plus-boot-starter 3.0.7.1 - - diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java index 5190d9e1..e944e3a9 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java @@ -11,6 +11,7 @@ import com.daqing.financial.guarantee.model.request.GuaranteeLetterUpdateStatusR import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse; import com.daqing.financial.guarantee.service.IDgGuaranteeLetterAssignUserService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.daqing.financial.guarantee.util.AuditProcessUtil; import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser; import com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider; import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider; diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java index e7c35e9b..c22e253d 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java @@ -2,36 +2,36 @@ package com.daqing.financial.guarantee.util; import com.daqing.financial.guarantee.mapper.DgAuditProcessMapper; import com.daqing.framework.domain.guarantee.DgAuditProcess; -import lombok.Data; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Configuration; +import org.springframework.stereotype.Component; + +import javax.annotation.PostConstruct; /** * @Author chen * @DATE 2020/11/26 15:45 * @Version 1.0 */ -@Data -@Configuration -public class AuditProcessUtil { - - private Integer businessId; - private String approver; - private String deptName; - private String auditOpinion; +@Component +public class AuditProcessUtil{ @Autowired - private DgAuditProcessMapper auditProcessMapper; + public DgAuditProcessMapper auditProcessMapper; - public AuditProcessUtil(Integer businessId, String approver, String deptName, String auditOpinion) { + private static AuditProcessUtil auditProcessUtil; + + @PostConstruct + public void init() { + auditProcessUtil = this; + auditProcessUtil.auditProcessMapper = this.auditProcessMapper; + } + + public static void save(Integer businessId, String approver, String deptName, String auditOpinion) { DgAuditProcess auditProcess = new DgAuditProcess(); auditProcess.setApprover(approver); auditProcess.setAuditOpinion(auditOpinion); auditProcess.setBusinessId(businessId); auditProcess.setDeptName(deptName); - auditProcessMapper.insert(auditProcess); - } - - public AuditProcessUtil() { + auditProcessUtil.auditProcessMapper.insert(auditProcess); } }