@Override
    public Long getSmsTemplateCountByChannelId(Long channelId) {
        return smsTemplateMapper.selectCountByChannelId(channelId);
    }
@Test
    public void testGetSmsTemplateCountByChannelId() {
        // mock 数据
        SmsTemplateDO dbSmsTemplate = randomPojo(SmsTemplateDO.class, o -> o.setChannelId(1L));
        smsTemplateMapper.insert(dbSmsTemplate);
        // 测试 channelId 不匹配
        smsTemplateMapper.insert(ObjectUtils.cloneIgnoreId(dbSmsTemplate, o -> o.setChannelId(2L)));
        // 准备参数
        Long channelId = 1L;

        // 调用
        Long count = smsTemplateService.getSmsTemplateCountByChannelId(channelId);
        // 断言
        assertEquals(1, count);
    }