package com.qmth.sop.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qmth.sop.business.bean.result.FlowTaskMsgResult;
import com.qmth.sop.business.bean.result.FlowTaskSmsResult;
import com.qmth.sop.business.entity.TFCustomFlowEntity;
import com.qmth.sop.business.mapper.TFCustomFlowEntityMapper;
import com.qmth.sop.business.service.TFCustomFlowEntityService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 自定义流程实体数据 服务实现类
 * </p>
 *
 * @author wangliang
 * @since 2023-07-17
 */
@Service
public class TFCustomFlowEntityServiceImpl extends ServiceImpl<TFCustomFlowEntityMapper, TFCustomFlowEntity> implements TFCustomFlowEntityService {

    /**
     * 根据id和用户id获取流程消息信息
     *
     * @param id
     * @param userId
     * @return
     */
    @Override
    public FlowTaskMsgResult getFlowTaskRemindMsgInfo(Long id, Long userId) {
        return this.baseMapper.getFlowTaskRemindMsgInfo(id, userId);
    }

    /**
     * 获取流程实体id发送短信内容
     *
     * @param id
     * @param userId
     * @return
     */
    @Override
    public FlowTaskSmsResult getFlowTaskRemindSmsInfo(Long id, Long userId) {
        return this.baseMapper.getFlowTaskRemindSmsInfo(id, userId);
    }

    /**
     * 获取crm单号发送短信内容
     *
     * @param crmNo
     * @param userId
     * @return
     */
    @Override
    public FlowTaskSmsResult getFlowTaskRemindSmsInfo(String crmNo, Long userId) {
        return this.baseMapper.getFlowTaskRemindSmsInfoByCrmNo(crmNo, userId);
    }
}
