package com.fs.qw.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.qw.mapper.QwAppMiniProgramRelationMapper;
import com.fs.qw.domain.QwAppMiniProgramRelation;
import com.fs.qw.service.IQwAppMiniProgramRelationService;

/**
 * 应用-小程序关系Service业务层处理
 * 
 * @author fs
 * @date 2026-01-13
 */
@Service
public class QwAppMiniProgramRelationServiceImpl extends ServiceImpl<QwAppMiniProgramRelationMapper, QwAppMiniProgramRelation> implements IQwAppMiniProgramRelationService {

    /**
     * 查询应用-小程序关系
     * 
     * @param id 应用-小程序关系主键
     * @return 应用-小程序关系
     */
    @Override
    public QwAppMiniProgramRelation selectQwAppMiniProgramRelationById(Long id)
    {
        return baseMapper.selectQwAppMiniProgramRelationById(id);
    }

    /**
     * 查询应用-小程序关系列表
     * 
     * @param qwAppMiniProgramRelation 应用-小程序关系
     * @return 应用-小程序关系
     */
    @Override
    public List<QwAppMiniProgramRelation> selectQwAppMiniProgramRelationList(QwAppMiniProgramRelation qwAppMiniProgramRelation)
    {
        return baseMapper.selectQwAppMiniProgramRelationList(qwAppMiniProgramRelation);
    }

    /**
     * 新增应用-小程序关系
     * 
     * @param qwAppMiniProgramRelation 应用-小程序关系
     * @return 结果
     */
    @Override
    public int insertQwAppMiniProgramRelation(QwAppMiniProgramRelation qwAppMiniProgramRelation)
    {
        qwAppMiniProgramRelation.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertQwAppMiniProgramRelation(qwAppMiniProgramRelation);
    }

    /**
     * 修改应用-小程序关系
     * 
     * @param qwAppMiniProgramRelation 应用-小程序关系
     * @return 结果
     */
    @Override
    public int updateQwAppMiniProgramRelation(QwAppMiniProgramRelation qwAppMiniProgramRelation)
    {
        qwAppMiniProgramRelation.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateQwAppMiniProgramRelation(qwAppMiniProgramRelation);
    }

    /**
     * 批量删除应用-小程序关系
     * 
     * @param ids 需要删除的应用-小程序关系主键
     * @return 结果
     */
    @Override
    public int deleteQwAppMiniProgramRelationByIds(Long[] ids)
    {
        return baseMapper.deleteQwAppMiniProgramRelationByIds(ids);
    }

    /**
     * 删除应用-小程序关系信息
     * 
     * @param id 应用-小程序关系主键
     * @return 结果
     */
    @Override
    public int deleteQwAppMiniProgramRelationById(Long id)
    {
        return baseMapper.deleteQwAppMiniProgramRelationById(id);
    }
}
