package com.hzs.scm.warn.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzs.common.core.constant.SystemFieldConstants;
import com.hzs.common.core.enums.EYesNo;
import com.hzs.common.core.utils.DateUtils;
import com.hzs.common.domain.scm.warn.IcWarnConfigSpecs;
import com.hzs.scm.warn.mapper.IcWarnConfigSpecsMapper;
import com.hzs.scm.warn.service.IIcWarnConfigSpecsService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 预警配置规格明细 服务实现类
 * </p>
 *
 * @author hzs
 * @since 2024-03-27
 */
@Service
public class IcWarnConfigSpecsServiceImpl extends ServiceImpl<IcWarnConfigSpecsMapper, IcWarnConfigSpecs> implements IIcWarnConfigSpecsService {

    @Override
    public void deleteWarnConfigSpecsById(Long pkId, Long pkMember) {
        UpdateWrapper<IcWarnConfigSpecs> updateWrapper = new UpdateWrapper<>();
        updateWrapper.set(SystemFieldConstants.DEL_FLAG, EYesNo.NO.getIntValue());
        updateWrapper.set(SystemFieldConstants.PK_MODIFIED, pkMember);
        updateWrapper.set(SystemFieldConstants.MODIFIED_TIME, DateUtils.currentDateTime());
        updateWrapper.eq("PK_WARN_CONFIG", pkId);
        update(updateWrapper);
    }
}
