package com.microservices.pms.project.service.impl;

import com.microservices.pms.project.domain.PmsIssueTransformationCommentRecord;
import com.microservices.pms.project.mapper.PmsIssueTransformationCommentRecordMapper;
import com.microservices.pms.project.service.IPmsIssueTransformationCommentRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class PmsIssueTransformationCommentRecordServiceImpl implements IPmsIssueTransformationCommentRecordService {

    @Autowired
    private PmsIssueTransformationCommentRecordMapper pmsIssueTransformationCommentRecordMapper;

    @Override
    @Transactional
    public boolean updateByGitlinkIssueId(PmsIssueTransformationCommentRecord record) {
        pmsIssueTransformationCommentRecordMapper.deleteByGitlinkIssueIdAndCommentType(record);
        return pmsIssueTransformationCommentRecordMapper.insertSelective(record);
    }
}
