use of app.hongs.action.anno.CommitSuccess in project HongsCORE by ihongs.
the class UnitAction method doSave.
@Action("save")
@Verify(conf = "matrix", form = "unit")
@CommitSuccess
public void doSave(ActionHelper helper) throws HongsException {
Map data = helper.getRequestData();
String id = model.set(data);
Map info = new HashMap();
info.put("id", id);
info.put("name", data.get("name"));
CoreLocale lang = CoreLocale.getInstance().clone();
lang.load("matrix");
String ms = lang.translate("core.save.unit.success");
helper.reply(ms, info);
}
use of app.hongs.action.anno.CommitSuccess in project HongsCORE by ihongs.
the class UnitAction method doDelete.
@Action("delete")
@CommitSuccess
public void doDelete(ActionHelper helper) throws HongsException {
Map data = helper.getRequestData();
int rows = model.delete(data);
CoreLocale lang = CoreLocale.getInstance().clone();
lang.load("matrix");
String ms = lang.translate("core.delete.unit.success", Integer.toString(rows));
helper.reply(ms, rows);
}
use of app.hongs.action.anno.CommitSuccess in project HongsCORE by ihongs.
the class DBAction method delete.
@Action("delete")
@Preset(conf = "", form = "", deft = { ":delete" })
@CommitSuccess
@Override
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);
}
use of app.hongs.action.anno.CommitSuccess in project HongsCORE by ihongs.
the class JointGate method update.
@Override
@Action("update")
@Preset(conf = "", form = "", deft = { ":update" })
@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);
}
Aggregations