...">
美文网首页
修改一个返回值

修改一个返回值

作者: JefferChang | 来源:发表于2018-11-20 19:32 被阅读0次

    修改前:

    String saleBrandstr = "";
    List<DealerInfo.SaleBrand> saleBrandList = Lists.newArrayList();
    try{
    saleBrandstr = "{"saleBrand":" + saleBrand + "}";
    } catch (Exception ex) {
    ex;
    }
    return saleBrandstr;

    修改后:
    String saleBrandstr = "";
    List<DealerInfo.SaleBrand> saleBrandList = Lists.newArrayList();
    try{
    if (dealerType == 2 || dealerType == 1) {
    if (pamra.equals("")) {
    return saleBrandstr;
    }
    }
    saleBrandstr = "{"saleBrand":" + saleBrand + "}";
    DealerInfo saleBrandVo = JSONObject.parseObject(saleBrandstr, DealerInfo.class);
    saleBrandList = saleBrandVo.getSaleBrand();
    } catch (Exception ex) {
    ex;
    }
    return saleBrandstr;

    这样改之后是不是返回结果就变了。

    相关文章

      网友评论

          本文标题:修改一个返回值

          本文链接:https://www.haomeiwen.com/subject/hhzxqqtx.html