package com.tzy.controller.permissions;


import com.tzy.annotation.ApiLimitRule;
import com.tzy.annotation.RequireRoles;
import com.tzy.common.dto.OutDTO;
import com.tzy.common.utils.UserType;
import com.tzy.framework.web.domain.LimitRule;
import com.tzy.permissions.service.AppMerPermissionsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * app商家权限
 */
@Api(value = "app商家权限")
@RestController
@RequestMapping("/api/mer/permissions")
@Slf4j
public class AppMerPermissionsController {

    @Autowired
    private AppMerPermissionsService appMerPermissionsService;

    /**
     * 商家权限查询
     * @return
     */
    @ApiOperation( value = "商家权限查询")
    @RequestMapping(value = "/query", method = RequestMethod.POST)
    @ApiLimitRule(seconds = 1, limitCount = 1, type = LimitRule.USER, msg = "操作频繁!")
    @ResponseBody
    public List<String> getMerPermissions() {
       return appMerPermissionsService.getMerPermissions();
    }



}
