feat(代理自充): AUG26-017 代理自充收款方式与线下预存款审批字段
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m52s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m52s
- 受控配置新增代理在线自充允许范围(仅微信/仅支付宝/同时支持),读侧与创建侧取允许范围与可用商户池交集,两侧失败关闭 - 新增允许范围查询与修改端点,读限代理与平台账号、写限超级管理员,复用受控配置写服务留痕 - tb_agent_recharge_record 新增交易流水号、线下收款方式三列快照与其他凭证列(成对迁移 000213) - 线下申请校验启用的收款方式字典项与必填交易流水号,交易流水号独立于在线渠道交易号、不参与去重 - 扩展 offline_recharge_approval 场景可映射字段白名单与字典引用保护 - 新增付款凭证识别能力与交易流水号预填接口,识别不落库、日志不记录载荷
This commit is contained in:
@@ -132,13 +132,16 @@ func (s *Service) createOffline(
|
||||
return nil, errors.New(errors.CodeServiceUnavailable, "员工线下代充值审批能力未配置")
|
||||
}
|
||||
result, err := s.offlineCreation.Execute(ctx, agentrechargeapp.CreateOfflineCommand{
|
||||
SubmitterAccountID: userID,
|
||||
SubmitterUserType: userType,
|
||||
ShopID: *req.ShopID,
|
||||
RechargeNo: rechargeNo,
|
||||
Amount: req.Amount,
|
||||
PaymentVoucherKeys: req.PaymentVoucherKey,
|
||||
Remark: req.Remark,
|
||||
SubmitterAccountID: userID,
|
||||
SubmitterUserType: userType,
|
||||
ShopID: *req.ShopID,
|
||||
RechargeNo: rechargeNo,
|
||||
Amount: req.Amount,
|
||||
PaymentVoucherKeys: req.PaymentVoucherKey,
|
||||
OtherVoucherKeys: req.OtherVoucherKey,
|
||||
OfflinePaymentMethodID: req.OfflinePaymentMethodID,
|
||||
ExternalTransactionNo: req.ExternalTransactionNo,
|
||||
Remark: req.Remark,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -602,6 +605,7 @@ func toResponse(record *model.AgentRechargeRecord, shopName string) *dto.AgentRe
|
||||
RechargeSource: rechargeSource,
|
||||
RechargeSourceName: rechargeSourceName,
|
||||
PaymentVoucherKey: []string(record.PaymentVoucherKey),
|
||||
OtherVoucherKey: []string(record.OtherVoucherKeys),
|
||||
Remark: record.Remark,
|
||||
Status: record.Status,
|
||||
StatusName: constants.GetRechargeStatusName(record.Status),
|
||||
@@ -621,6 +625,18 @@ func toResponse(record *model.AgentRechargeRecord, shopName string) *dto.AgentRe
|
||||
if record.PaymentTransactionID != nil {
|
||||
resp.PaymentTransactionID = *record.PaymentTransactionID
|
||||
}
|
||||
if record.ExternalTransactionNo != nil {
|
||||
resp.ExternalTransactionNo = *record.ExternalTransactionNo
|
||||
}
|
||||
if record.OfflinePaymentMethodID != nil {
|
||||
resp.OfflinePaymentMethodID = *record.OfflinePaymentMethodID
|
||||
}
|
||||
if record.OfflinePaymentMethodCode != nil {
|
||||
resp.OfflinePaymentMethodCode = *record.OfflinePaymentMethodCode
|
||||
}
|
||||
if record.OfflinePaymentMethodName != nil {
|
||||
resp.OfflinePaymentMethodName = *record.OfflinePaymentMethodName
|
||||
}
|
||||
if record.PaidAt != nil {
|
||||
t := record.PaidAt.Format("2006-01-02 15:04:05")
|
||||
resp.PaidAt = &t
|
||||
|
||||
Reference in New Issue
Block a user