POST/goodsChannel/addGoodsChannel管理后台

商品渠道-新增

商品与履约 / 渠道· GoodsChannelController#addGoodsChannel

基本信息

  • 接口状态前端在用 置信度 高
  • 接口URLPOSThttps://dscp-dev.hn12301.net/manage-api/goodsChannel/addGoodsChannel
  • 请求方式POST
  • Content-Typeapplication/json
  • 暴露渠道管理后台 前缀 /manage-api
  • 名称来源源码注释
  • 调用方已确认在用 · 管理后台(1 个前端)
  • 需求上下文feat:新增商品渠道基础服务
  • 维护人 / 最后改动AsiQue 2023-12-12 最近提交:feat:新增商品渠道基础服务
  • 读写数据表goods_channel、goods_channel_extend 反查该表全部接口 →
  • 控制器com.jxxx.dscp.api.controller.goods.GoodsChannelController#addGoodsChannel
  • 源码位置jxxx-dscp/dscp-service-business/src/main/java/com/jxxx/dscp/api/controller/goods/GoodsChannelController.java:142
  • 判定依据1 个调用点:dscp-html-manage/src/api/goods/channel/index.ts

请求参数

Header 请求参数

参数名参数值是否必填参数类型描述说明
无(渠道统一鉴权头见《认证方式》)

Query 请求参数

参数名参数值是否必填参数类型描述说明
无

路径参数及说明

参数名参数值是否必填参数类型描述说明
无

Body 请求参数

Body 类型 GoodsChannelAddRequest
参数名参数值是否必填参数类型描述说明
goodsChannelName…是String商品渠道名称 → goods_channel.goods_channel_name
goodsId…是Long关联商品id → goods_channel.goods_id
skuId…是Long关联skuId → goods_channel.sku_id
channelShopId…是Long渠道商铺id → goods_channel.channel_shop_id
maxSalesPrice…是Integer最大销售价格 → goods_channel.max_sales_price
minSalesPrice…是Integer最小销售价格/分 → goods_channel.min_sales_price
stock…是Integer初始库存 → goods_channel.stock
introduction…否String资源说明 → goods_channel.introduction
remark…否String备注 → goods_channel.remark
goodsChannelExtendList…是List<GoodsChannelExtendAddRequest>供货价设置列表
goodsChannelId…是Long商品渠道id(关联goods_channel表id) → goods_channel_extend.goods_channel_id
minSalesCount…是Integer最小销量 → goods_channel_extend.min_sales_count
maxSalesCount…是Integer最大销量 → goods_channel_extend.max_sales_count
supplyPrice…是Integer供货价格/分 → goods_channel_extend.supply_price

认证方式

需登录态:Authorization: Bearer <token>(多租户另带 tenant-id);30002 会话失效需重登。详见全局公共参数。

响应参数

参数名参数值是否必填参数类型描述说明
void —— 不返回业务数据(外层包装见全局公共参数)

响应示例

成功响应示例 code=0

{"errcode":0,"errmsg":""}
示例来自源码/导出内容,仅结构参考,非线上真实数据。

附录 · 实现细节

调用链 / 数据表 / 调用点证据 / 源码注释 / 逻辑摘要
涉及数据表:goods_channel、goods_channel_extend 反查全部引用接口 →
  • GoodsChannelController#addGoodsChannel
  • GoodsChannelService#mustGet(GoodsChannelServiceImpl)
  • GoodsChannelMapper#mustGet
  • GoodsChannelExtendService#addList(GoodsChannelExtendServiceImpl)
  • GoodsChannelExtendMapper#addList
  • BeanUtils.map → GoodsChannel ⇒ 表 goods_channel
  • BeanUtils.map → GoodsChannelExtend ⇒ 表 goods_channel_extend
其它依赖:ChaosTransactionTemplate.execute
逻辑摘要:调用 execute(newTransactionTemplate.execute);调用 mustGet(goodsChannelService.mustGet);新增(goodsChannelService.add);入参与返回值经 BeanUtils 做对象/分页映射
操作日志:goods / 新增商品渠道
源码内联注释(旧站解析结果)
  • 查询商品信息
  • 查询商品sku信息
  • 查询渠道商铺
  • 新增商品渠道
  • 新增商品供货区间
  • 回滚事务
  • 处理异常
旧站环境备注:pro:(仓库 .env.pro 指向 uat;生产域名未确认,此处沿用 uat 主机示意)
调用点证据
  • dscp-html-manage/src/api/goods/channel/index.ts:15 管理后台 · request
由 tools/build.py 从 data/apis.json 生成 · 生成时间 2026-09-12 19:49 · 数据口径见说明 · 本页数字非手写,均来自同一份数据