From 45d37a6febb87837a6daa65429703a37e437d257 Mon Sep 17 00:00:00 2001
From: jiangqs <jiangqs>
Date: 星期一, 17 七月 2023 19:58:39 +0800
Subject: [PATCH] bug

---
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java
index 1eb0023..eeeacc4 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java
@@ -10,7 +10,6 @@
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.bean.BeanUtils;
 import com.ruoyi.common.core.utils.uuid.IdUtils;
-import com.ruoyi.common.security.utils.CodeFactoryUtil;
 import com.ruoyi.shop.domain.dto.*;
 import com.ruoyi.shop.domain.pojo.shop.*;
 import com.ruoyi.shop.domain.pojo.task.ShopFile;
@@ -213,10 +212,10 @@
             shop.setShopDetail(shopDetail);
         }
         //商户编号
-        if(mgtEditShopDto.getShopId()==null){
+        /*if(mgtEditShopDto.getShopId()==null){
             String shopNo = CodeFactoryUtil.getShopNo();
             shop.setShopNumber(shopNo);
-        }
+        }*/
         this.saveOrUpdate(shop);
         //商户标签
         String shopTagIds = mgtEditShopDto.getShopTagIds();
@@ -634,6 +633,9 @@
     public void transferMgtShop(MgtTransferShopDto mgtTransferShopDto){
         Shop shop = this.getByShopId(mgtTransferShopDto.getShopId());
         if(shop.getBelongUserId()!=null){
+            if(shop.getBelongUserId().equals(mgtTransferShopDto.getUserId())){
+                throw new ServiceException(AppErrorConstant.TRANS_NOT_MYSELF);
+            }
             ShopTransferRecord shopTransferRecord = new ShopTransferRecord();
             shopTransferRecord.setDelFlag(0);
             shopTransferRecord.setShopId(shop.getShopId());

--
Gitblit v1.7.1