package com.younike.admin;

import com.younike.common.core.controller.BaseController;
import com.younike.common.core.domain.AjaxResult;
import com.younike.system.service.ISysCodeService;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * 会员订单Controller
 *
 * @author zulu.chen
 * @date 2022-01-11
 */
@Api("code表接口")
@RestController
@RequestMapping("/admin/code")
public class AdminSysCodeController extends BaseController {

    @Autowired
    private ISysCodeService sysCodeService;


    /**
     * 查询会员订单列表
     */
    @ApiOperation("查询会员订单列表")
    @PreAuthorize("@ss.hasPermi('admin:user:list')")
    @GetMapping("/codeList")
    public AjaxResult list(@RequestParam("codeId") String codeId) {
        return AjaxResult.success(sysCodeService.selectSysCodeByCodeId(codeId));
    }

}
