Search in sources :

Example 6 with Preset

use of io.github.ihongs.action.anno.Preset in project HongsCORE by ihongs.

the class SearchAction method assort.

@Action("assort")
@Preset(conf = "", form = "")
@Select(conf = "", form = "")
public void assort(ActionHelper helper) throws HongsException {
    SearchEntity sr = (SearchEntity) getEntity(helper);
    StatisHelper sh = new StatisHelper(sr);
    Map rd = helper.getRequestData();
    rd = getReqMap(helper, sr, "assort", rd);
    // 检查参数
    acheck(sr, rd, 3);
    int rn = Synt.declare(rd.get(Cnst.RN_KEY), 0);
    int pn = Synt.declare(rd.get(Cnst.PN_KEY), 1);
    Map sd = sh.assort(rd, rn, pn);
    sd = getRspMap(helper, sr, "assort", sd);
    helper.reply(sd);
}
Also used : Map(java.util.Map) JAction(io.github.ihongs.dh.JAction) Action(io.github.ihongs.action.anno.Action) Preset(io.github.ihongs.action.anno.Preset) Select(io.github.ihongs.action.anno.Select)

Example 7 with Preset

use of io.github.ihongs.action.anno.Preset in project HongsCORE by ihongs.

the class JAction method delete.

@Override
@Action("delete")
@Preset(conf = "", form = "", defs = { ":defence" })
@CommitSuccess
public void delete(ActionHelper helper) throws HongsException {
    IEntity sr = getEntity(helper);
    Map rd = helper.getRequestData();
    rd = getReqMap(helper, sr, "delete", rd);
    int sn = sr.delete(rd);
    String ss = getRspMsg(helper, sr, "delete", sn);
    helper.reply(ss, sn);
}
Also used : Map(java.util.Map) Action(io.github.ihongs.action.anno.Action) CommitSuccess(io.github.ihongs.action.anno.CommitSuccess) Preset(io.github.ihongs.action.anno.Preset)

Example 8 with Preset

use of io.github.ihongs.action.anno.Preset in project HongsCORE by ihongs.

the class JAction method update.

@Override
@Action("update")
@Preset(conf = "", form = "", defs = { ":defence" })
@Verify(conf = "", form = "")
@CommitSuccess
public void update(ActionHelper helper) throws HongsException {
    IEntity sr = getEntity(helper);
    Map rd = helper.getRequestData();
    rd = getReqMap(helper, sr, "update", rd);
    int sn = sr.update(rd);
    String ss = getRspMsg(helper, sr, "update", sn);
    helper.reply(ss, sn);
}
Also used : Map(java.util.Map) Action(io.github.ihongs.action.anno.Action) CommitSuccess(io.github.ihongs.action.anno.CommitSuccess) Preset(io.github.ihongs.action.anno.Preset) Verify(io.github.ihongs.action.anno.Verify)

Example 9 with Preset

use of io.github.ihongs.action.anno.Preset in project HongsCORE by ihongs.

the class JAction method create.

@Override
@Action("create")
@Preset(conf = "", form = "", defs = { ":initial" })
@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);
    String sn = sr.create(rd);
    String ss = getRspMsg(helper, sr, "create", 1);
    helper.reply(ss, sn);
}
Also used : Map(java.util.Map) Action(io.github.ihongs.action.anno.Action) CommitSuccess(io.github.ihongs.action.anno.CommitSuccess) Preset(io.github.ihongs.action.anno.Preset) Verify(io.github.ihongs.action.anno.Verify)

Example 10 with Preset

use of io.github.ihongs.action.anno.Preset in project HongsCORE by ihongs.

the class JAction method search.

@Override
@Action("search")
@Preset(conf = "", form = "")
@Select(conf = "", form = "")
public void search(ActionHelper helper) throws HongsException {
    IEntity sr = getEntity(helper);
    Map rd = helper.getRequestData();
    rd = getReqMap(helper, sr, "search", rd);
    Map sd = sr.search(rd);
    sd = getRspMap(helper, sr, "search", sd);
    helper.reply(sd);
}
Also used : Map(java.util.Map) Action(io.github.ihongs.action.anno.Action) Preset(io.github.ihongs.action.anno.Preset) Select(io.github.ihongs.action.anno.Select)

Aggregations

Action (io.github.ihongs.action.anno.Action)15 Preset (io.github.ihongs.action.anno.Preset)15 Map (java.util.Map)15 CommitSuccess (io.github.ihongs.action.anno.CommitSuccess)7 Verify (io.github.ihongs.action.anno.Verify)5 Select (io.github.ihongs.action.anno.Select)4 IAction (io.github.ihongs.dh.IAction)4 JAction (io.github.ihongs.dh.JAction)4 HongsException (io.github.ihongs.HongsException)3 UserAction (io.github.ihongs.serv.master.UserAction)3 HashMap (java.util.HashMap)3 Titles (io.github.ihongs.dh.search.TitlesHelper.Titles)2 FormSet (io.github.ihongs.action.FormSet)1 Table (io.github.ihongs.db.Table)1 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Set (java.util.Set)1