Search in sources :

Example 1 with JsonRender

use of com.duangframework.mvc.render.JsonRender in project duangframework by tcrct.

the class BaseController method returnJson.

public void returnJson(int ret, String msg, Object obj) {
    ReturnDto<Object> dto = new ReturnDto<>();
    HeadDto head = ToolsKit.getThreadLocalDto();
    head.setRet(ret);
    head.setMsg(msg);
    head.setUri(request.getRequestURI());
    dto.setHead(head);
    dto.setData(obj);
    render = new JsonRender(dto);
}
Also used : HeadDto(com.duangframework.core.common.dto.result.HeadDto) JsonRender(com.duangframework.mvc.render.JsonRender) JSONObject(com.alibaba.fastjson.JSONObject) ReturnDto(com.duangframework.core.common.dto.result.ReturnDto)

Aggregations

JSONObject (com.alibaba.fastjson.JSONObject)1 HeadDto (com.duangframework.core.common.dto.result.HeadDto)1 ReturnDto (com.duangframework.core.common.dto.result.ReturnDto)1 JsonRender (com.duangframework.mvc.render.JsonRender)1