44323
2024-03-06 198153fd0e686392bc57bd4041c216e499c2de9c
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TShopController.java
@@ -29,6 +29,7 @@
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@@ -93,8 +94,10 @@
        model.addAttribute("id",id);
        return PREFIX + "TShop_add_device.html";
    }
    @RequestMapping("/addDevice")
    public Object addDevice(Integer id,String device) {
        // 应该是不用他了
        HashMap<String, String> map = new HashMap<>();
        map.put("sign","0DB011836143EEE2C2E072967C9F4E4B");
        map.put("space_id",id.toString());
@@ -102,10 +105,30 @@
        map.put("city_code","");
        // 添加门禁
        String s1 = HttpRequestUtil.postRequest
                ("https://try.daowepark.com/v7/user_api/general/addSpaceSutu", map);
                ("https://try.daowepark.c" +
                        "om/v7/user_api/general/addSpaceSutu", map);
        return SUCCESS_TIP;
    }
    public static void main(String[] args) {
//        HashMap<String, String> map = new HashMap<>();
//        map.put("page","1");
//        map.put("space_id","2010");
//        // 获取门禁列表
//        String s1 = HttpRequestUtil.getRequest
//                ("https://try.daowepark.com/v7/user_api/general/getDevice", map);
//        System.err.println(s1);
        HashMap<String, String> map = new HashMap<>();
        map.put("sign","0DB011836143EEE2C2E072967C9F4E4B");
        map.put("space_id","1");
        map.put("device_id","1");
        map.put("region_id","2010");
        // 获取门禁列表
        String s1 = HttpRequestUtil.getRequest
                ("https://try.daowepark.com/v7/user_api/general/getDevice", map);
        System.err.println(s1);
    };
    /**
     * 跳转到车辆管理首页
     */
@@ -369,6 +392,7 @@
        User byId1 = userMapper.selectById(byId.getStoreStaffId());
        model.addAttribute("city",byId1);
        model.addAttribute("type",0);
        return PREFIX + "TShop_edit.html";
    }
    @RequestMapping("/tShop_gift/{id}")
@@ -397,6 +421,8 @@
        StoreConfig c8 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,8));
        model.addAttribute("c8",c8);
        model.addAttribute("id",id);
        StoreConfig c9 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,9));
        model.addAttribute("c9",c9);
        return PREFIX + "TShop_imgAll.html";
    }
@@ -565,7 +591,7 @@
                storeConfigs.add(storeConfig);
            }
            storeConfigService.saveBatch(storeConfigs);
            // 废弃添加门店时 添加闸机
//            HashMap<String, String> mapSite = new HashMap<>();
//            mapSite.put("sign","0DB011836143EEE2C2E072967C9F4E4B");
//            mapSite.put("name",tStore.getName());
@@ -686,9 +712,9 @@
    }
    @RequestMapping(value = "/saveImgAll")
    @ResponseBody
    public Object saveImgAll(Integer id,Integer px1,Integer px2,Integer px3,Integer px4,Integer px5,Integer px6,Integer px7,Integer px8,
                             String c1,String c2,String c3,String c4,String c5,String c6,String c7,String c8,
                             Integer r1,Integer r2,Integer r3,Integer r4,Integer r5,Integer r6,Integer r7,Integer r8) {
    public Object saveImgAll(Integer id,Integer px1,Integer px2,Integer px3,Integer px4,Integer px5,Integer px6,Integer px7,Integer px8,Integer px9,
                             String c1,String c2,String c3,String c4,String c5,String c6,String c7,String c8,String c9,
                             Integer r1,Integer r2,Integer r3,Integer r4,Integer r5,Integer r6,Integer r7,Integer r8,Integer r9) {
        try {
            ArrayList<StoreConfig> storeConfigs = new ArrayList<>();
            StoreConfig collect1 = collect(id, px1, r1, c1, 1);
@@ -707,6 +733,8 @@
            storeConfigs.add(collect6);
            storeConfigs.add(collect7);
            storeConfigs.add(collect8);
            StoreConfig collect9 = collect(id, px9, r9, c9, 9);
            storeConfigs.add(collect9);
            storeConfigService.updateBatchById(storeConfigs);
            return new SuccessTip<>();
        }catch (Exception e){