123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- package com.example.xiaoshiweixinback.controller;
- import com.example.xiaoshiweixinback.business.common.Constants;
- import com.example.xiaoshiweixinback.business.common.Response;
- import com.example.xiaoshiweixinback.business.common.base.Records;
- import com.example.xiaoshiweixinback.checkLogin.checkLogin;
- import com.example.xiaoshiweixinback.entity.dto.ProductCategoryDTO;
- import com.example.xiaoshiweixinback.entity.vip.ActiveVipDTO;
- import com.example.xiaoshiweixinback.entity.vip.PersonFunctionVO;
- import com.example.xiaoshiweixinback.entity.weixinPay.FunctionRightVO;
- import com.example.xiaoshiweixinback.entity.weixinPay.VipRightsDTO;
- import com.example.xiaoshiweixinback.service.VipService;
- import io.swagger.v3.oas.annotations.Operation;
- import lombok.RequiredArgsConstructor;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.web.bind.annotation.*;
- import java.util.List;
- @Slf4j
- @RequestMapping(Constants.XIAOSHI_WEIXINBACK + "/vip")
- @RestController
- @RequiredArgsConstructor
- public class VIPController {
- private final VipService vipService;
- @Operation(summary = "查询会员")
- @PostMapping("/queryAllVip")
- public Response getAllvip() {
- Records records = vipService.getAllVip();
- return Response.success(records);
- }
- @Operation(summary = "激活会员")
- @PostMapping("/activeVip")
- public Response activeVip(@RequestBody ActiveVipDTO activeVipDTO) {
- vipService.activateVIP(null,null);
- return Response.success("激活成功");
- }
- @Operation(summary = "查询会员权益")
- @GetMapping("/getVipRights")
- public Response getVipRights() {
- Records records = new Records();
- List<FunctionRightVO> functionRightVOList = vipService.getVipRights();
- records.setData(functionRightVOList);
- return Response.success(records);
- }
- @checkLogin
- @Operation(summary = "查询登录人会员权益")
- @GetMapping("/getPersonRights")
- public Response getPersonRights() {
- Records records = new Records();
- List<PersonFunctionVO> functionRightVOList = vipService.getPersonRights();
- records.setData(functionRightVOList);
- return Response.success(records);
- }
- }
|