package com.ym.mec.web.controller;

import com.ym.mec.biz.service.MemberFeeSettingService;
import com.ym.mec.common.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("memberFeeSetting")
@Api(tags = "会员收费标准")
@RestController
public class MemberFeeSettingController extends BaseController {

    @Autowired
    private MemberFeeSettingService memberFeeSettingService;

    @ApiOperation(value = "根据会员等级编号和分部编号获取收费标准")
    @GetMapping("/findByRankId")
    @PreAuthorize("@pcs.hasPermissions('memberFeeSetting/findByRankId')")
    public Object add(Integer organId,Integer rankId) {
        return succeed(memberFeeSettingService.findByRankIdAndOrganId(organId,rankId));
    }
}
