Package org.yfsoft.comm.util

Examples of org.yfsoft.comm.util.BizResult


  private Map<String,String> profile(String profileStr){
    return StringUtil.fromJson(profileStr);
  }
 
  public BizResult dashboard(Map<String,String> input){
    BizResult rst = new BizResult().setCode("0");
    rst.setType(String.valueOf(ResultType.JUMP));
    rst.setPage("desktop/desktop.jsp");
    return rst;
  }
View Full Code Here


    rst.setPage("desktop/desktop.jsp");
    return rst;
  }
 
  public BizResult notice(Map<String,String> input){
    BizResult rst = new BizResult().setCode("0");
    List<Map<String,Object>> notices = this.dao.list("sys_notice",null, "n_status = 1","n_date desc",3,0).getData();
    StringBuffer sb = new StringBuffer("<dl>");
    for(Map<String,Object> n:notices){
      sb.append("<dt>").append(n.get("n_title")).append("</dt>");
      sb.append("<dd>").append(n.get("n_content")).append("</dd>");
    }
    sb.append("</dl>");
    rst.setData(sb.toString());
    rst.setType(String.valueOf(ResultType.ECHO));
    return rst;
  }
View Full Code Here

    }
    throw new Exception("未找到任何数据源!");
  }
 
  public Object getDataValue(int ds_id,Object k) throws Throwable{
    BizResult ds_rst = query("sys_ds",null,"ds_id = "+ds_id);
    if(!"0".equals(ds_rst.getCode())){
      throw new Exception("数据源获取错误!");
    }
    Map<String,Object> ds = ds_rst.getData();
    if(null!=ds && ds.size()>0){
      String ds_type_val = ds.get("ds_type").toString();
      if("map".equals(ds_type_val)){
        String ds_map = ds.get("ds_collection").toString();
        String[] ds_map_split = ds_map.split(",");
View Full Code Here

    return rst;
  }
 
 
  public BizResult logout(Map<String,String> input){
    BizResult rst = new BizResult().setCode("0");
    this.unsetSion(GlobalKey.USER);
    rst.setType(String.valueOf(ResultType.JUMP));
    rst.setPage("login.jsp");
    return rst;
  }
View Full Code Here

 
  /*
   * 查询table的字段信息
   */
  public BizResult desc(String table){
    BizResult rst = new BizResult();
    rst.setCode("0").setData(mapper.list("show full fields from "+table));
    return rst;
  }
View Full Code Here

  }
  /*
   * 列出表的信息
   */
  public BizResult table(){
    BizResult rst = new BizResult();
    rst.setCode("0").setData(mapper.list("SHOW TABLE STATUS"));
    return rst;
  }
View Full Code Here

TOP

Related Classes of org.yfsoft.comm.util.BizResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.