Search in sources :

Example 1 with Select

use of app.hongs.action.anno.Select in project HongsCORE by ihongs.

the class JointGate method create.

@Override
@Action("create")
@Preset(conf = "", form = "", deft = { ":create" })
@Select(conf = "", form = "", mode = 2)
@Verify(conf = "", form = "")
@CommitSuccess
public void create(ActionHelper helper) throws HongsException {
    IEntity sr = getEntity(helper);
    Map rd = helper.getRequestData();
    rd = getReqMap(helper, sr, "create", rd);
    Map sd = sr.create(rd);
    sd = getRspMap(helper, sr, "create", sd);
    String ss = getRspMsg(helper, sr, "create", 1);
    helper.reply(ss, sd);
}
Also used : NaviMap(app.hongs.action.NaviMap) Map(java.util.Map) Action(app.hongs.action.anno.Action) CommitSuccess(app.hongs.action.anno.CommitSuccess) Preset(app.hongs.action.anno.Preset) Select(app.hongs.action.anno.Select) Verify(app.hongs.action.anno.Verify)

Example 2 with Select

use of app.hongs.action.anno.Select in project HongsCORE by ihongs.

the class DBAction method create.

@Action("create")
@Preset(conf = "", form = "", deft = { ":create" })
@Select(conf = "", form = "", mode = 2)
@Verify(conf = "", form = "")
@CommitSuccess
@Override
public void create(ActionHelper helper) throws HongsException {
    Model ett = getEntity(helper);
    Map req = helper.getRequestData();
    req = getReqMap(helper, ett, "create", req);
    Map rsp = ett.create(req);
    rsp = getRspMap(helper, ett, "create", rsp);
    String msg = getRspMsg(helper, ett, "create", 1);
    helper.reply(msg, rsp);
}
Also used : Map(java.util.Map) Action(app.hongs.action.anno.Action) IAction(app.hongs.dh.IAction) CommitSuccess(app.hongs.action.anno.CommitSuccess) Preset(app.hongs.action.anno.Preset) Select(app.hongs.action.anno.Select) Verify(app.hongs.action.anno.Verify)

Example 3 with Select

use of app.hongs.action.anno.Select in project HongsCORE by ihongs.

the class SearchAction method search.

@Action("search")
@Preset(conf = "", form = "")
@Select(conf = "", form = "")
@Spread(conf = "", form = "")
@Override
public void search(ActionHelper helper) throws HongsException {
    /**
     * 有指定查询条件则按匹配度排序
     */
    Map rd = helper.getRequestData();
    Object wd = rd.get(Cnst.WD_KEY);
    if (null != wd && "".equals(wd)) {
        List ob = Synt.asList(rd.get(Cnst.OB_KEY));
        if (ob == null) {
            ob = new ArrayList();
            rd.put(Cnst.OB_KEY, ob);
            ob.add(0, "-");
        } else if (!ob.contains("-")) {
            ob.add(0, "-");
        }
    }
    super.search(helper);
}
Also used : ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) Map(java.util.Map) Action(app.hongs.action.anno.Action) LuceneAction(app.hongs.dh.lucene.LuceneAction) Spread(app.hongs.action.anno.Spread) Preset(app.hongs.action.anno.Preset) Select(app.hongs.action.anno.Select)

Example 4 with Select

use of app.hongs.action.anno.Select in project HongsCORE by ihongs.

the class FormAction method getList.

@Action("list")
@Select(conf = "matrix", form = "form")
public void getList(ActionHelper helper) throws HongsException {
    Map data = model.getList(helper.getRequestData());
    helper.reply(data);
}
Also used : HashMap(java.util.HashMap) Map(java.util.Map) Action(app.hongs.action.anno.Action) Select(app.hongs.action.anno.Select)

Example 5 with Select

use of app.hongs.action.anno.Select in project HongsCORE by ihongs.

the class FormAction method getInfo.

@Action("info")
@Select(conf = "matrix", form = "form")
public void getInfo(ActionHelper helper) throws HongsException {
    Map data = model.getInfo(helper.getRequestData());
    helper.reply(data);
}
Also used : HashMap(java.util.HashMap) Map(java.util.Map) Action(app.hongs.action.anno.Action) Select(app.hongs.action.anno.Select)

Aggregations

Action (app.hongs.action.anno.Action)7 Select (app.hongs.action.anno.Select)7 Map (java.util.Map)7 Preset (app.hongs.action.anno.Preset)5 NaviMap (app.hongs.action.NaviMap)2 CommitSuccess (app.hongs.action.anno.CommitSuccess)2 Spread (app.hongs.action.anno.Spread)2 Verify (app.hongs.action.anno.Verify)2 IAction (app.hongs.dh.IAction)2 HashMap (java.util.HashMap)2 LuceneAction (app.hongs.dh.lucene.LuceneAction)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1