完善 SmsChannelServiceImpl 单元测试

This commit is contained in:
YunaiV
2023-02-02 21:05:58 +08:00
parent d7f86afd6c
commit 97fd7a7187
4 changed files with 44 additions and 41 deletions

View File

@@ -70,7 +70,7 @@ public class SmsChannelController {
@GetMapping("/list-all-simple")
@ApiOperation(value = "获得短信渠道精简列表", notes = "包含被禁用的短信渠道")
public CommonResult<List<SmsChannelSimpleRespVO>> getSimpleSmsChannels() {
public CommonResult<List<SmsChannelSimpleRespVO>> getSimpleSmsChannelList() {
List<SmsChannelDO> list = smsChannelService.getSmsChannelList();
// 排序后,返回给前端
list.sort(Comparator.comparing(SmsChannelDO::getId));

View File

@@ -1,13 +1,12 @@
package cn.iocoder.yudao.module.system.service.sms;
import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsChannelDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelCreateReqVO;
import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelPageReqVO;
import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelUpdateReqVO;
import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsChannelDO;
import javax.validation.Valid;
import java.util.Collection;
import java.util.List;
/**
@@ -53,14 +52,6 @@ public interface SmsChannelService {
*/
SmsChannelDO getSmsChannel(Long id);
/**
* 获得短信渠道列表
*
* @param ids 编号
* @return 短信渠道列表
*/
List<SmsChannelDO> getSmsChannelList(Collection<Long> ids);
/**
* 获得所有短信渠道列表
*

View File

@@ -15,7 +15,6 @@ import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.Collection;
import java.util.List;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
@@ -102,11 +101,6 @@ public class SmsChannelServiceImpl implements SmsChannelService {
return smsChannelMapper.selectById(id);
}
@Override
public List<SmsChannelDO> getSmsChannelList(Collection<Long> ids) {
return smsChannelMapper.selectBatchIds(ids);
}
@Override
public List<SmsChannelDO> getSmsChannelList() {
return smsChannelMapper.selectList();