POST
/goodsChannel/updateGoodsChannel管理后台商品渠道-更新
商品与履约 / 渠道
基本信息
- 接口状态前端在用
- 接口URLPOST
https://dscp-dev.hn12301.net/manage-api/goodsChannel/updateGoodsChannel - 请求方式
POST - Content-Type
application/json - 暴露渠道管理后台 前缀
/manage-api - 名称来源源码注释
- 调用方已确认在用 · 管理后台(1 个前端)
- 需求上下文
- 维护人 / 最后改动AsiQue 2023-12-13
- 读写数据表
goods_channel、goods_channel_extend反查该表全部接口 → - 控制器
com.jxxx.dscp.api.controller.goods.GoodsChannelController#updateGoodsChannel - 源码位置
jxxx-dscp/dscp-service-business/src/main/java/com/jxxx/dscp/api/controller/goods/GoodsChannelController.java:191 - 判定依据
请求参数
Header 请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| 无(渠道统一鉴权头见《认证方式》) | ||||
Query 请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| 无 | ||||
路径参数及说明
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| 无 | ||||
Body 请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| id | … | 是 | Long | id → goods_channel.id |
| goodsChannelName | … | 是 | String | 商品渠道名称 → goods_channel.goods_channel_name |
| goodsId | … | 是 | Long | 关联商品id → goods_channel.goods_id |
| skuId | … | 是 | Long | 关联skuId → goods_channel.sku_id |
| merchantId | … | 是 | Long | 商品所属商户id → goods_channel.merchant_id |
| shopId | … | 是 | Long | 商铺id(关联shop表id) → goods_channel.shop_id |
| channelMerchantId | … | 是 | Long | 渠道商户id → goods_channel.channel_merchant_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<GoodsChannelExtendUpdateRequest> | 供货价设置列表 |
| id | … | 否 | Long | id → goods_channel.id |
| 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 |
认证方式
响应参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| void —— 不返回业务数据(外层包装见全局公共参数) | ||||
响应示例
成功响应示例
{"errcode":0,"errmsg":""}附录 · 实现细节
调用链 / 数据表 / 调用点证据 / 源码注释 / 逻辑摘要
涉及数据表:goods_channel、goods_channel_extend 反查全部引用接口 →
- GoodsChannelController#updateGoodsChannel
- GoodsChannelService#update(GoodsChannelServiceImpl)
- GoodsChannelMapper#update
- GoodsChannelExtendService#queryList(GoodsChannelExtendServiceImpl)
- GoodsChannelExtendMapper#queryList
- GoodsChannelExtendService#delete(GoodsChannelExtendServiceImpl)
- GoodsChannelExtendMapper#delete
- GoodsChannelExtendService#addList(GoodsChannelExtendServiceImpl)
- GoodsChannelExtendMapper#addList
- GoodsChannelExtendService#updateList(GoodsChannelExtendServiceImpl)
- GoodsChannelExtendMapper#updateList
- BeanUtils.map → GoodsChannel ⇒ 表 goods_channel
- BeanUtils.map → GoodsChannelExtend ⇒ 表 goods_channel_extend
- BeanUtils.mapList → GoodsChannelExtend ⇒ 表 goods_channel_extend
其它依赖:ChaosTransactionTemplate.execute
逻辑摘要:调用 execute(newTransactionTemplate.execute);更新(goodsChannelService.update);调用 isNotEmpty(CollectionUtils.isNotEmpty);入参与返回值经 BeanUtils 做对象/分页映射
操作日志:goods / 更新商品渠道
源码内联注释(旧站解析结果)
- 查询商品信息
- 查询渠道商铺
- 更新商品渠道
- 更新商品供货区间
- 查询现有数据
- 处理删除数据
- 处理新增数据
- 处理更新数据
旧站环境备注:pro:(仓库 .env.pro 指向 uat;生产域名未确认,此处沿用 uat 主机示意)
调用点证据
dscp-html-manage/src/api/goods/channel/index.ts:25管理后台 · request