王飞
2025-01-23 8b878300a3b44426d20b72ad4aea0291571a76ce
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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;
 
/**
 * <p>
 * 短信记录 前端控制器
 * </p>
 *
 * @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<TbDuanxinlog> 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);
    }
 
}