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 | 89 ++++++++++++++++++++++++++++++-------------- 1 files changed, 61 insertions(+), 28 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 94b7e66..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 @@ -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,14 +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); - - - - - ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); for (int i = 1; i < 9; i++) { StoreConfig storeConfig = new StoreConfig(); @@ -538,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<>(); @@ -1022,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); @@ -1038,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