package com.shkj.wms.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shkj.common.core.domain.Result;
import com.shkj.wms.domain.BusinDataTaskDetail;
import com.shkj.wms.mapper.BusinDataTaskDetailMapper;
import com.shkj.wms.service.IBusinDataTaskDetailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author zjx
 * @date 2023-04-07
 */
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class BusinDataTaskDetailServiceImpl extends ServiceImpl<BusinDataTaskDetailMapper, BusinDataTaskDetail> implements IBusinDataTaskDetailService
{
    @Resource
    private BusinDataTaskDetailMapper businDataTaskDetailMapper;




    /**
     * 查询【请填写功能名称】
     *
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public BusinDataTaskDetail selectBusinTaskDetailById(Long id)
    {
        return businDataTaskDetailMapper.selectBusinTaskDetailById(id);
    }

    @Override
    public Result<Boolean> insertBusinTaskDetail(BusinDataTaskDetail businDataTaskDetail) {
        this.save(businDataTaskDetail);
        return Result.ok();
    }

    @Override
    public int updateInfoByLocationCode(Long oldLocationId, Long newLocation) {
        return this.businDataTaskDetailMapper.updateInfoByLocationCode(oldLocationId,newLocation);
    }
    @Override
    public int updateOld(Long oldLocationId) {
        return this.businDataTaskDetailMapper.updateOld(oldLocationId);
    }
    @Override
    public int updateNew(Long newLocation) {
        return this.businDataTaskDetailMapper.updateNew(newLocation);
    }


}
