package com.cool.store.controller.webc;

import com.cool.store.response.ResponseResult;
import com.cool.store.service.EmployeeTrainingService;
import com.cool.store.vo.EmployeeTrainingVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
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;

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

/**
 * @author byd
 * @date 2024-04-30 10:15
 */
@Api(tags = "mini员工培训")
@RestController
@RequestMapping("mini/employeeTraining")
public class MiniEmployeeTrainingController {

    @Resource
    private EmployeeTrainingService employeeTrainingService;

    @ApiOperation("培训员工列表")
    @GetMapping("/trainingListByShopId")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true)
    })
    public ResponseResult<List<EmployeeTrainingVO>> trainingListByShopId(@RequestParam("shopId") Long shopId) {
        return ResponseResult.success(employeeTrainingService.trainingListByShopId(shopId));
    }

}
