rk
2 天以前 3aef471b170a703b501ddb4d9d2a12791d07ff28
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
package com.doumee.api.business;
 
import com.doumee.api.BaseController;
import com.doumee.biz.system.AgreementConfigBiz;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.dao.dto.AgreementConfigDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
/**
 * 协议配置管理
 * @author rk
 * @date 2026/04/13
 */
@Api(tags = "协议配置")
@RestController
@RequestMapping("/business/agreementConfig")
public class AgreementConfigController extends BaseController {
 
    @Autowired
    private AgreementConfigBiz agreementConfigBiz;
 
    @ApiOperation("查询协议配置")
    @GetMapping
    public ApiResponse<AgreementConfigDTO> getConfig() {
        return ApiResponse.success(agreementConfigBiz.getConfig());
    }
 
    @PreventRepeat
    @ApiOperation("保存协议配置")
    @PostMapping("/save")
    @RequiresPermissions("business:agreementConfig:update")
    public ApiResponse saveConfig(@RequestBody AgreementConfigDTO dto) {
        agreementConfigBiz.saveConfig(dto);
        return ApiResponse.success(null);
    }
}