无关风月
2024-09-14 3f481005be717250a2ea87ff9367aa84d6a3eb13
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package com.xinquan.system.controller;
 
 
import com.xinquan.common.core.domain.R;
import com.xinquan.system.domain.ContentSetting;
import com.xinquan.system.domain.VipSetting;
import com.xinquan.system.service.VipSettingService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.omg.CORBA.PRIVATE_MEMBER;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
 
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
 
/**
 * <p>
 * 会员设置表 前端控制器
 * </p>
 *
 * @author mitao
 * @since 2024-08-21
 */
@RestController
@RequestMapping("/system/vip-setting")
public class VipSettingController {
    @Resource
    private VipSettingService vipSettingService;
    @PostMapping("/getVipPrice")
    @ApiOperation(value = "安卓-获取月度 季度 年度会员价格",tags = "会员")
    public R<VipSetting> getVipPrice() {
        VipSetting one = vipSettingService.lambdaQuery().eq(VipSetting::getClientType, 1)
                .eq(VipSetting::getSettingType, 1).one();
        return R.ok(one);
    }
    @PostMapping("/getVipPriceApple")
    @ApiOperation(value = "苹果-获取月度 季度 年度会员价格",tags = "会员")
    public R<VipSetting> getVipPriceApple() {
        VipSetting one = vipSettingService.lambdaQuery().eq(VipSetting::getClientType, 2)
                .eq(VipSetting::getSettingType, 1).one();
        return R.ok(one);
    }
    @PostMapping("/getVipContent")
    @ApiOperation(value = "获取会员权益介绍/获取会员用户协议/获取续费管理说明",tags = "会员")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "内容类型 1=会员权益介绍 2=会员用户协议 3=续费管理说明", name = "type", required = true, dataType = "int"),
    })
    public R<String> getVipPriceApple(Integer type) {
        VipSetting one = vipSettingService.lambdaQuery()
                .eq(VipSetting::getSettingType, type+1).one();
        return R.ok(one.getContent());
    }
}