admin
2020-10-27 b6853bf0a1411e39360f184b3bee5836010dbd22
CMQ接口优化
7个文件已修改
535 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/HomeNavbarControllerV2.java 489 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/h5/H5S11Controller.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/HomeNavbarServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/pinduoduo/PinDuoDuoApiUtil.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/src/main/java/com/qcloud/cmq/Account.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/HomeNavbarControllerV2.java
@@ -6,6 +6,7 @@
import javax.annotation.Resource;
import com.yeshi.fanli.entity.SystemEnum;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -30,268 +31,276 @@
@RequestMapping("api/v2/navbar")
public class HomeNavbarControllerV2 {
    @Resource
    private HomeNavbarService homeNavbarService;
    @Resource
    private HomeNavbarService homeNavbarService;
    @Resource
    private HomeNavbarUserService homeNavbarUserService;
    @Resource
    private DeviceSexService deviceSexService;
    @Resource
    private HomeNavbarUserService homeNavbarUserService;
    @Resource
    private DeviceSexService deviceSexService;
    /**
     * 改变性别
     * @param acceptData
     * @param sex
     * @param out
     */
    @RequestMapping(value = "changeSex", method = RequestMethod.POST)
    public void changeSex(AcceptData acceptData, Integer sex, PrintWriter out) {
        try {
            // 获取设备定义性别
            deviceSexService.save(acceptData.getDevice(), sex);
            JSONObject data = new JSONObject();
            data.put("sex", sex);
            out.print(JsonUtil.loadTrueResult(data));
        } catch (Exception e) {
            out.print(JsonUtil.loadFalseResult("切换失败"));
        }
    }
    /**
     * 改变性别
     *
     * @param acceptData
     * @param sex
     * @param out
     */
    @RequestMapping(value = "changeSex", method = RequestMethod.POST)
    public void changeSex(AcceptData acceptData, Integer sex, PrintWriter out) {
        try {
            // 获取设备定义性别
            deviceSexService.save(acceptData.getDevice(), sex);
            JSONObject data = new JSONObject();
            data.put("sex", sex);
            out.print(JsonUtil.loadTrueResult(data));
        } catch (Exception e) {
            out.print(JsonUtil.loadFalseResult("切换失败"));
        }
    }
    /**
     * 获取导航栏内容
     * @param acceptData
     * @param uid
     * @param out
     */
    @RequestMapping(value = "getHomeItems", method = RequestMethod.POST)
    public void getHomeItems(AcceptData acceptData, Long uid, PrintWriter out) {
        // 获取设备定义性别
        int deviceSex = deviceSexService.getDeviceSex(acceptData.getDevice(),acceptData.getSystem());
        List<HomeNavbar> listNavbar = homeNavbarUserService.listEffectiveNavbar(uid, acceptData.getDevice(), deviceSex,acceptData.getSystem());
        List<HomeNavbar> list = new ArrayList<HomeNavbar>();
        if (listNavbar != null) {
            list.addAll(listNavbar);
        }
        if (!VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
            for (int i = 0; i < list.size(); i ++) {
                NavbarTypeEnum type = list.get(i).getType();
                if (type == NavbarTypeEnum.commonTemplate) {
                    list.remove(i);
                    i--;
                }
            }
        }
        JSONObject data = new JSONObject();
        data.put("sex", deviceSex);
        data.put("count", list.size());
        data.put("listNavbar", JsonUtil.getApiCommonGson().toJson(list));
        out.print(JsonUtil.loadTrueResult(data));
    }
    /**
     * 获取导航栏编辑内容
     *
     * @param acceptData
     * @param out
     */
    @RequestMapping(value = "getUserItems", method = RequestMethod.POST)
    public void getUserItems(AcceptData acceptData, Long uid, PrintWriter out) {
        try {
            List<HomeNavbar> listExist = new ArrayList<HomeNavbar>();
            List<HomeNavbar> listItems = new ArrayList<HomeNavbar>();
    /**
     * 获取导航栏内容
     *
     * @param acceptData
     * @param uid
     * @param out
     */
    @RequestMapping(value = "getHomeItems", method = RequestMethod.POST)
    public void getHomeItems(AcceptData acceptData, Long uid, PrintWriter out) {
        // 获取设备定义性别
        int deviceSex = deviceSexService.getDeviceSex(acceptData.getDevice(), acceptData.getSystem());
        List<HomeNavbar> listNavbar = homeNavbarUserService.listEffectiveNavbar(uid, acceptData.getDevice(), deviceSex, acceptData.getSystem());
            // 系统默认导航栏
            List<HomeNavbar> listNavbar = homeNavbarService.listQueryEffectiveNavbar(acceptData.getSystem());
            if (listNavbar != null && listNavbar.size() > 0) {
                listItems.addAll(listNavbar);
            }
        List<HomeNavbar> list = new ArrayList<HomeNavbar>();
        if (listNavbar != null) {
            list.addAll(listNavbar);
        }
            int nonCount = 0;
            // 查询用户自定义导航
            List<HomeNavbarUser> listUser = homeNavbarUserService.listUserNavbar(uid, acceptData.getDevice());
        //非板栗快省删除网页类导航
        for (int i = 0; i < list.size(); i++) {
            if (list.get(i).getType() == NavbarTypeEnum.web && acceptData.getSystem() != SystemEnum.blks) {
                list.remove(i--);
            }
        }
            if (listUser == null || listUser.size() == 0) {
                for (int i = 0; i < listItems.size(); i++) {
                    HomeNavbar homeNavbar = listItems.get(i);
                    // 活动剔除
                    if (!NavbarTypeEnum.category.equals(homeNavbar.getType())) {
                        listItems.remove(homeNavbar);
                        i--;
                        continue;
                    }
        if (!VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
            for (int i = 0; i < list.size(); i++) {
                NavbarTypeEnum type = list.get(i).getType();
                if (type == NavbarTypeEnum.commonTemplate) {
                    list.remove(i);
                    i--;
                }
            }
        }
                    if (homeNavbar.getIsDefault()) {
                        if (homeNavbar.getIsFixed()) {
                            nonCount++;
                        }
                        listExist.add(homeNavbar);
                        listItems.remove(homeNavbar);
                        i--;
                        continue;
                    }
                }
        JSONObject data = new JSONObject();
        data.put("sex", deviceSex);
        data.put("count", list.size());
        data.put("listNavbar", JsonUtil.getApiCommonGson().toJson(list));
        out.print(JsonUtil.loadTrueResult(data));
    }
            } else {
                // 获取固定不可编辑
                for (int i = 0; i < listItems.size(); i++) {
                    HomeNavbar homeNavbar = listItems.get(i);
    /**
     * 获取导航栏编辑内容
     *
     * @param acceptData
     * @param out
     */
    @RequestMapping(value = "getUserItems", method = RequestMethod.POST)
    public void getUserItems(AcceptData acceptData, Long uid, PrintWriter out) {
        try {
            List<HomeNavbar> listExist = new ArrayList<HomeNavbar>();
            List<HomeNavbar> listItems = new ArrayList<HomeNavbar>();
                    // 活动剔除
                    if (!NavbarTypeEnum.category.equals(homeNavbar.getType())) {
                        listItems.remove(homeNavbar);
                        i--;
                        continue;
                    }
            // 系统默认导航栏
            List<HomeNavbar> listNavbar = homeNavbarService.listQueryEffectiveNavbar(acceptData.getSystem());
            if (listNavbar != null && listNavbar.size() > 0) {
                listItems.addAll(listNavbar);
            }
                    if (homeNavbar.getIsFixed()) {
                        listExist.add(homeNavbar);
                        nonCount++;
            int nonCount = 0;
            // 查询用户自定义导航
            List<HomeNavbarUser> listUser = homeNavbarUserService.listUserNavbar(uid, acceptData.getDevice());
                        listItems.remove(homeNavbar);
                        i--;
                    }
                }
            if (listUser == null || listUser.size() == 0) {
                for (int i = 0; i < listItems.size(); i++) {
                    HomeNavbar homeNavbar = listItems.get(i);
                    // 活动剔除
                    if (!NavbarTypeEnum.category.equals(homeNavbar.getType())) {
                        listItems.remove(homeNavbar);
                        i--;
                        continue;
                    }
                // 用户编辑的数据
                for (HomeNavbarUser homeNavbarUser : listUser) {
                    HomeNavbar homeNavbar = homeNavbarUser.getHomeNavbar();
                    if (homeNavbar == null) {
                        continue;
                    }
                    if (homeNavbar.getIsDefault()) {
                        if (homeNavbar.getIsFixed()) {
                            nonCount++;
                        }
                    // 活动剔除
                    if (!NavbarTypeEnum.category.equals(homeNavbar.getType())) {
                        continue;
                    }
                        listExist.add(homeNavbar);
                        listItems.remove(homeNavbar);
                        i--;
                        continue;
                    }
                }
                    long homeId = homeNavbar.getId();
                    for (int i = 0; i < listItems.size(); i++) {
                        HomeNavbar navbar = listItems.get(i);
                        long id = navbar.getId();
                        if (homeId == id) {
                            // 加入用户已选
                            listExist.add(navbar);
                            // 移除用户已选
                            listItems.remove(navbar);
                            i--;
                            break;
                        }
                    }
                }
            }
            } else {
                // 获取固定不可编辑
                for (int i = 0; i < listItems.size(); i++) {
                    HomeNavbar homeNavbar = listItems.get(i);
            JSONObject data = new JSONObject();
            data.put("min", 6);
            data.put("max", 16);
            data.put("nonCount", nonCount);
            data.put("listExist", JsonUtil.getApiCommonGson().toJson(listExist));
            data.put("listItems", JsonUtil.getApiCommonGson().toJson(listItems));
            out.print(JsonUtil.loadTrueResult(data));
        } catch (HomeNavbarUserException e) {
            out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
        }
    }
                    // 活动剔除
                    if (!NavbarTypeEnum.category.equals(homeNavbar.getType())) {
                        listItems.remove(homeNavbar);
                        i--;
                        continue;
                    }
    /**
     * 设置自定义
     *
     * @param acceptData
     * @param uid
     * @param list
     * @param out
     */
    @RequestMapping(value = "saveUserItems", method = RequestMethod.POST)
    public void saveUserItems(AcceptData acceptData, Long uid, String barIds, PrintWriter out) {
        try {
            if (StringUtil.isNullOrEmpty(barIds)) {
                out.print(JsonUtil.loadFalseResult("Id参数不能为空"));
                return;
            }
                    if (homeNavbar.getIsFixed()) {
                        listExist.add(homeNavbar);
                        nonCount++;
            Gson gson = new Gson();
            List<Long> list = gson.fromJson(barIds, new TypeToken<ArrayList<Long>>() {
            }.getType());
            if (list == null || list.size() == 0) {
                out.print(JsonUtil.loadFalseResult("未检测到数据"));
                return;
            }
                        listItems.remove(homeNavbar);
                        i--;
                    }
                }
            homeNavbarUserService.addNavbarUser(uid, acceptData.getDevice(), list);
            out.print(JsonUtil.loadTrueResult("保存成功"));
            // 设置为通用
            deviceSexService.save(acceptData.getDevice(), 0);
        } catch (HomeNavbarUserException e) {
            out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
        }
    }
                // 用户编辑的数据
                for (HomeNavbarUser homeNavbarUser : listUser) {
                    HomeNavbar homeNavbar = homeNavbarUser.getHomeNavbar();
                    if (homeNavbar == null) {
                        continue;
                    }
    /**
     * 还原默认
     *
     * @param acceptData
     * @param uid
     * @param out
     */
    @RequestMapping(value = "restoreDefault", method = RequestMethod.POST)
    public void restoreDefault(AcceptData acceptData, Long uid, PrintWriter out) {
        try {
            int nonCount = 0;
            List<HomeNavbar> listExist = new ArrayList<HomeNavbar>();
            List<HomeNavbar> listItems = new ArrayList<HomeNavbar>();
            List<HomeNavbar> listNavbar = homeNavbarUserService.restoreSystemDefault(uid, acceptData.getDevice(),acceptData.getSystem());
            if (listNavbar != null && listNavbar.size() > 0) {
                listItems.addAll(listNavbar);
            }
                    // 活动剔除
                    if (!NavbarTypeEnum.category.equals(homeNavbar.getType())) {
                        continue;
                    }
            for (int i = 0; i < listItems.size(); i++) {
                HomeNavbar homeNavbar = listItems.get(i);
                // 活动剔除
                if (!NavbarTypeEnum.category.equals(homeNavbar.getType())) {
                    listItems.remove(homeNavbar);
                    i--;
                    continue;
                }
                // 筛选出默认项
                if (!homeNavbar.getIsDefault()) {
                    break;
                } else {
                    // 固定个数
                    if (homeNavbar.getIsFixed()) {
                        nonCount++;
                    }
                    // 默认项
                    listExist.add(homeNavbar);
                    listItems.remove(homeNavbar);
                    i--;
                    continue;
                }
            }
                    long homeId = homeNavbar.getId();
                    for (int i = 0; i < listItems.size(); i++) {
                        HomeNavbar navbar = listItems.get(i);
                        long id = navbar.getId();
                        if (homeId == id) {
                            // 加入用户已选
                            listExist.add(navbar);
                            // 移除用户已选
                            listItems.remove(navbar);
                            i--;
                            break;
                        }
                    }
                }
            }
            JSONObject data = new JSONObject();
            data.put("nonCount", nonCount);
            data.put("listExist", JsonUtil.getApiCommonGson().toJson(listExist));
            data.put("listItems", JsonUtil.getApiCommonGson().toJson(listItems));
            out.print(JsonUtil.loadTrueResult(data));
            // 设置为通用
            deviceSexService.save(acceptData.getDevice(), 0);
        } catch (HomeNavbarUserException e) {
            out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
        }
    }
            JSONObject data = new JSONObject();
            data.put("min", 6);
            data.put("max", 16);
            data.put("nonCount", nonCount);
            data.put("listExist", JsonUtil.getApiCommonGson().toJson(listExist));
            data.put("listItems", JsonUtil.getApiCommonGson().toJson(listItems));
            out.print(JsonUtil.loadTrueResult(data));
        } catch (HomeNavbarUserException e) {
            out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
        }
    }
    /**
     * 设置自定义
     *
     * @param acceptData
     * @param uid
     * @param list
     * @param out
     */
    @RequestMapping(value = "saveUserItems", method = RequestMethod.POST)
    public void saveUserItems(AcceptData acceptData, Long uid, String barIds, PrintWriter out) {
        try {
            if (StringUtil.isNullOrEmpty(barIds)) {
                out.print(JsonUtil.loadFalseResult("Id参数不能为空"));
                return;
            }
            Gson gson = new Gson();
            List<Long> list = gson.fromJson(barIds, new TypeToken<ArrayList<Long>>() {
            }.getType());
            if (list == null || list.size() == 0) {
                out.print(JsonUtil.loadFalseResult("未检测到数据"));
                return;
            }
            homeNavbarUserService.addNavbarUser(uid, acceptData.getDevice(), list);
            out.print(JsonUtil.loadTrueResult("保存成功"));
            // 设置为通用
            deviceSexService.save(acceptData.getDevice(), 0);
        } catch (HomeNavbarUserException e) {
            out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
        }
    }
    /**
     * 还原默认
     *
     * @param acceptData
     * @param uid
     * @param out
     */
    @RequestMapping(value = "restoreDefault", method = RequestMethod.POST)
    public void restoreDefault(AcceptData acceptData, Long uid, PrintWriter out) {
        try {
            int nonCount = 0;
            List<HomeNavbar> listExist = new ArrayList<HomeNavbar>();
            List<HomeNavbar> listItems = new ArrayList<HomeNavbar>();
            List<HomeNavbar> listNavbar = homeNavbarUserService.restoreSystemDefault(uid, acceptData.getDevice(), acceptData.getSystem());
            if (listNavbar != null && listNavbar.size() > 0) {
                listItems.addAll(listNavbar);
            }
            for (int i = 0; i < listItems.size(); i++) {
                HomeNavbar homeNavbar = listItems.get(i);
                // 活动剔除
                if (!NavbarTypeEnum.category.equals(homeNavbar.getType())) {
                    listItems.remove(homeNavbar);
                    i--;
                    continue;
                }
                // 筛选出默认项
                if (!homeNavbar.getIsDefault()) {
                    break;
                } else {
                    // 固定个数
                    if (homeNavbar.getIsFixed()) {
                        nonCount++;
                    }
                    // 默认项
                    listExist.add(homeNavbar);
                    listItems.remove(homeNavbar);
                    i--;
                    continue;
                }
            }
            JSONObject data = new JSONObject();
            data.put("nonCount", nonCount);
            data.put("listExist", JsonUtil.getApiCommonGson().toJson(listExist));
            data.put("listItems", JsonUtil.getApiCommonGson().toJson(listItems));
            out.print(JsonUtil.loadTrueResult(data));
            // 设置为通用
            deviceSexService.save(acceptData.getDevice(), 0);
        } catch (HomeNavbarUserException e) {
            out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
        }
    }
}
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -979,7 +979,7 @@
        JSONObject data = new JSONObject();
        JSONArray array = new JSONArray();
        PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(pddfilter,uid+"");
        PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(pddfilter,Constant.PDD_SEARCH_CUSTOMER_PARAMS);
        if (result != null) {
            count = result.getTotalCount();
            Gson gson = JsonUtil.getApiCommonGson();
fanli/src/main/java/com/yeshi/fanli/controller/h5/H5S11Controller.java
@@ -70,8 +70,8 @@
        if (StringUtil.isNullOrEmpty(token)) {
            try {
                TaoKeOfficialActivityConvertResultDTO dto = TaoKeApiUtil.officialActivityConvert("19507100253",
                        "1574926757600", info.getRelationId());
                String link = dto.getShort_click_url();
                        "20150318020001156", info.getRelationId());
                String link = dto.getClick_url();
                if (!StringUtil.isNullOrEmpty(link)) {
                    token = TaoKeApiUtil.getTKToken("http://img.flqapp.com/resource/s11/banner.jpg", "【天猫双12】上亿红包等你来拆!",
@@ -125,8 +125,8 @@
        if (StringUtil.isNullOrEmpty(token)) {
            try {
                TaoKeOfficialActivityConvertResultDTO dto = TaoKeApiUtil.officialActivityConvert("19507100253",
                        "1574926757600", info.getRelationId());
                String link = dto.getShort_click_url();
                        "20150318020001158", info.getRelationId());
                String link = dto.getClick_url();
                if (!StringUtil.isNullOrEmpty(link)) {
                    token = TaoKeApiUtil.getTKToken("http://img.flqapp.com/resource/s11/banner.jpg", "预售商品付定金,得奖金!",
                            link);
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/HomeNavbarServiceImpl.java
@@ -336,7 +336,7 @@
    }
    @Override
    @Cacheable(value = "configCache", key = "'listQueryEffectiveNavbar'")
    @Cacheable(value = "configCache", key = "'listQueryEffectiveNavbar-'+#system")
    public List<HomeNavbar> listQueryEffectiveNavbar(SystemEnum system) {
        return homeNavbarMapper.listQueryEffective(system);
    }
@@ -350,7 +350,7 @@
    
    
    @Override
    @Cacheable(value = "configCache", key = "'listQueryFixedNavbar'")
    @Cacheable(value = "configCache", key = "'listQueryFixedNavbar-'+#system")
    public List<HomeNavbar> listQueryFixedNavbar(SystemEnum system) {
        return homeNavbarMapper.listQueryFixedNavbar(system);
    }
fanli/src/main/java/com/yeshi/fanli/util/pinduoduo/PinDuoDuoApiUtil.java
@@ -136,7 +136,7 @@
        Long[] ids = new Long[goodsIds.size()];
        goodsIds.toArray(ids);
        filter.setGoodsIdList(ids);
        PDDGoodsResult result = searchGoods(filter,Constant.PDD_SEARCH_CUSTOMER_PARAMS);
        PDDGoodsResult result = searchGoods(filter, Constant.PDD_SEARCH_CUSTOMER_PARAMS);
        if (result != null)
            return result.getGoodsList();
        return null;
@@ -309,6 +309,18 @@
        return null;
    }
    public static PDDPromotionUrl convertResourceUrl(String pid) {
        Map<String, String> map = new HashMap<>();
        map.put("type", "pdd.ddk.resource.url.gen");
        map.put("pid", pid);
        map.put("resource_type", "39998");
        map.put("url", "https://mobile.yangkeduo.com/attendance.html?_pdd_fs=1&_pdd_tc=ffffff&_pdd_sbs=1&type=1&id=155075");
        String result = baseRequest(map);
        System.out.println(result);
        return null;
    }
    /**
     * 微信小程序转链 @Title: convertWXMP @Description: @param goodsId @param
     * pid @param customParams @return PDDPromotionUrl 返回类型 @throws
utils/pom.xml
@@ -9,7 +9,7 @@
  </parent>
  <groupId>com.yeshi</groupId>
  <artifactId>utils</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <version>0.0.2-SNAPSHOT</version>
  <name>utils</name>
  <url>http://maven.apache.org</url>
  <properties>
utils/src/main/java/com/qcloud/cmq/Account.java
@@ -80,7 +80,7 @@
        JSONObject jsonObj = new JSONObject(result);
        int code = jsonObj.getInt("code");
        if(code != 0)
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId"));
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code"));
    }
    /**
@@ -101,7 +101,7 @@
        JSONObject jsonObj = new JSONObject(result);
        int code = jsonObj.getInt("code");
        if(code != 0)
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId"));
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code"));
    }
    /**
@@ -129,7 +129,7 @@
        JSONObject jsonObj = new JSONObject(result);
        int code = jsonObj.getInt("code");
        if(code != 0)
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId"));
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code"));
        int totalCount = jsonObj.getInt("totalCount");
        JSONArray jsonArray = jsonObj.getJSONArray("queueList");
@@ -192,7 +192,7 @@
        JSONObject jsonObj = new JSONObject(result);
        int code = jsonObj.getInt("code");
        if(code != 0)
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId"));
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code"));
    }
@@ -214,7 +214,7 @@
        JSONObject jsonObj = new JSONObject(result);
        int code = jsonObj.getInt("code");
        if(code != 0)
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId"));
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code"));
    }
@@ -242,7 +242,7 @@
        JSONObject jsonObj = new JSONObject(result);
        int code = jsonObj.getInt("code");
        if(code != 0)
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId"));
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code"));
        int totalCount = jsonObj.getInt("totalCount");
@@ -337,7 +337,7 @@
        JSONObject jsonObj = new JSONObject(result);
        int code = jsonObj.getInt("code");
        if(code != 0)
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId"));
            throw new CMQServerException(code,jsonObj.getString("message"),code+"");
    }
@@ -365,7 +365,7 @@
        JSONObject jsonObj = new JSONObject(result);
        int code = jsonObj.getInt("code");
        if(code != 0)
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId"));
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code"));
    }