package cn.cslg.report.service.business.asso;

import cn.cslg.report.common.utils.Response;
import cn.cslg.report.entity.asso.SyneryCode;
import cn.cslg.report.entity.asso.Synery_CC;
import cn.cslg.report.mapper.SyneryCCMapper;
import cn.cslg.report.mapper.SyneryCodeMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@SuppressWarnings({"all"})
@Service
@Slf4j
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
public class SyneryCodeService extends ServiceImpl<SyneryCodeMapper, SyneryCode> {
    @Transactional(rollbackFor = Exception.class)
    public String deleteByTaskId(Integer taskId){
    LambdaQueryWrapper<SyneryCode> lambdaQueryWrapper = new LambdaQueryWrapper<>();
    lambdaQueryWrapper.eq(SyneryCode::getTaskId,taskId);
    remove(lambdaQueryWrapper);
    return Response.success();
   }


}
