New file |
| | |
| | | package com.sinata.web.controller.applet; |
| | | |
| | | import com.sinata.common.core.domain.R; |
| | | import com.sinata.system.domain.SysAgreement; |
| | | 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("/applet/sysAgreement") |
| | | public class AppAgreementController { |
| | | private final SysAgreementService sysAgreementService; |
| | | |
| | | /** |
| | | * 保存用户注册协议 |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @ApiOperation("获取用户注册协议") |
| | | @PostMapping("/get") |
| | | public R<SysAgreement> save(){ |
| | | SysAgreement one = sysAgreementService.lambdaQuery().eq(SysAgreement::getType, 1).one(); |
| | | return R.ok(one); |
| | | } |
| | | @ApiOperation("获取用户隐私协议") |
| | | @PostMapping("/primary/get") |
| | | public R<SysAgreement> save1(){ |
| | | SysAgreement one = sysAgreementService.lambdaQuery().eq(SysAgreement::getType, 2).one(); |
| | | return R.ok(one); |
| | | } |
| | | } |