package jnpf.personnels.controller.web.salary;

import jnpf.base.ActionResult;
import jnpf.model.personnels.dto.staff.salarylog.FtbPersonnelsStaffSalaryChangeLogDto;
import jnpf.personnels.service.FtbPersonnelsStaffSalaryChangeLogService;
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-salary-change-log")
public class FtbPersonnelsStaffSalaryChangeLogController {


    @Autowired
    private FtbPersonnelsStaffSalaryChangeLogService staffSalaryChangeLogService;

    /**
     * 查询员工薪酬变化列表
     *
     * @param userId
     * @return
     */
    @GetMapping("/query-list/{userId}")
    @Deprecated(since = "1.0.0")
    public ActionResult<List<FtbPersonnelsStaffSalaryChangeLogDto>> queryList(@PathVariable("userId") String userId) {
        List<FtbPersonnelsStaffSalaryChangeLogDto> list = staffSalaryChangeLogService.queryAll(userId);
        return ActionResult.success(list);
    }
}
