1 回答
TA贡献1911条经验 获得超7个赞
@ResourceMapping("queryRackLists")
public RpcResult<Rack> queryRackLists(@JsonParam("rackOlds")
List<RackVo> rackList, ErrorContext error) {
RpcResult<Rack> dataResult = new RpcResult<Rack>();
try {
List<Rack> list = rackBo.getRackList(rackList);
dataResult.setDataList(list);
} catch (Exception e) {
logger.error("queryRackLists rackList={}, err : ", JSON.toJSONString(rackList), e);
dataResult.setSuccess(false);
if (e instanceof ServiceException) {
addError(error, e);
dataResult.setInfo(e.getMessage());
} else {
addError(error, ErrorCode.Query_Error);
dataResult.setInfo(ErrorCode.Query_Error.getMsg());
}
}
return dataResult;
}
类似于这种,传入JSONArray,用list来接收。
添加回答
举报