package cn.iocoder.yudao.module.system.api.bpm;

import cn.iocoder.yudao.module.system.dal.dataobject.biz.ElderlyAskLeaveDO;
import cn.iocoder.yudao.module.system.dal.mysql.biz.ElderlyAskLeaveMapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;

@Service
@Validated
public class BpmAskLeaveApiImpl implements BpmAskLeaveApi {

    @Resource
    private ElderlyAskLeaveMapper elderlyAskLeaveMapper;

    @Override
    public void updateLeaveStatus(Long askLeaveId, Integer leaveStatus) {
        elderlyAskLeaveMapper.update(null, new LambdaUpdateWrapper<ElderlyAskLeaveDO>()
                .eq(ElderlyAskLeaveDO::getId, askLeaveId)
                .set(ElderlyAskLeaveDO::getLeaveStatus, leaveStatus));
    }
}

