nickchange
2023-11-17 a9564eae9f0169ca39329b2f14a8f13d13358a0a
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;
        }
    }
}