From fc41b97c07249254845bf2c598763f25eb2592f7 Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期二, 24 十月 2023 21:31:47 +0800
Subject: [PATCH] 运营商权限
---
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TGoodsController.java | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TGoodsController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TGoodsController.java
index e5d375b..6db3b75 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TGoodsController.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TGoodsController.java
@@ -158,7 +158,7 @@
List<StoreVos> provinces = pointMercharsClient.getProvinces(id);
model.addAttribute("city",provinces);
}
- if (infoOneVo.getUseScope() == 2){
+ if (infoOneVo.getUseScope() == 3){
List<StoreVos> storeVos = pointMercharsClient.getStoreList(id);
model.addAttribute("store",storeVos);
}
@@ -483,7 +483,6 @@
pointsMerchandise.setCoursePackageConfigId(coursePackageConfigId);
// 代替storeId
pointsMerchandise.setShelves(1);
- Integer id = pointMercharsClient.add(pointsMerchandise);
if(typeAll!=2){
if(useScope==2){
ArrayList<Map<String,String>> objects = new ArrayList<>();
@@ -495,11 +494,25 @@
map.put("pCode",pCity.getCode());
map.put("cName",tCity.getName());
map.put("cCode",tCity.getCode());
- map.put("id",id.toString());
+ map.put("id","0");
objects.add(map);
}
pointMercharsClient.addCitys(objects);
}else if(useScope==3){
+
+ Integer oid=null;
+ String[] split = storeIds.split(",");
+ for (int i = 0; i < split.length; i++) {
+ if(i==0){
+ Integer operatorId = storeService.getById(split[0]).getOperatorId();
+ oid=operatorId;
+ }
+ Integer operatorId = storeService.getById(split[i]).getOperatorId();
+ if(oid!=operatorId){
+ return "5003";
+ }
+ }
+ Integer id = pointMercharsClient.add(pointsMerchandise);
String pam = id+"_"+storeIds;
// 添加多个城市 门店
try{
@@ -508,7 +521,14 @@
}catch (Exception e){
e.printStackTrace();
}
+ }else if(useScope==1){
+ Integer id = pointMercharsClient.add(pointsMerchandise);
}
+
+
+
+ }else {
+ Integer id = pointMercharsClient.add(pointsMerchandise);
}
return new SuccessTip<>();
--
Gitblit v1.7.1