| package com.dy.pmsBase.log; | 
|   | 
| import com.dy.common.aop.SsoPowerAop; | 
| import com.dy.common.webUtil.BaseResponse; | 
| import com.dy.common.webUtil.BaseResponseUtils; | 
| import com.dy.common.webUtil.QueryResultVo; | 
| import com.dy.pmsGlobal.aop.Log; | 
| import com.dy.pmsGlobal.pojoBa.BaLog; | 
| import lombok.extern.slf4j.Slf4j; | 
| import org.springframework.beans.factory.annotation.Autowired; | 
| import org.springframework.http.MediaType; | 
| import org.springframework.web.bind.annotation.*; | 
|   | 
| import java.util.List; | 
|   | 
| @Slf4j | 
| @RestController | 
| @RequestMapping(path = "log") | 
| @SuppressWarnings("unchecked") | 
| public class LogCtrl { | 
|   | 
|     private LogSv sv; | 
|     @Autowired | 
|     public void setSv(LogSv sv) { | 
|         this.sv = sv; | 
|     } | 
|   | 
|     /** | 
|      * 根据id查询日志 | 
|      * @return | 
|      */ | 
|     @GetMapping(path = "one") | 
|     @SsoPowerAop(power = "10100006") //登录与权限同时验证 | 
|     @Log("查询单条日志") | 
|     public BaseResponse<BaLog> one(String id){ | 
|         return BaseResponseUtils.buildSuccess(sv.selectById(Long.parseLong(id))); | 
|     } | 
|   | 
|     /** | 
|      * 查询日志 | 
|      * @return | 
|      */ | 
|     @PostMapping(path = "some", consumes = MediaType.APPLICATION_JSON_VALUE) | 
|     @SsoPowerAop(power = "10100006") //登录与权限同时验证 | 
|     @Log("查询日志") | 
|     public BaseResponse<QueryResultVo<List<BaLog>>> some(@RequestBody QueryVo vo){ | 
|         QueryResultVo<List<BaLog>> res = sv.selectSome(vo); | 
|         return BaseResponseUtils.buildSuccess(res); | 
|     } | 
|   | 
| } |