luodangjia
2024-12-24 bd6d42818da5b2551eba1884744f28a42720987d
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
package com.sinata.web.controller.backend.system;
 
import com.sinata.common.core.domain.R;
import com.sinata.system.domain.dto.SysAgreementDTO;
import com.sinata.system.service.SysAgreementService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
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 javax.validation.Valid;
 
/**
 * <p>
 * 协议 前端控制器
 * </p>
 *
 * @author mitao
 * @since 2024-12-23
 */
@Api(tags = {"协议管理相关接口"})
@RestController
@RequiredArgsConstructor
@RequestMapping("/backend/sysAgreement")
public class SysAgreementController {
    private SysAgreementService sysAgreementService;
 
    /**
     * 保存用户注册协议
     * @param dto
     * @return
     */
    @ApiOperation("保存用户注册协议")
    @PostMapping("/save")
    public R<?> save(@Valid @RequestBody SysAgreementDTO dto){
        sysAgreementService.saveAgreement(dto);
        return R.ok();
    }
}