From 0b37408e5f92f2c7f1dee8f4eb121db92a4edaa4 Mon Sep 17 00:00:00 2001
From: zepengdev <lzpsmith@outlook.com>
Date: Wed, 17 Sep 2025 19:39:30 +0800
Subject: [PATCH] fix: 调整店铺用户角色
---
oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreMerchantServiceImpl.java | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreMerchantServiceImpl.java b/oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreMerchantServiceImpl.java
index f3ce233..121e5a4 100644
--- a/oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreMerchantServiceImpl.java
+++ b/oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreMerchantServiceImpl.java
@@ -65,6 +65,8 @@
BeanUtil.copyProperties(request, existingStore, CopyOptions.create().setIgnoreNullValue(true));
storeService.update(existingStore, true);
} else if (AuditStatusEnum.APPROVED.equals(existingStatus)) {
+ Store originalStore = new Store();
+ BeanUtil.copyProperties(existingStore, originalStore, CopyOptions.create().setIgnoreNullValue(true));
Store newStore = new Store();
newStore.setQualifications(ListUtil.of());
BeanUtil.copyProperties(request, newStore, CopyOptions.create().setIgnoreNullValue(true));
@@ -95,6 +97,7 @@
StoreRevisionRecord revisionRecord = new StoreRevisionRecord();
BeanUtil.copyProperties(request, revisionRecord, CopyOptions.create().setIgnoreNullValue(true));
StoreAuditData auditData = new StoreAuditData();
+ auditData.setOriginalStore(originalStore);
auditData.setStore(newStore);
auditData.setRevisionRecord(revisionRecord);
this.createLatestModification(request.getStoreId(), StoreChangeTypeEnum.STORE_UPDATE, auditData);
@@ -109,7 +112,9 @@
if (StoreStatusEnum.OPEN.equals(businessStatus) && !AuditStatusEnum.APPROVED.equals(existingStatus)) {
throw new BadRequestException("店铺未审核");
}
- storeService.updateStatus(existingStore.getStoreId(), businessStatus.getValue(), existingStore.getVersion());
+ existingStore.setStatus(businessStatus.getValue());
+ existingStore.setBusinessStatus(businessStatus.getValue());
+ storeService.update(existingStore, true);
}
@Override
--
Gitblit v1.9.3