package com.zbf.quartz.task;

import com.zbf.system.mapper.TBasePalletMapper;
import com.zbf.system.mapper.TBaseStorageAreaLocationMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

@Component("UpdatePallet")
@Slf4j
public class UpdatePallet {
    @Autowired
    private TBasePalletMapper basePalletMapper;
    @Autowired
    private TBaseStorageAreaLocationMapper baseStorageAreaLocationMapper;
    @Transactional(rollbackFor = Exception.class)
    public void scheduleTask(){
        basePalletMapper.updatePallet();
        baseStorageAreaLocationMapper.updateLocation();

    }
}
