package com.hxzkmonitor.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.hxzkmonitor.pojo.TbDuanxinlog; import com.hxzkmonitor.service.TbDuanxinlogService; import com.hxzkmonitor.util.R; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** *

* 短信记录 前端控制器 *

* * @author wangfei * @since 2024-08-22 */ @RestController @RequestMapping("/") public class TbDuanxinlogController { @Autowired TbDuanxinlogService tbDuanxinlogService; @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/api/getDuanxinlogPage") public R getDuanxinlogPage(Page page, String username) { IPage ipage = tbDuanxinlogService.getDuanxinlogPage( page,username); return R.ok(ipage); } @PostMapping("/api/addorupDuanxinlog") public R addorupDuanxinlog(TbDuanxinlog tbDuanxinlog) { return R.ok(tbDuanxinlogService.addorupDuanxinlog(tbDuanxinlog)); } @GetMapping("/api/delDuanxinlog") public R delDuanxinlog(Integer id) { return R.ok(tbDuanxinlogService.delDuanxinlog(id)); } @GetMapping("/api/searchDuanxinlog") public R searchDuanxinlog(Page page,String keyword, String username ) { return tbDuanxinlogService.searchDuanxinlog(page,keyword,username); } }