コード例 #1
0
  @Override
  public void after(EngineParameter ep) throws Exception {
    if (ep.getParam("PERSON_NAME") != null && ep.getParam("SYSC_STOP") == null) {
      EngineParameter selfEp = new EngineParameter("T_SYS_USERINFO.update");
      selfEp.putParam("USER_ID", ep.getParam("PERSON_ID"));
      selfEp.putParam("USER_NAME", ep.getParam("PERSON_NAME"));
      selfEp.putParam("SYSC_STOP", true);

      Engine.execute(selfEp);
    }
  }
コード例 #2
0
  @Override
  public void before(EngineParameter ep) throws Exception {
    HttpSession session = (HttpSession) ep.getParam("session");
    Map userinfo =
        session.getAttribute("USERINFO") == null ? null : (Map) session.getAttribute("USERINFO");
    ep.putParam("USER_ID", userinfo.get("USER_ID"));

    EngineParameter selfEp = new EngineParameter("T_SYS_USERRESOURCE.selectByFk");
    selfEp.putParam("USER_ID", userinfo.get("USER_ID"));
    selfEp.putParam("RESOURCE_ID", ep.getParam("RESOURCE_ID"));
    Engine.execute(selfEp);

    List<Map> list = (List<Map>) selfEp.getResult("data");
    // 相当深拷贝
    FlyingUtil.change(list.get(0), ep.getParamMap());
  }