houzhongjian
2024-10-16 7da8f196dee8e3c526c009a4bc7f5983ece6bb97
提交 | 用户 | 时间
e7c126 1 package com.iailab.module.system.api.logger;
H 2
3 import com.iailab.framework.common.pojo.CommonResult;
4 import com.iailab.framework.common.pojo.PageResult;
5 import com.iailab.framework.common.util.object.BeanUtils;
6 import com.iailab.module.system.api.logger.dto.OperateLogCreateReqDTO;
7 import com.iailab.module.system.api.logger.dto.OperateLogPageReqDTO;
8 import com.iailab.module.system.api.logger.dto.OperateLogRespDTO;
9 import com.iailab.module.system.dal.dataobject.logger.OperateLogDO;
10 import com.iailab.module.system.service.logger.OperateLogService;
11 import org.springframework.validation.annotation.Validated;
12 import org.springframework.web.bind.annotation.RestController;
13
14 import javax.annotation.Resource;
15
16 import static com.iailab.framework.common.pojo.CommonResult.success;
17
18 @RestController // 提供 RESTful API 接口,给 Feign 调用
19 @Validated
20 public class OperateLogApiImpl implements OperateLogApi {
21
22     @Resource
23     private OperateLogService operateLogService;
24
25     @Override
26     public CommonResult<Boolean> createOperateLog(OperateLogCreateReqDTO createReqDTO) {
27         operateLogService.createOperateLog(createReqDTO);
28         return success(true);
29     }
30
31     @Override
32     public CommonResult<PageResult<OperateLogRespDTO>> getOperateLogPage(OperateLogPageReqDTO pageReqVO) {
33         PageResult<OperateLogDO> operateLogPage = operateLogService.getOperateLogPage(pageReqVO);
34         return success(BeanUtils.toBean(operateLogPage, OperateLogRespDTO.class));
35     }
36
37 }