From 962f78c8383e7c884ddb08c951c15e5ba6eb4cb8 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期五, 23 十月 2026 15:43:33 +0800
Subject: [PATCH] fix: 完善审批流程与业务状态校验
---
yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/refund/CrmRefundMapper.java | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/refund/CrmRefundMapper.java b/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/refund/CrmRefundMapper.java
index 4ff9c7f..2b86217 100644
--- a/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/refund/CrmRefundMapper.java
+++ b/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/refund/CrmRefundMapper.java
@@ -5,6 +5,7 @@
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.crm.controller.admin.refund.vo.CrmRefundPageReqVO;
import cn.iocoder.yudao.module.crm.dal.dataobject.refund.CrmRefundDO;
+import cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import org.apache.ibatis.annotations.Mapper;
@@ -31,6 +32,8 @@
default int submitAndResetAuditInfo(Long id, Integer status) {
return update(null, new LambdaUpdateWrapper<CrmRefundDO>()
.eq(CrmRefundDO::getId, id)
+ .in(CrmRefundDO::getAuditStatus, CrmAuditStatusEnum.DRAFT.getStatus(),
+ CrmAuditStatusEnum.REJECT.getStatus())
.set(CrmRefundDO::getAuditStatus, status)
.set(CrmRefundDO::getReviewerId, null)
.set(CrmRefundDO::getReviewerName, null)
@@ -54,6 +57,7 @@
String reviewerName, String reviewRemark) {
return update(null, new LambdaUpdateWrapper<CrmRefundDO>()
.eq(CrmRefundDO::getId, id)
+ .eq(CrmRefundDO::getAuditStatus, CrmAuditStatusEnum.PROCESS.getStatus())
.set(CrmRefundDO::getAuditStatus, status)
.set(CrmRefundDO::getReviewerId, reviewerId)
.set(CrmRefundDO::getReviewerName, reviewerName)
--
Gitblit v1.9.3