Commit e91f511c authored by zhangfeng's avatar zhangfeng

新增获取渠道精简列表接口

parent d0402944
......@@ -26,6 +26,7 @@ public interface ChannelConvert {
ChannelRespVO convert(ChannelDO bean);
List<ChannelRespVO> convertList(List<ChannelDO> list);
List<ChannelSimpleRespVO> convertSimpleList(List<ChannelDO> list);
PageResult<ChannelRespVO> convertPage(PageResult<ChannelDO> page);
......
......@@ -86,4 +86,6 @@ public interface ChannelService extends IService<ChannelDO> {
* @return 渠道管理分页
*/
PageResult<ChannelRespVO> channelPage(ChannelPageReqVO pageVO);
List<ChannelDO> getChannelSimpleList();
}
......@@ -19,6 +19,7 @@ import cn.iocoder.yudao.module.sale.service.channel.ChannelService;
import cn.iocoder.yudao.module.sale.service.channelPackaging.ChannelPackagingService;
import cn.iocoder.yudao.module.sale.service.channelPriceStepClearance.ChannelPriceStepClearanceService;
import cn.iocoder.yudao.module.sale.vo.channel.*;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.commons.lang3.StringUtils;
......@@ -233,4 +234,9 @@ public class ChannelServiceImpl extends AbstractService<ChannelMapper, ChannelDO
List<ChannelRespVO> channelList = pageResult.getList();
return pageResult;
}
@Override
public List<ChannelDO> getChannelSimpleList() {
return channelMapper.selectList(new LambdaQueryWrapper<ChannelDO>());
}
}
package cn.iocoder.yudao.module.sale.vo.channel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@ApiModel("渠道精简信息 Response VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ChannelSimpleRespVO {
@ApiModelProperty(value = "", required = true)
private Long channelId;
@ApiModelProperty(value = "中文标题")
private String nameZh;
@ApiModelProperty(value = "英文标题")
private String nameEn;
}
\ No newline at end of file
......@@ -110,6 +110,13 @@ public class ChannelController {
return success(ChannelConvert.INSTANCE.convertList(list));
}
@GetMapping("/list-all-simple")
@ApiOperation(value = "获得渠道精简信息列表", notes = "主要用于前端的下拉选项")
public CommonResult<List<ChannelSimpleRespVO>> getChannelSimpleList() {
List<ChannelDO> list = channelService.getChannelSimpleList();
return success(ChannelConvert.INSTANCE.convertSimpleList(list));
}
@GetMapping("/select")
@ApiOperation("获得可用渠道列表查询(参数可选择一个,最终以目的地国家来查询,不传代表查询所有)")
@ApiImplicitParams({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment