Search in sources :

Example 21 with CommitSuccess

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

the class DBAction method delete.

@Override
@Action("delete")
@Preset(conf = "", form = "", defs = { ":defence" })
@CommitSuccess
public void delete(ActionHelper helper) throws HongsException {
    Model ett = getEntity(helper);
    Map req = helper.getRequestData();
    req = getReqMap(helper, ett, "delete", req);
    int num = ett.delete(req);
    String msg = getRspMsg(helper, ett, "delete", num);
    helper.reply(msg, num);
}
Also used : Map(java.util.Map) Action(io.github.ihongs.action.anno.Action) IAction(io.github.ihongs.dh.IAction) CommitSuccess(io.github.ihongs.action.anno.CommitSuccess) Preset(io.github.ihongs.action.anno.Preset)

Example 22 with CommitSuccess

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

the class DBAction method create.

@Override
@Action("create")
@Preset(conf = "", form = "", defs = { ":initial" })
@Verify(conf = "", form = "")
@CommitSuccess
public void create(ActionHelper helper) throws HongsException {
    Model ett = getEntity(helper);
    Map req = helper.getRequestData();
    req = getReqMap(helper, ett, "create", req);
    String nid = ett.create(req);
    String msg = getRspMsg(helper, ett, "create", 1);
    helper.reply(msg, nid);
}
Also used : Map(java.util.Map) Action(io.github.ihongs.action.anno.Action) IAction(io.github.ihongs.dh.IAction) CommitSuccess(io.github.ihongs.action.anno.CommitSuccess) Preset(io.github.ihongs.action.anno.Preset) Verify(io.github.ihongs.action.anno.Verify)

Aggregations

Action (io.github.ihongs.action.anno.Action)22 CommitSuccess (io.github.ihongs.action.anno.CommitSuccess)22 Map (java.util.Map)21 Verify (io.github.ihongs.action.anno.Verify)10 HashMap (java.util.HashMap)10 CoreConfig (io.github.ihongs.CoreConfig)7 CoreLocale (io.github.ihongs.CoreLocale)7 HongsException (io.github.ihongs.HongsException)7 Preset (io.github.ihongs.action.anno.Preset)7 NaviMap (io.github.ihongs.action.NaviMap)4 IAction (io.github.ihongs.dh.IAction)3 Table (io.github.ihongs.db.Table)2 Calendar (java.util.Calendar)2 Set (java.util.Set)2 DB (io.github.ihongs.db.DB)1 FetchCase (io.github.ihongs.db.util.FetchCase)1 SearchAction (io.github.ihongs.dh.search.SearchAction)1 RoleSet (io.github.ihongs.serv.auth.RoleSet)1 User (io.github.ihongs.serv.master.User)1 UserAction (io.github.ihongs.serv.master.UserAction)1