|
|
@@ -2,11 +2,13 @@ package com.zhiqiyun.open.mvc.manager.controller;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.zhiqiyun.open.annotation.Permission;
|
|
|
import com.zhiqiyun.open.core.enmus.YN;
|
|
|
import com.zhiqiyun.open.core.models.ApiRequestLog;
|
|
|
import com.zhiqiyun.open.core.models.AppKeyInfo;
|
|
|
+import com.zhiqiyun.open.core.models.UserBaseInfo;
|
|
|
import com.zhiqiyun.open.core.service.ApiRequestLogService;
|
|
|
import com.zhiqiyun.open.mvc.Result;
|
|
|
import com.zhiqiyun.open.mvc.manager.params.QueryApiRequestLogParams;
|
|
|
@@ -54,7 +56,11 @@ public class AppKeyInfoController {
|
|
|
if (StringUtils.isNotBlank(params.getRemark())) {
|
|
|
queryWrapper.like("remark", params.getRemark());
|
|
|
}
|
|
|
- Page<AppKeyInfo> resultData = this.appKeyInfoService.page(params.getPage(), queryWrapper);
|
|
|
+
|
|
|
+ Page<AppKeyInfo> page = params.getPage();
|
|
|
+ page.addOrder(OrderItem.desc("created_time"));
|
|
|
+
|
|
|
+ Page<AppKeyInfo> resultData = this.appKeyInfoService.page(page, queryWrapper);
|
|
|
|
|
|
return Result.instance(Result.Code.SUCCESS).setData(resultData);
|
|
|
}
|
|
|
@@ -80,7 +86,11 @@ public class AppKeyInfoController {
|
|
|
queryWrapper.between("service_begin_time", params.getServiceBeginTime().getStatDate(), params.getServiceBeginTime().getEndDate());
|
|
|
}
|
|
|
|
|
|
- Page<ApiRequestLog> resultData = this.apiRequestLogService.page(params.getPage(), queryWrapper);
|
|
|
+
|
|
|
+ Page<ApiRequestLog> page = params.getPage();
|
|
|
+ page.addOrder(OrderItem.desc("service_begin_time"));
|
|
|
+
|
|
|
+ Page<ApiRequestLog> resultData = this.apiRequestLogService.page(page, queryWrapper);
|
|
|
|
|
|
return Result.instance(Result.Code.SUCCESS).setData(resultData);
|
|
|
}
|
|
|
@@ -109,6 +119,7 @@ public class AppKeyInfoController {
|
|
|
AppKeyInfo appKeyInfo = new AppKeyInfo();
|
|
|
BeanUtils.copyProperties(param, appKeyInfo);
|
|
|
appKeyInfo.setId(id);
|
|
|
+ this.appKeyInfoService.refreshCache(id.toString());
|
|
|
this.appKeyInfoService.updateById(appKeyInfo);
|
|
|
|
|
|
return Result.instance(Result.Code.MESSAGE_SUCCESS);
|