package com.fizz.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fizz.business.mapper.SetupTensionMapper;
import com.fizz.business.domain.SetupTension;
import com.fizz.business.service.ISetupTensionService;

/**
 * 全线张力Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-26
 */
@Service
public class SetupTensionServiceImpl implements ISetupTensionService 
{
    @Autowired
    private SetupTensionMapper setupTensionMapper;

    /**
     * 查询全线张力
     * 
     * @param thick 全线张力主键
     * @return 全线张力
     */
    @Override
    public SetupTension selectSetupTensionByThick(Long thick,Long yieldStren)
    {
        return setupTensionMapper.selectSetupTensionByThick(thick,yieldStren);
    }

    /**
     * 查询全线张力列表
     * 
     * @param setupTension 全线张力
     * @return 全线张力
     */
    @Override
    public List<SetupTension> selectSetupTensionList(SetupTension setupTension)
    {
        return setupTensionMapper.selectSetupTensionList(setupTension);
    }

    /**
     * 新增全线张力
     * 
     * @param setupTension 全线张力
     * @return 结果
     */
    @Override
    public int insertSetupTension(SetupTension setupTension)
    {
        setupTension.setCreateTime(DateUtils.getNowDate());
        return setupTensionMapper.insertSetupTension(setupTension);
    }

    /**
     * 修改全线张力
     * 
     * @param setupTension 全线张力
     * @return 结果
     */
    @Override
    public int updateSetupTension(SetupTension setupTension)
    {
        setupTension.setUpdateTime(DateUtils.getNowDate());
        return setupTensionMapper.updateSetupTension(setupTension);
    }

    /**
     * 批量删除全线张力
     * 
     * @param thicks 需要删除的全线张力主键
     * @return 结果
     */
    @Override
    public int deleteSetupTensionByThicks(Long[] thicks,Long[] yieldStrens)
    {
        return setupTensionMapper.deleteSetupTensionByThicks(thicks,yieldStrens);
    }

    /**
     * 删除全线张力信息
     * 
     * @param thick 全线张力主键
     * @return 结果
     */
    @Override
    public int deleteSetupTensionByThick(Long thick)
    {
        return setupTensionMapper.deleteSetupTensionByThick(thick);
    }
}
