| | |
| | | |
| | | import cn.gistack.sm.log.entity.SmLogManage; |
| | | import cn.gistack.sm.log.service.ISmLogManageService; |
| | | import cn.gistack.sm.log.vo.AppStatisticsVO; |
| | | import cn.gistack.sm.log.vo.SmLogManageVO; |
| | | import cn.gistack.sm.patrol.entity.PatrolConfig; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.ObjectUtil; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * @ClassName 日志管理 |
| | |
| | | @ApiOperation(value="日志管理-添加", notes="日志管理-添加") |
| | | @PostMapping(value = "/add") |
| | | public R add(@RequestBody SmLogManage smLogManage) { |
| | | |
| | | if (ObjectUtil.isEmpty(smLogManage.getSource())){ |
| | | smLogManage.setSource("WEB"); |
| | | } |
| | | return R.data(smLogManageService.save(smLogManage)); |
| | | } |
| | | |
| | | @ApiOperation(value="日志管理-分页查询", notes="日志管理-分页查询") |
| | | @GetMapping(value = "/page") |
| | | public R page(SmLogManageVO smLogManage, Query query) { |
| | | // IPage<SmLogManage> page = smLogManageService.page(Condition.getPage(query), Condition.getQueryWrapper(smLogManage).orderByDesc("create_time")); |
| | | |
| | | IPage<SmLogManageVO> page = smLogManageService.selectPage(Condition.getPage(query),smLogManage); |
| | | |
| | | return R.data(page); |
| | | } |
| | | |
| | | @ApiOperation(value="查询app使用人数", notes="查询app使用人数") |
| | | @GetMapping(value = "/getAppStatistics") |
| | | public R getAppStatistics(AppStatisticsVO appStatisticsVO){ |
| | | return R.data(smLogManageService.getAppStatistics(appStatisticsVO)); |
| | | } |
| | | |
| | | } |