package com.starry.admin.modules.weichat.controller;

import com.starry.admin.common.aspect.ClerkUserLogin;
import com.starry.admin.modules.play.service.IPlayCommodityInfoService;
import com.starry.admin.modules.weichat.entity.PlayCommodityReturnVo;
import com.starry.common.result.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 店员等级
 *
 * @author admin
 * @since 2024/5/29 上午6:24
 **/
@Slf4j
@RestController
@RequestMapping("/wx/commodity/")
public class WxClerkCommodityController {

    @Resource
    private IPlayCommodityInfoService playCommodityInfoService;


    /**
     * 顾客查询所有店员所有服务项目
     *
     * @return 店员所有服务项目
     */
    @GetMapping("/custom/queryClerkAllCommodity")
    public R customQueryClerkAllCommodity() {
        List<PlayCommodityReturnVo> tree = playCommodityInfoService.selectTree();
        return R.ok(tree);
    }


    /**
     * 顾客查询所有店员所有服务项目
     *
     * @return 店员所有服务项目
     */
    @ClerkUserLogin
    @GetMapping("/clerk/queryAllCommodity")
    public R clerkQueryAllCommodity() {
        List<PlayCommodityReturnVo> tree = playCommodityInfoService.selectTree();
        return R.ok(tree);
    }


}
