From e863d3485d077c90988c81a756b37ef21cf4962e Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期五, 17 十一月 2023 20:16:01 +0800
Subject: [PATCH] 后台bug修改
---
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TShopController.java | 126 +++++++++++++++++++++---------------------
1 files changed, 63 insertions(+), 63 deletions(-)
diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TShopController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TShopController.java
index 9e87d2c..4f9e5a3 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TShopController.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TShopController.java
@@ -99,9 +99,9 @@
public Object addDevice(Integer id,Integer siteId,String device) {
HashMap<String, String> map = new HashMap<>();
map.put("sign","0DB011836143EEE2C2E072967C9F4E4B");
- map.put("space_id",siteId+"");
+ map.put("space_id",id.toString());
map.put("device_id",device);
- map.put("region_id",id.toString());
+ map.put("region_id",siteId+"");
// 添加门禁
String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map);
return SUCCESS_TIP;
@@ -172,7 +172,9 @@
@RequestMapping("/getCityYys")
@ResponseBody
public Object getCityYys(String province,Integer operatorId) {
-
+ if (UserExt.getUser().getObjectType() == 2){
+ operatorId = UserExt.getUser().getObjectId();
+ }
// 通过选择的省 获取管理的市
TOperatorCity byId = operatorCityService.getOne(new QueryWrapper<TOperatorCity>()
.eq("code",province).eq("operatorId",operatorId));
@@ -518,26 +520,12 @@
}else{
tStore.setOperatorId(yyId);
}
+ if (UserExt.getUser().getObjectType()==2){
+ tStore.setOperatorId(UserExt.getUser().getObjectId());
+ }
storeService.save(tStore);
user.setObjectId(tStore.getId());
userService.updateById(user);
-
-
-
- // 添加场地
- TSite tSite = new TSite();
- tSite.setName(tStore.getName());
- tSite.setStoreId(tStore.getId());
- tSite.setSign(1);
- siteService.save(tSite);
-
- HashMap<String, String> mapSite = new HashMap<>();
- mapSite.put("sign","0DB011836143EEE2C2E072967C9F4E4B");
- mapSite.put("name",tStore.getName());
- mapSite.put("space_id",tStore.getId().toString());
- mapSite.put("area_id",tSite.getId().toString());
- HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpaceArea", mapSite);
-
ArrayList<StoreConfig> storeConfigs = new ArrayList<>();
for (int i = 1; i < 9; i++) {
StoreConfig storeConfig = new StoreConfig();
@@ -550,23 +538,23 @@
storeConfigService.saveBatch(storeConfigs);
- // 添加门店
- HashMap<String, String> map1 = new HashMap<>();
- map1.put("sign","0DB011836143EEE2C2E072967C9F4E4B");
- map1.put("name",tStore.getName());
- map1.put("short_name",tStore.getName());
- map1.put("location",tStore.getCity());
- map1.put("address",tStore.getAddress());
- map1.put("telephone",tStore.getPhone());
- map1.put("linkman",userName);
- map1.put("business_time","[{\"start_time\":\""+tStore.getStartTime()+"\",\"close_time\":\""+tStore.getEndTime()+"\"}]");
- map1.put("logo",tStore.getCoverDrawing());
- map1.put("remark",tStore.getIntroduce());
- map1.put("lat",tStore.getLat());
- map1.put("lng",tStore.getLon());
- map1.put("space_id",tStore.getId().toString());
- String result = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpace", map1);
- System.out.println(result);
+// // 添加门店
+// HashMap<String, String> map1 = new HashMap<>();
+// map1.put("sign","0DB011836143EEE2C2E072967C9F4E4B");
+// map1.put("name",tStore.getName());
+// map1.put("short_name",tStore.getName());
+// map1.put("location",tStore.getCity());
+// map1.put("address",tStore.getAddress());
+// map1.put("telephone",tStore.getPhone());
+// map1.put("linkman",userName);
+// map1.put("business_time","[{\"start_time\":\""+tStore.getStartTime()+"\",\"close_time\":\""+tStore.getEndTime()+"\"}]");
+// map1.put("logo",tStore.getCoverDrawing());
+// map1.put("remark",tStore.getIntroduce());
+// map1.put("lat",tStore.getLat());
+// map1.put("lng",tStore.getLon());
+// map1.put("space_id",tStore.getId().toString());
+// String result = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpace", map1);
+// System.out.println(result);
return new SuccessTip<>();
@@ -653,27 +641,6 @@
tStore.setOperatorId(null);
}
storeService.updateById(tStore);
- String ids1 = byIdc.getIds();
-
- HashMap<String, String> mapx = new HashMap<>();
- mapx.put("sign","0DB011836143EEE2C2E072967C9F4E4B");
- for (String s : ids1.split(",")) {
- String post = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/deleteDevice/ids/" + s,mapx);
- System.out.println(post);
- }
-
- for (String s : ids.split(",")) {
- HashMap<String, String> map1 = new HashMap<>();
- map1.put("sign","0DB011836143EEE2C2E072967C9F4E4B");
- map1.put("space_id",tStore.getId()+"");
- map1.put("device_id",s);
- map1.put("region_id","");
- // 添加门禁
- String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map1);
- System.out.println(s1);
- }
-
-
return new SuccessTip<>();
}catch (Exception e){
@@ -1055,10 +1022,14 @@
byId.setUrl(url);
}
byId.setName(name);
- TTurn byId1 = tTurnService.getById(page);
- TTurn byId2 = tTurnService.getById(type);
- byId.setPage(byId1.getName());
- byId.setType(byId2.getName());
+ if(page!=null){
+ TTurn byId1 = tTurnService.getById(page);
+ byId.setPage(byId1.getName());
+ }
+ if(page!=null){
+ TTurn byId2 = tTurnService.getById(type);
+ byId.setType(byId2.getName());
+ }
byId.setTurnId(turnId);
byId.setSort(sort);
byId.setPageId(page);
@@ -1071,7 +1042,36 @@
}
}
-
+ @RequestMapping(value = "/addConfigOne9")
+ @ResponseBody
+ public Object addConfigOne9(String url,String name,Integer page,Integer type,String turnId,Integer sort,Integer id) {
+ try {
+ TStoreOtherConfigTrue byId = new TStoreOtherConfigTrue();
+ byId.setPid(id);
+ if(ToolUtil.isNotEmpty(url)){
+ byId.setUrl(url);
+ }
+ byId.setName(name);
+ if(page!=null){
+ TTurn byId1 = tTurnService.getById(page);
+ byId.setPage(byId1.getName());
+ }
+ if(page!=null){
+ TTurn byId2 = tTurnService.getById(type);
+ byId.setType(byId2.getName());
+ }
+ byId.setTurnId(turnId);
+ byId.setSort(sort);
+ byId.setPageId(page);
+ byId.setTypeId(type);
+ byId.setState(1);
+ tStoreOtherConfigTrueService.save(byId);
+ return SUCCESS_TIP;
+ }catch (Exception e){
+ e.printStackTrace();
+ return ERROR;
+ }
+ }
}
--
Gitblit v1.7.1