feige
2024-06-22 5cdf5c84b04951a6fe43fbe622335f0a14b44f77
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
package com.ruoyi.web.controller.zhang;
 
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.domain.MarryUser;
import com.ruoyi.service.MarrySelfService;
import com.ruoyi.service.MarryUserService;
import org.omg.CORBA.PUBLIC_MEMBER;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
import javax.websocket.server.PathParam;
 
/**
 * @Author Jinquan_Ou
 * @Description
 * @Date 2023-08-07 21:30
 * @Version 1.0.0
 **/
@RestController
@RequestMapping("/marryUser")
public class MarryUserController {
 
    @Resource
    MarryUserService marryUserService;
 
    //获取前任信息
    @GetMapping()
    public AjaxResult getInfo(){
        return marryUserService.getInfo();
    }
 
    //新增前任
    @PostMapping()
    public AjaxResult addData(@RequestBody MarryUser marryUser){
        return marryUserService.addData(marryUser);
    }
 
    //修改前任
    @PutMapping()
    public AjaxResult updateData(@RequestBody MarryUser marryUser){
        return marryUserService.updateData(marryUser);
    }
 
    //删除前任
    @DeleteMapping()
    public AjaxResult delete(@PathParam("id") Long id){
        marryUserService.removeById(id);
        return AjaxResult.success();
    }
 
}