package com.hzs.system.base.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzs.common.domain.system.base.BdPlatformMessageDetail;
import com.hzs.common.domain.system.ext.BdPlatformMessageDetailExt;
import com.hzs.system.base.mapper.BdPlatformMessageDetailMapper;
import com.hzs.system.base.service.IBdPlatformMessageDetailService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 后台站内信详情 服务实现类
 * </p>
 *
 * @author hzs
 * @since 2023-04-04
 */
@Service
public class BdPlatformMessageDetailServiceImpl extends ServiceImpl<BdPlatformMessageDetailMapper, BdPlatformMessageDetail> implements IBdPlatformMessageDetailService {
    @Override
    public List<BdPlatformMessageDetailExt> selectPlatformMessageDetailByPkMember(Integer pkCountry, Long pkMember) {
        return baseMapper.selectPlatformMessageDetailByPkMember(pkCountry, pkMember);
    }

    @Override
    public Integer selectBdPlatformMessageDetailByMessageId(Long messageId) {
        QueryWrapper<BdPlatformMessageDetail> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("PK_MESSAGE", messageId);
        return baseMapper.selectCount(queryWrapper);

    }

}
