日志分页增加最后一页last跟总记录数count显示,同配置分页

This commit is contained in:
zhanghongqing
2018-11-07 10:05:50 +08:00
parent c23a376b31
commit 704653e204
35 changed files with 202 additions and 47 deletions

View File

@@ -75,7 +75,7 @@ public class AppLogController extends BaseController{
if (fromJson.getStatus().intValue() == 200) {
Page<NtcAppLog> data = fromJson.getData();
page.setList(data.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<NtcAppLog> list = page.getList();
for (NtcAppLog l : list) {
l.setFunctionId(entry.getFunctionId());

View File

@@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -50,7 +51,7 @@ public class BgpLogController extends BaseController {
Gson gson = new GsonBuilder().create();
LogRecvData<NtcBGPLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<NtcBGPLog>>(){}.getType());
if (fromJson.getStatus().intValue() == 200) {
page.setList(fromJson.getData().getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<NtcBGPLog> list = page.getList();
for (NtcBGPLog l : list) {
l.setFunctionId(log.getFunctionId());

View File

@@ -1,7 +1,6 @@
package com.nis.web.controller.log.ntc;
import java.io.IOException;
import java.sql.Timestamp;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@@ -11,6 +10,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.client.ClientProtocolException;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -23,7 +23,6 @@ import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
import com.google.gson.reflect.TypeToken;
import com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type;
import com.nis.domain.FunctionServiceDict;
import com.nis.domain.Page;
import com.nis.domain.PageLog;
@@ -33,7 +32,6 @@ import com.nis.util.Constants;
import com.nis.util.DictUtils;
import com.nis.util.httpclient.HttpClientUtil;
import com.nis.web.controller.BaseController;
import com.sun.jna.platform.win32.OaIdl.DATE;
@Controller
@RequestMapping(value = "${adminPath}/log/ntc/ntcDdosLogs")
@@ -87,7 +85,7 @@ public class DdosLogController extends BaseController{
if (fromJson.getStatus().intValue() == 200) {
Page<NtcDdosLog> data = fromJson.getData();
page.setList(data.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<NtcDdosLog> list = page.getList();
for (NtcDdosLog l : list) {
l.setFunctionId(entry.getFunctionId());

View File

@@ -56,7 +56,7 @@ public class DnsLogController extends BaseController {
LogRecvData<NtcDnsLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<NtcDnsLog>>(){}.getType());
if (fromJson.getStatus().intValue() == 200) {
// BeanUtils.copyProperties(fromJson.getData(), page);
page.setList(fromJson.getData().getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<NtcDnsLog> list = page.getList();
for (NtcDnsLog l : list) {
l.setFunctionId(log.getFunctionId());

View File

@@ -68,7 +68,7 @@ public class FtpLogController extends BaseController{
if (fromJson.getStatus().intValue() == 200) {
// BeanUtils.copyProperties(fromJson.getData(), page);
Page<NtcFtpLog> data = fromJson.getData();
page.setList(data.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<NtcFtpLog> list = page.getList();
for (NtcFtpLog l : list) {
l.setFunctionId(entry.getFunctionId());

View File

@@ -56,7 +56,7 @@ public class HttpKeyLogController extends BaseController {
LogRecvData<NtcKeywordsUrlLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<NtcKeywordsUrlLog>>(){}.getType());
if (fromJson.getStatus().intValue() == 200) {
Page<NtcKeywordsUrlLog> data = fromJson.getData();
page.setList(data.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<NtcKeywordsUrlLog> list = page.getList();
for (NtcKeywordsUrlLog l : list) {
l.setFunctionId(log.getFunctionId());

View File

@@ -55,7 +55,7 @@ public class HttpLogController extends BaseController {
LogRecvData<NtcHttpLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<NtcHttpLog>>(){}.getType());
if (fromJson.getStatus().intValue() == 200) {
Page<NtcHttpLog> data = fromJson.getData();
page.setList(data.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<NtcHttpLog> list = page.getList();
for (NtcHttpLog l : list) {
l.setFunctionId(log.getFunctionId());

View File

@@ -56,7 +56,7 @@ public class IpLogController extends BaseController {
Gson gson = new GsonBuilder().create();
LogRecvData<NtcIpLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<NtcIpLog>>(){}.getType());
if (fromJson.getStatus().intValue() == 200) {
// BeanUtils.copyProperties(fromJson.getData(), page);
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});
page.setList(fromJson.getData().getList());
List<NtcIpLog> list = page.getList();
for (NtcIpLog l : list) {

View File

@@ -67,6 +67,7 @@ public class IpsecLogController extends BaseController{
if (fromJson.getStatus().intValue() == 200) {
List<NtcIpsecLog> list = fromJson.getData().getList();
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});
page.setList(list);
for (NtcIpsecLog l : list) {
l.setFunctionId(entry.getFunctionId());

View File

@@ -53,7 +53,7 @@ public class L2tpLogController extends BaseController {
LogRecvData<NtcL2tpLog> fromJson = gson.fromJson(resJson, new TypeToken<LogRecvData<NtcL2tpLog>>() {}.getType());
if(fromJson.getStatus().intValue() == 200) {
Page<NtcL2tpLog> fromPage = fromJson.getData();
page.setList(fromPage.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<NtcL2tpLog> list = fromPage.getList();
for (NtcL2tpLog log : list) {
log.setFunctionId(ntcL2tpLog.getFunctionId());

View File

@@ -51,7 +51,7 @@ public class MailLogController extends BaseController {
Gson gson = new GsonBuilder().create();
LogRecvData<NtcMailLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<NtcMailLog>>(){}.getType());
if (fromJson.getStatus().intValue() == 200) {
page.setList(fromJson.getData().getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<NtcMailLog> list = page.getList();
for (NtcMailLog l : list) {
l.setFunctionId(log.getFunctionId());

View File

@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.client.ClientProtocolException;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -66,7 +67,7 @@ public class MmAvIpLogController extends BaseController{
if (fromJson.getStatus().intValue() == 200) {
Page<MmAvIpLog> data = fromJson.getData();
page.setList(data.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<MmAvIpLog> list = page.getList();
for (MmAvIpLog l : list) {
l.setFunctionId(entry.getFunctionId());

View File

@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.client.ClientProtocolException;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -66,7 +67,7 @@ public class MmAvUrlLogController extends BaseController{
if (fromJson.getStatus().intValue() == 200) {
Page<NtcStreamMediaLog> data = fromJson.getData();
page.setList(data.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<NtcStreamMediaLog> list = page.getList();
for (NtcStreamMediaLog l : list) {
l.setFunctionId(entry.getFunctionId());

View File

@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.client.ClientProtocolException;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -66,7 +67,7 @@ public class MmFileDigestLogController extends BaseController{
if (fromJson.getStatus().intValue() == 200) {
Page<MmFileDigestLog> data = fromJson.getData();
page.setList(data.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<MmFileDigestLog> list = page.getList();
for (MmFileDigestLog l : list) {
l.setFunctionId(entry.getFunctionId());

View File

@@ -7,6 +7,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -51,7 +52,7 @@ public class MmPicIpLogController extends BaseController {
LogRecvData<MmPicIpLog> fromJson = gson.fromJson(resJson, new TypeToken<LogRecvData<MmPicIpLog>>() {}.getType());
if(fromJson.getStatus().intValue() == 200) {
Page<MmPicIpLog> fromPage = fromJson.getData();
page.setList(fromPage.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<MmPicIpLog> list = fromPage.getList();
for (MmPicIpLog log : list) {
log.setFunctionId(mmPicIpLog.getFunctionId());

View File

@@ -7,6 +7,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -51,7 +52,7 @@ public class MmPicUrlController extends BaseController{
LogRecvData<MmPicUrlLog> fromJson = gson.fromJson(resJson, new TypeToken<LogRecvData<MmPicUrlLog>>() {}.getType());
if(fromJson.getStatus().intValue() == 200) {
Page<MmPicUrlLog> fromPage = fromJson.getData();
page.setList(fromPage.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<MmPicUrlLog> list = fromPage.getList();
for (MmPicUrlLog log : list) {
log.setFunctionId(mmPicUrlLog.getFunctionId());

View File

@@ -7,6 +7,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -53,7 +54,7 @@ public class MmPornAvSampleController extends BaseController {
if (fromJson.getStatus().intValue() == 200) {
Page<MmAvIpLog> data = fromJson.getData();
page.setList(data.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<MmAvIpLog> list = page.getList();
for (MmAvIpLog l : list) {
l.setFunctionId(entry.getFunctionId());
@@ -94,7 +95,7 @@ public class MmPornAvSampleController extends BaseController {
if (fromJson.getStatus().intValue() == 200) {
Page<MmAvIpLog> data = fromJson.getData();
page.setList(data.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<MmAvIpLog> list = page.getList();
for (MmAvIpLog l : list) {
l.setFunctionId(entry.getFunctionId());

View File

@@ -7,6 +7,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -51,7 +52,7 @@ public class MmSampleAudioController extends BaseController{
LogRecvData<MmSampleAudioLog> fromJson = gson.fromJson(resJson, new TypeToken<LogRecvData<MmSampleAudioLog>>() {}.getType());
if(fromJson.getStatus().intValue() == 200) {
Page<MmSampleAudioLog> fromPage = fromJson.getData();
page.setList(fromPage.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<MmSampleAudioLog> list = fromPage.getList();
for (MmSampleAudioLog log : list) {
log.setFunctionId(sampleAudioLog.getFunctionId());

View File

@@ -7,6 +7,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -51,7 +52,7 @@ public class MmSampleFaceController extends BaseController{
LogRecvData<MmSamplePicLog> fromJson = gson.fromJson(resJson, new TypeToken<LogRecvData<MmSamplePicLog>>() {}.getType());
if(fromJson.getStatus().intValue() == 200) {
Page<MmSamplePicLog> fromPage = fromJson.getData();
page.setList(fromPage.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<MmSamplePicLog> list = fromPage.getList();
for (MmSamplePicLog log : list) {
log.setFunctionId(samplePicLog.getFunctionId());

View File

@@ -7,6 +7,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -51,7 +52,7 @@ public class MmSampleLogoController extends BaseController{
LogRecvData<MmSamplePicLog> fromJson = gson.fromJson(resJson, new TypeToken<LogRecvData<MmSamplePicLog>>() {}.getType());
if(fromJson.getStatus().intValue() == 200) {
Page<MmSamplePicLog> fromPage = fromJson.getData();
page.setList(fromPage.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<MmSamplePicLog> list = fromPage.getList();
for (MmSamplePicLog log : list) {
log.setFunctionId(samplePicLog.getFunctionId());

View File

@@ -1,3 +1,4 @@
package com.nis.web.controller.log.ntc;
import java.util.HashMap;
@@ -7,6 +8,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -51,7 +53,7 @@ public class MmSamplePicController extends BaseController{
LogRecvData<MmSamplePicLog> fromJson = gson.fromJson(resJson, new TypeToken<LogRecvData<MmSamplePicLog>>() {}.getType());
if(fromJson.getStatus().intValue() == 200) {
Page<MmSamplePicLog> fromPage = fromJson.getData();
page.setList(fromPage.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<MmSamplePicLog> list = fromPage.getList();
for (MmSamplePicLog log : list) {
log.setFunctionId(samplePicLog.getFunctionId());

View File

@@ -7,6 +7,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -51,7 +52,7 @@ public class MmSampleSpeakerController extends BaseController{
LogRecvData<MmSamplePicLog> fromJson = gson.fromJson(resJson, new TypeToken<LogRecvData<MmSamplePicLog>>() {}.getType());
if(fromJson.getStatus().intValue() == 200) {
Page<MmSamplePicLog> fromPage = fromJson.getData();
page.setList(fromPage.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<MmSamplePicLog> list = fromPage.getList();
for (MmSamplePicLog log : list) {
log.setFunctionId(samplePicLog.getFunctionId());

View File

@@ -7,6 +7,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -51,7 +52,7 @@ public class MmSampleVideoController extends BaseController{
LogRecvData<MmSampleVideoLog> fromJson = gson.fromJson(resJson, new TypeToken<LogRecvData<MmSampleVideoLog>>() {}.getType());
if(fromJson.getStatus().intValue() == 200) {
Page<MmSampleVideoLog> fromPage = fromJson.getData();
page.setList(fromPage.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<MmSampleVideoLog> list = fromPage.getList();
for (MmSampleVideoLog log : list) {
log.setFunctionId(sampleVideoLog.getFunctionId());

View File

@@ -1,6 +1,5 @@
package com.nis.web.controller.log.ntc;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
@@ -10,7 +9,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.client.ClientProtocolException;
import org.aspectj.util.FileUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -58,7 +57,7 @@ public class MmSampleVoipLogController extends BaseController {
if (fromJson.getStatus().intValue() == 200) {
Page<MmVoipLog> data = fromJson.getData();
page.setList(data.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<MmVoipLog> list = page.getList();
for (MmVoipLog l : list) {
l.setFunctionId(entry.getFunctionId());

View File

@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.client.ClientProtocolException;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -65,7 +66,7 @@ public class MmVoipAccountLogController extends BaseController{
if (fromJson.getStatus().intValue() == 200) {
Page<MmVoipLog> data = fromJson.getData();
page.setList(data.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<MmVoipLog> list = page.getList();
for (MmVoipLog l : list) {
l.setFunctionId(entry.getFunctionId());

View File

@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.client.ClientProtocolException;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -65,7 +66,7 @@ public class MmVoipIpLogController extends BaseController{
if (fromJson.getStatus().intValue() == 200) {
Page<MmVoipLog> data = fromJson.getData();
page.setList(data.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<MmVoipLog> list = page.getList();
for (MmVoipLog l : list) {
l.setFunctionId(entry.getFunctionId());

View File

@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.client.ClientProtocolException;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -65,7 +66,7 @@ public class MmVoipLogController extends BaseController{
if (fromJson.getStatus().intValue() == 200) {
Page<MmVoipLog> data = fromJson.getData();
page.setList(data.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<MmVoipLog> list = page.getList();
for (MmVoipLog l : list) {
l.setFunctionId(entry.getFunctionId());

View File

@@ -67,7 +67,7 @@ public class OpenVpnLogController extends BaseController{
if (fromJson.getStatus().intValue() == 200) {
Page<NtcOpenVpnLog> data = fromJson.getData();
page.setList(data.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<NtcOpenVpnLog> list = page.getList();
for (NtcOpenVpnLog l : list) {
l.setFunctionId(entry.getFunctionId());

View File

@@ -8,10 +8,12 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
@@ -47,7 +49,7 @@ public class P2pLogController extends BaseController {
Gson gson = new GsonBuilder().create();
LogRecvData<NtcP2pLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<NtcP2pLog>>(){}.getType());
if (fromJson.getStatus().intValue() == 200) {
page.setList(fromJson.getData().getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<NtcP2pLog> list = page.getList();
for (NtcP2pLog l : list) {
l.setFunctionId(log.getFunctionId());

View File

@@ -54,6 +54,7 @@ public class PptpLogController extends BaseController {
if(fromJson.getStatus().intValue() == 200) {
Page<NtcPptpLog> fromPage = fromJson.getData();
List<NtcPptpLog> list = fromPage.getList();
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});
page.setList(list);
for (NtcPptpLog log : list) {
log.setFunctionId(ntcPptpLog.getFunctionId());

View File

@@ -67,7 +67,7 @@ public class SshLogController extends BaseController{
if (fromJson.getStatus().intValue() == 200) {
Page<NtcSshLog> data = fromJson.getData();
page.setList(data.getList());
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});page.setList(fromJson.getData().getList());
List<NtcSshLog> list = page.getList();
for (NtcSshLog l : list) {
l.setFunctionId(entry.getFunctionId());

View File

@@ -58,6 +58,7 @@ public class SslLogController extends BaseController {
if(fromJson.getStatus().intValue() == 200) {
Page<NtcSslLog> fromPage = fromJson.getData();
List<NtcSslLog> list = fromPage.getList();
BeanUtils.copyProperties(fromJson.getData(), page, new String[] {"pageSize","pageNo"});
page.setList(list);
for (NtcSslLog log : list) {
log.setFunctionId(ntcSslLog.getFunctionId());