POST/settlement/submitSettlementCard管理后台

旅游卡结算单-提交

结算与分配 / 结算·卡· SettlementCardController#submitSettlementCard

基本信息

  • 接口状态前端在用 置信度 高
  • 接口URLPOSThttps://dscp-dev.hn12301.net/manage-api/settlement/submitSettlementCard
  • 请求方式POST
  • Content-Typeapplication/json
  • 暴露渠道管理后台 前缀 /manage-api
  • 名称来源源码注释
  • 调用方已确认在用 · 管理后台(1 个前端)
  • 需求上下文perf:优化旅游卡结算计算逻辑
  • 维护人 / 最后改动AsiQue 2024-03-27 最近提交:perf:优化旅游卡结算计算逻辑
  • 读写数据表card_resource_rule、estimation_card_check_detail、settlement_card_detail、settlement_card_check_detail、settlement_card_detail_payment 反查该表全部接口 →
  • 控制器com.jxxx.dscp.api.controller.settlement.SettlementCardController#submitSettlementCard
  • 源码位置jxxx-dscp/dscp-service-business/src/main/java/com/jxxx/dscp/api/controller/settlement/SettlementCardController.java:314
  • 判定依据1 个调用点:dscp-html-manage/src/api/settlement/index.ts

请求参数

Header 请求参数

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

Query 请求参数

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

路径参数及说明

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

Body 请求参数

Body 类型 SettlementCardAddRequest
参数名参数值是否必填参数类型描述说明
cardModelId…是Long卡种id → card_resource_rule.card_model_id
profit…是Long单张卡分润金额,单位为分 → settlement_card.profit
issueNum…是Integer结算周期内卡种发行量 → settlement_card.issue_num
isDistributeTotal…是Boolean是否按分配总额 → settlement_card.is_distribute_total
settlementPeriod…是Date[]结算起止时间

认证方式

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

响应参数

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

响应示例

成功响应示例 code=0

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

失败响应示例

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

附录 · 实现细节

调用链 / 数据表 / 调用点证据 / 源码注释 / 逻辑摘要
涉及数据表:card_resource_rule、estimation_card_check_detail、settlement_card_detail、settlement_card_check_detail、settlement_card_detail_payment 反查全部引用接口 →
  • SettlementCardController#submitSettlementCard
  • CardResourceRuleService#queryList(CardResourceRuleServiceImpl)
  • CardResourceRuleMapper#queryList
  • SessionUserService#getSessionId
  • EstimationCardCheckDetailService#addList(EstimationCardCheckDetailServiceImpl)
  • EstimationCardCheckDetailMapper#addList
  • SessionUserService#getSessionUser
  • BeanUtils.map → SettlementCardDetailCalcRequest
  • BeanUtils.map → SettlementCardDetail ⇒ 表 settlement_card_detail
  • BeanUtils.map → SettlementCardCheckDetail ⇒ 表 settlement_card_check_detail
其它依赖:ChaosTransactionTemplate.execute
逻辑摘要:查询详情(cacheService.get);调用 execute(newTransactionTemplate.execute);调用 beginOfMonth(DateUtil.beginOfMonth);入参与返回值经 BeanUtils 做对象/分页映射
操作日志:settlement / 提交结算单
源码内联注释(旧站解析结果)
  • // 获取缓存中的数据
  • if (cache == null) {
  • throw ResCode.SYS_FAIL.toException("结算明细已过期,请重新计算");
  • }
  • 设置结算周期,按月度计算
  • 查询卡种资源结算规则
  • 计算各资源结算明细
  • 合并相同结算方式的结果,重新计算系数和金额
旧站环境备注:pro:(仓库 .env.pro 指向 uat;生产域名未确认,此处沿用 uat 主机示意)
调用点证据
  • dscp-html-manage/src/api/settlement/index.ts:30 管理后台 · request
可能抛出的业务码:99999 服务内部错误 错误码字典 →
由 tools/build.py 从 data/apis.json 生成 · 生成时间 2026-09-12 19:49 · 数据口径见说明 · 本页数字非手写,均来自同一份数据