POST/promotion/couponTemplate/updatePromotionCouponTemplate管理后台

优惠劵模板-更新

营销与触达 / 券模板· PromotionCouponTemplateController#updatePromotionCouponTemplate

基本信息

  • 接口状态前端在用 置信度 高
  • 接口URLPOSThttps://dscp-dev.hn12301.net/manage-api/promotion/couponTemplate/updatePromotionCouponTemplate
  • 请求方式POST
  • Content-Typeapplication/json
  • 暴露渠道管理后台 前缀 /manage-api
  • 名称来源源码注释
  • 调用方已确认在用 · 管理后台(1 个前端)
  • 需求上下文优惠券基础功能
  • 维护人 / 最后改动liuxu 2024-11-18 最近提交:优惠券基础功能
  • 读写数据表promotion_coupon_template、goods、hotel_info 反查该表全部接口 →
  • 控制器com.jxxx.dscp.api.controller.promotion.PromotionCouponTemplateController#updatePromotionCouponTemplate
  • 源码位置jxxx-dscp/dscp-service-business/src/main/java/com/jxxx/dscp/api/controller/promotion/PromotionCouponTemplateController.java:115
  • 判定依据1 个调用点:dscp-html-manage/src/api/promotion/coupon/couponTemplate.ts

请求参数

Header 请求参数

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

Query 请求参数

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

路径参数及说明

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

Body 请求参数

Body 类型 PromotionCouponTemplateUpdateRequest
参数名参数值是否必填参数类型描述说明
id…否Longid → promotion_coupon_template.id
couponType…否Integer优惠券种类 → promotion_coupon_template.coupon_type
name…否String优惠劵名 → promotion_coupon_template.name
description…否String优惠劵描述 → promotion_coupon_template.description
status…否Integer状态 → promotion_coupon_template.status
totalCount…否Integer发放数量, -1 - 则表示不限制 → promotion_coupon_template.total_count
takeLimitCount…否Integer每人限领个数, -1 - 则表示不限制 → promotion_coupon_template.take_limit_count
takeType…否Integer领取方式 → promotion_coupon_template.take_type
usePrice…否Integer是否设置满多少金额可用,单位:分 → promotion_coupon_template.use_price
productScope…否Integer商品范围 → promotion_coupon_template.product_scope
productScopeValues…否List<Long>商品范围编号的数组 → promotion_coupon_template.product_scope_values
validityType…否Integer生效日期类型 → promotion_coupon_template.validity_type
validStartTime…否Date固定日期-生效开始时间 → promotion_coupon_template.valid_start_time
validEndTime…否Date固定日期-生效结束时间 → promotion_coupon_template.valid_end_time
fixedStartTerm…否Integer领取日期-开始天数 → promotion_coupon_template.fixed_start_term
fixedEndTerm…否Integer领取日期-结束天数 → promotion_coupon_template.fixed_end_term
discountType…否Integer优惠类型:1-代金卷;2-折扣卷 → promotion_coupon_template.discount_type
discountPercent…否Integer折扣百分比 → promotion_coupon_template.discount_percent
discountPrice…否Integer优惠金额,单位:分 → promotion_coupon_template.discount_price
discountLimitPrice…否Integer折扣上限,仅在 discount_type 等于 2 时生效 → promotion_coupon_template.discount_limit_price
takeCount…否Integer领取优惠券的数量 → promotion_coupon_template.take_count
useCount…否Integer使用优惠券的次数 → promotion_coupon_template.use_count
creator…否Long创建者 → promotion_coupon_template.creator
createTime…否Date创建时间 → promotion_coupon_template.create_time
updater…否Long更新者 → promotion_coupon_template.updater
updateTime…否Date更新时间 → promotion_coupon_template.update_time
deleted…否Boolean是否删除 → promotion_coupon_template.deleted

认证方式

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

响应参数

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

响应示例

成功响应示例 code=0

{"errcode":0,"errmsg":""}

失败响应示例

{
  "data": null,
  "可能返回": [
    {
      "errcode": "99999",
      "errmsg": "服务内部错误"
    }
  ]
}
示例来自源码/导出内容,仅结构参考,非线上真实数据。

附录 · 实现细节

调用链 / 数据表 / 调用点证据 / 源码注释 / 逻辑摘要
涉及数据表:promotion_coupon_template、goods、hotel_info 反查全部引用接口 →
  • PromotionCouponTemplateController#updatePromotionCouponTemplate
  • PromotionCouponTemplateService#updatePromotionCouponTemplate(PromotionCouponTemplateServiceImpl)
  • SessionUserService#getSessionId
  • GoodsService#validateGoodsList(GoodsServiceImpl)
  • GoodsMapper#selectBatchIds
  • HotelInfoService#validateHotelsList(HotelInfoServiceImpl)
  • HotelInfoMapper#selectBatchIds
  • PromotionCouponTemplateMapper#updateById
  • BeanUtils.map → PromotionCouponTemplate ⇒ 表 promotion_coupon_template
其它依赖:SessionUserService.getSessionId
逻辑摘要:更新(promotionCouponTemplateService.updatePromotionCouponTemplate)
操作日志:promotion / 更新优惠券模板
旧站环境备注:pro:(仓库 .env.pro 指向 uat;生产域名未确认,此处沿用 uat 主机示意)
调用点证据
  • dscp-html-manage/src/api/promotion/coupon/couponTemplate.ts:17 管理后台 · request
可能抛出的业务码:99999 服务内部错误 错误码字典 →
由 tools/build.py 从 data/apis.json 生成 · 生成时间 2026-09-12 19:49 · 数据口径见说明 · 本页数字非手写,均来自同一份数据