Эх сурвалжийг харах

店铺等级、开店时长、店铺经营状态修改

Gaosheng 1 долоо хоног өмнө
parent
commit
24cc35ba9f

+ 8 - 6
xinkeaboard-server/b2b2c-web/src/main/java/com/slodon/b2b2c/controller/seller/admin/AdminStoreAuditController.java

@@ -89,9 +89,9 @@ public class AdminStoreAuditController {
         StoreApplyExample example = new StoreApplyExample();
         if (WebSiteConstant.MEMBER_OVERSEA.equals(webSite)) {
             example.setStoreNameLike(storeName);
+            example.setStoreGradeId(storeGradeId);
         }
         example.setVendorNameLike(vendorName);
-        example.setStoreGradeId(storeGradeId);
         example.setStoreType(StoreConst.NO_OWN_STORE);
         example.setPager(pager);
         example.setOrderBy("submit_time desc");
@@ -102,14 +102,19 @@ public class AdminStoreAuditController {
         }
         List<StoreApply> storeApplyList = storeApplyModel.getStoreApplyList(example, pager);
         List<StoreName> storeNameList = Collections.emptyList();
+        List<StoreSiteInfo> storeSiteInfoList = Collections.emptyList();
         if (!WebSiteConstant.MEMBER_OVERSEA.equals(webSite)) {
             StoreNameExample storeNameExample = new StoreNameExample();
             storeNameExample.setStoreNameLike(storeName);
             storeNameExample.setWebSite(webSite);
             storeNameList = storeNameModel.getStoreNameList(new StoreNameExample(), null);
+            StoreSiteInfoExample storeSiteInfoExample = new StoreSiteInfoExample();
+            storeSiteInfoExample.setStoreGradeId(storeGradeId);
+            storeSiteInfoExample.setStoreIdIn(storeNameList.stream().map(StoreName::getStoreId).collect(Collectors.toList()));
+            storeSiteInfoList = storeSiteInfoModel.getStoreSiteInfoList(storeSiteInfoExample, null);
         }
         List<StoreApplyVO> vos = new ArrayList<>();
-        if (CollectionUtils.isEmpty(storeNameList) && !WebSiteConstant.MEMBER_OVERSEA.equals(webSite)) {
+        if (CollectionUtils.isEmpty(storeNameList) && !WebSiteConstant.MEMBER_OVERSEA.equals(webSite) && CollectionUtils.isEmpty(storeSiteInfoList)) {
             return SldResponse.success(new PageVO<>(vos, new PagerInfo(10, 1)));
         }
         if (!CollectionUtils.isEmpty(storeApplyList)) {
@@ -131,10 +136,7 @@ public class AdminStoreAuditController {
                     storeSiteInfoExample.setStoreId(storeApply.getStoreId());
                     storeSiteInfoExample.setWebSite(webSite);
                     StoreSiteInfo storeSiteInfo = storeSiteInfoModel.getStoreSiteInfo(storeSiteInfoExample);
-                    if (storeSiteInfo != null) {
-                        vo.setStoreGradeName(storeSiteInfo.getStoreGradeName());
-                    }
-
+                    vo.setStoreGradeName(storeSiteInfo != null ? storeSiteInfo.getStoreGradeName() : vo.getStoreGradeName());
                 }
 
                 //获取联系人名称和电话

+ 5 - 1
xinkeaboard-server/b2b2c-web/src/main/java/com/slodon/b2b2c/controller/seller/admin/AdminStoreController.java

@@ -97,9 +97,9 @@ public class AdminStoreController extends BaseController {
         if (WebSiteConstant.MEMBER_OVERSEA.equals(webSite)) {
             storeExample.setStoreNameLike(storeName);
             storeExample.setBusinessState(businessState);
+            storeExample.setStoreGradeId(storeGradeId);
         }
         storeExample.setVendorNameLike(vendorName);
-        storeExample.setStoreGradeId(storeGradeId);
         storeExample.setState(state);
         storeExample.setStateNotEquals(StoreConst.STORE_STATE_DELETE);
         storeExample.setIsOwnStore(StoreConst.NO_OWN_STORE);
@@ -114,6 +114,7 @@ public class AdminStoreController extends BaseController {
             storeNameList = storeNameModel.getStoreNameList(new StoreNameExample(), null);
             StoreSiteInfoExample storeSiteInfoExample = new StoreSiteInfoExample();
             storeSiteInfoExample.setBusinessState(businessState);
+            storeSiteInfoExample.setStoreGradeId(storeGradeId);
             storeSiteInfoExample.setStoreIdIn(storeNameList.stream().map(StoreName::getStoreId).collect(Collectors.toList()));
             storeSiteInfoList = storeSiteInfoModel.getStoreSiteInfoList(storeSiteInfoExample, null);
         }
@@ -134,7 +135,10 @@ public class AdminStoreController extends BaseController {
                     StoreSiteInfoExample storeSiteInfoExample = new StoreSiteInfoExample();
                     storeSiteInfoExample.setStoreId(store.getStoreId());
                     StoreSiteInfo storeSiteInfo = storeSiteInfoModel.getStoreSiteInfo(storeSiteInfoExample);
+                    vo.setStoreGradeName(storeSiteInfo != null ? storeSiteInfo.getStoreGradeName() : store.getStoreGradeName());
                     vo.setBusinessState(storeSiteInfo != null ? storeSiteInfo.getBusinessState() : StoreConst.STORE_BUSINESS_STATE_DECORATION);
+                    vo.setCreateTime(storeSiteInfo != null ? storeSiteInfo.getCreateTime() : store.getCreateTime());
+                    vo.setStoreExpireTime(storeSiteInfo != null ? storeSiteInfo.getStoreExpireTime() : store.getStoreExpireTime());
                 }
                 //根据店铺id获取商户账号
                 VendorExample vendorExample = new VendorExample();