POST
/promotion/couponTemplate/getCouponTemplate开放/回调优惠劵模板详情
营销与触达 / 券模板
基本信息
- 接口状态前端在用 免鉴权
- 接口URLPOST
https://dscp-dev.hn12301.net/open-api/promotion/couponTemplate/getCouponTemplate - 请求方式
POST - Content-Type
application/json - 暴露渠道开放/回调 前缀
/open-api - 名称来源源码注释
- 调用方已确认在用 · 湘工惠商城(1 个前端)
- 需求上下文
- 维护人 / 最后改动hao 2025-01-08
- 读写数据表
promotion_coupon、member、promotion_coupon_template反查该表全部接口 → - 控制器
com.jxxx.dscp.api.controller.promotion.PromotionCouponTemplateController#getCouponTemplate - 源码位置
jxxx-dscp/dscp-service-business/src/main/java/com/jxxx/dscp/api/controller/promotion/PromotionCouponTemplateController.java:241 - 判定依据
请求参数
Header 请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| 无(渠道统一鉴权头见《认证方式》) | ||||
Query 请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| 无 | ||||
路径参数及说明
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| 无 | ||||
Body 请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| id | … | 否 | Long | id → promotion_coupon_template.id |
| mobile | … | 否 | String | → member.mobile |
| channel | … | 否 | ChannelType | → member.channel 1=北京卡管理系统 2=三省卡系统 3=数字平台 4=质惠游 5=支付宝 6=兴业银行 7=湘工惠 8=湘约码 |
| goodsId | … | 否 | Long | |
| productScope | … | 否 | Integer | → promotion_coupon_template.product_scope |
| count | … | 否 | Integer | |
| ids | … | 否 | Set<Long> |
认证方式
响应参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| id | … | 否 | Long | → promotion_coupon_template.id |
| merchantId | … | 否 | Long | 所属商户id,关联merchant表id → promotion_coupon_template.merchant_id |
| shopId | … | 否 | Long | 所属商铺id → promotion_coupon_template.shop_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 |
| canTake | … | 否 | Boolean |
响应示例
成功响应示例
{
"errcode": 0,
"errmsg": "",
"data": {
"id": "1",
"merchantId": "1",
"shopId": "1",
"couponType": "1",
"name": "\"string\"",
"description": "\"string\"",
"status": "1",
"totalCount": "1",
"takeLimitCount": "1",
"takeType": "1",
"usePrice": "1",
"productScope": "1"
}
}附录 · 实现细节
调用链 / 数据表 / 调用点证据 / 源码注释 / 逻辑摘要
涉及数据表:promotion_coupon、member、promotion_coupon_template 反查全部引用接口 →
- PromotionCouponTemplateController#getCouponTemplate
- PromotionCouponService#getUserCanCanTakeMap(PromotionCouponServiceImpl)
- BeanUtils.map → PromotionCouponTemplateResponse
其它依赖:PromotionCouponServiceImpl.getTakeCountMapByTemplateIds
逻辑摘要:查询详情(promotionCouponTemplateService.get);查询详情(promotionCouponService.getUserCanCanTakeMap);入参与返回值经 BeanUtils 做对象/分页映射
源码内联注释(旧站解析结果)
- 处理是否可领取
旧站环境备注:pro:(仓库 .env.pro 指向 uat;生产域名未确认,此处沿用 uat 主机示意)
调用点证据
xghmall/common/http.api.js:28湘工惠商城 · getCouponTemplateUrl