Files
nuttyreading-java/src/main/java/com/peanut/modules/sys/controller/SysAgreementController.java
2024-01-05 14:21:02 +08:00

93 lines
1.9 KiB
Java

/**
* Copyright (c) 2016-2019 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有,侵权必究!
*/
package com.peanut.modules.sys.controller;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.modules.sys.entity.SysAgreementEntity;
import com.peanut.modules.sys.service.SysAgreementService;
import com.peanut.modules.sys.service.SysLogService;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 系统日志
*
* @author Mark sunlightcs@gmail.com
*/
@Slf4j
@RestController
@RequestMapping("/sys/agreement")
public class SysAgreementController {
@Autowired
private SysAgreementService sysAgreementService;
/**
* 列表
*/
@ResponseBody
@GetMapping("/list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = sysAgreementService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 保存
* @param agre
* @return
*/
@PostMapping("/save")
public R save(@RequestBody SysAgreementEntity agre){
sysAgreementService.save(agre);
return R.ok();
}
/**
* 更新
* @param agre
* @return
*/
@PostMapping("/update")
public R update(@RequestBody SysAgreementEntity agre){
sysAgreementService.updateById(agre);
return R.ok();
}
/**
* 获取隐私协议
* @return
*/
@RequestMapping("/getPrivacyDetail")
public R getPrivacyDetail(){
SysAgreementEntity privacyDetail = sysAgreementService.getPrivacyDetail();
return R.ok().put("privacy",privacyDetail);
}
/**
* 获取用户协议
* @return
*/
@RequestMapping("/getUserDetail")
public R getUserDetail(){
SysAgreementEntity userDetail = sysAgreementService.getUserDetail();
return R.ok().put("user",userDetail);
}
}