| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | 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.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @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<TVipConfig> 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)); |
| | | } |
| | | |
| | | } |
| | | |