|  |  |  | 
|---|
|  |  |  | @RequestMapping(path = "log") | 
|---|
|  |  |  | @SuppressWarnings("unchecked") | 
|---|
|  |  |  | public class LogCtrl { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private LogSv sv; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | public void setSv(LogSv sv) { | 
|---|
|  |  |  | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping(path = "one") | 
|---|
|  |  |  | @SsoPowerAop(power = "10100010") //登录与权限同时验证 | 
|---|
|  |  |  | @SsoPowerAop(power = "10100006") //登录与权限同时验证 | 
|---|
|  |  |  | @Log("查询单条日志") | 
|---|
|  |  |  | public BaseResponse<BaLog> one(String id){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(sv.selectById(Long.parseLong(id))); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("查询单条日志数据异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(sv.selectById(Long.parseLong(id))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping(path = "some", consumes = MediaType.APPLICATION_JSON_VALUE) | 
|---|
|  |  |  | @SsoPowerAop(power = "10100010") //登录与权限同时验证 | 
|---|
|  |  |  | @SsoPowerAop(power = "10100006") //登录与权限同时验证 | 
|---|
|  |  |  | @Log("查询日志") | 
|---|
|  |  |  | public BaseResponse<QueryResultVo<List<BaLog>>> some(@RequestBody QueryVo vo){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | QueryResultVo<List<BaLog>> res = sv.selectSome(vo); | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(res); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("查询日志异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | QueryResultVo<List<BaLog>> res = sv.selectSome(vo); | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(res); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|