diff --git a/src/main/java/au/com/royalpay/payment/manage/logview/web/ConfigOperationController.java b/src/main/java/au/com/royalpay/payment/manage/logview/web/ConfigOperationController.java new file mode 100644 index 000000000..32e839412 --- /dev/null +++ b/src/main/java/au/com/royalpay/payment/manage/logview/web/ConfigOperationController.java @@ -0,0 +1,29 @@ +package au.com.royalpay.payment.manage.logview.web; + +import au.com.royalpay.payment.manage.logview.beans.WechatMsgQueryBean; +import au.com.royalpay.payment.manage.logview.core.WechatMsgRepository; +import au.com.royalpay.payment.manage.permission.manager.ManagerMapping; +import au.com.royalpay.payment.tools.permission.enums.ManagerRole; + +import com.alibaba.fastjson.JSONObject; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +/** + * Created by Tayl0r on 2017/5/3. + */ +@RestController +@ManagerMapping(value = "/sys_logs/config/operation", method = RequestMethod.GET, role = ManagerRole.ADMIN) +public class ConfigOperationController { + @Resource + private WechatMsgRepository wechatMsgRepository; + + @RequestMapping + public JSONObject listWechatMsgs(WechatMsgQueryBean wechatMsgQueryBean){ + return wechatMsgRepository.listWechatMsgs(wechatMsgQueryBean); + } +} diff --git a/src/main/ui/static/config/logview/logview.js b/src/main/ui/static/config/logview/logview.js index 02677df18..023c24d8b 100644 --- a/src/main/ui/static/config/logview/logview.js +++ b/src/main/ui/static/config/logview/logview.js @@ -29,6 +29,10 @@ define(['angular', 'uiRouter'], function (angular) { url: '/wechatMsg', templateUrl: '/static/config/logview/templates/wechat_msg_log.html', controller: 'wechatMsgLogCtrl' + }).state('logview.config_operation', { + url: '/config_operation', + templateUrl: '/static/config/logview/templates/config_opertaion_log.html', + controller: 'configOperationLogCtrl' }) }]); app.controller('logviewRootCtrl', ['$scope', function ($scope) { @@ -110,5 +114,21 @@ define(['angular', 'uiRouter'], function (angular) { }; $scope.listWechatMsgs(); }]); + + app.controller('configOperationLogCtrl', ['$scope', '$http', '$filter', function ($scope, $http, $filter) { + $scope.pagination = {}; + $scope.params = {date: new Date()}; + $scope.listWechatMsgs = function (page) { + var params = angular.copy($scope.params) || {}; + params.page = page || $scope.pagination.page || 1; + params.date = $filter('date')(params.date, 'yyyyMMdd'); + $http.get('/sys_logs/wechat_msg', {params: params}).then(function (resp) { + $scope.wechatMsgs = resp.data.data; + $scope.pagination = resp.data.pagination; + }); + }; + $scope.listWechatMsgs(); + }]); + return app; }); \ No newline at end of file diff --git a/src/main/ui/static/config/logview/templates/config_opertaion_log.html b/src/main/ui/static/config/logview/templates/config_opertaion_log.html new file mode 100644 index 000000000..d50f52b00 --- /dev/null +++ b/src/main/ui/static/config/logview/templates/config_opertaion_log.html @@ -0,0 +1,69 @@ +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
TimeClientUserIPMethod
+
+ +
\ No newline at end of file