package jnpf.personnels.controller.web.growth;

import jnpf.base.ActionResult;
import jnpf.model.personnels.dto.staff.growth.FtbPersonnelsStaffGrowthLogDto;
import jnpf.personnels.service.FtbPersonnelsStaffGrowthLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * web员工成长表模块
 *
 * @author xxxxx
 */
@RestController
@RequestMapping("/web/personnels-staff-growth-log")
public class FtbPersonnelsStaffGrowthLogController {

    @Autowired
    private FtbPersonnelsStaffGrowthLogService growthLogService;

    /**
     * 查询员工成长列表
     *
     * @param userId
     * @return
     */
    @GetMapping("/query-list/{userId}")
    public ActionResult<List<FtbPersonnelsStaffGrowthLogDto>> pageLists(@PathVariable("userId") String userId) {
        List<FtbPersonnelsStaffGrowthLogDto> list = growthLogService.queryAll(userId);
        return ActionResult.success(list);
    }
}
