Search in sources :

Example 16 with Ret

use of com.jfinal.kit.Ret in project my_curd by qinyou.

the class BaseController method renderFail.

/**
 * 失败操作
 *
 * @param data
 */
protected void renderFail(List<Object> data) {
    Ret ret = Ret.create().setFail().setIfNotNull("data", data);
    render(new JsonRender(ret).forIE());
}
Also used : Ret(com.jfinal.kit.Ret) JsonRender(com.jfinal.render.JsonRender)

Example 17 with Ret

use of com.jfinal.kit.Ret in project my_curd by qinyou.

the class IdsRequired method handleError.

@Override
protected void handleError(Controller c) {
    Ret ret = Ret.create().setFail().set("msg", "ids 参数为空");
    c.renderJson(ret);
}
Also used : Ret(com.jfinal.kit.Ret)

Aggregations

Ret (com.jfinal.kit.Ret)17 JsonRender (com.jfinal.render.JsonRender)10 RequirePermission (com.github.qinyou.common.annotation.RequirePermission)2 Controller (com.jfinal.core.Controller)2 JSONArray (com.alibaba.fastjson.JSONArray)1 JSONObject (com.alibaba.fastjson.JSONObject)1 UserClaim (com.github.qinyou.common.utils.jwt.UserClaim)1 SysNoticeService (com.github.qinyou.system.service.SysNoticeService)1 Table (com.hxkj.common.util.code_generator.Table)1 CodeGeneratorService (com.hxkj.system.service.CodeGeneratorService)1 Record (com.jfinal.plugin.activerecord.Record)1 UploadFile (com.jfinal.upload.UploadFile)1 ExpiredJwtException (io.jsonwebtoken.ExpiredJwtException)1 File (java.io.File)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 HttpServletRequest (javax.servlet.http.HttpServletRequest)1