Example #1
0
  protected void init(UIBlockContext maker, Map context) {
    super.init(maker, context);
    context.put("cfgPostFee", SoftConfigManager.me().getEshopPostFee());
    context.put("cfgNotPostFee", SoftConfigManager.me().getEshopNotPostFee());
    context.put("cfgNotPostFeeDesc", SoftConfigManager.me().getEshopNotPostFeeDesc());
    // 联系地址
    if (Demsy.me().login() != null) {
      IOrm orm = Demsy.orm();
      Class type = bizEngine.getStaticType(IContact.SYS_CODE);
      List contactList =
          orm.query(
              type,
              Expr.eq(LibConst.F_CREATED_BY, Demsy.me().username())
                  .and(Expr.eq(LibConst.F_SOFT_ID, Demsy.me().getSoft().getId())));

      if (contactList != null && contactList.size() > 0) context.put("contactList", contactList);
    }
  }
Example #2
0
    @Override
    public void after(ActionEvent event) {
      IOrm orm = (IOrm) event.getOrm();
      IBizSystem sys = (IBizSystem) event.getEntity();
      if (sys == null) {
        return;
      }

      try {
        String extendClass = Demsy.bizEngine.getExtendClassName(sys);
        Demsy.bizEngine.parseSystemByAnnotation(Cls.forName(extendClass), sys);
      } catch (ClassNotFoundException e) {
        // throw new DemsyException(e);
      }

      // 将【业务系统】转换成【业务模块】
      Demsy.moduleEngine.makeModule(orm, Demsy.me().getSoft(), sys);
    }