package com.ruoyi.web.controller.api; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.system.domain.TUser; import com.ruoyi.system.domain.TVipConfig; import com.ruoyi.system.service.TVipConfigService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; /** *

* 会员设置 前端控制器 *

* * @author xiaochen * @since 2024-02-29 */ @Api(tags = "会员设置") @RestController @RequestMapping("/tVipConfig") public class TVipConfigController { private final TVipConfigService vipConfigService; @Autowired public TVipConfigController(TVipConfigService vipConfigService) { this.vipConfigService = vipConfigService; } /** * 获取会员配置 */ @ApiOperation(value = "获取会员配置") @GetMapping(value = "/getById") public AjaxResult getById(@RequestParam Long id) { return AjaxResult.success(vipConfigService.getById(1)); } /** * 编辑会员配置 */ @ApiOperation(value = "编辑会员配置") @PostMapping(value = "/updateById") public AjaxResult updateById(@RequestBody TVipConfig vipConfig) { return AjaxResult.success(vipConfigService.updateById(vipConfig)); } }