Stripe支付--添加推广码功能及相应佣金计算

(cherry picked from commit 0ba28588da)
This commit is contained in:
2025-04-15 10:22:45 +08:00
parent faf98607c4
commit eae4087b3e
17 changed files with 423 additions and 31 deletions

View File

@@ -167,11 +167,21 @@
INSERT IGNORE INTO
t_payment_info (order_no, transaction_id, payment_type, trade_state, payer_total,
type, content, notified, payment_method, last4, hosted_invoice_url,
country, city, ip_address, create_time)
country, city, ip_address, promotion_code, create_time)
VALUES (#{paymentInfo.orderNo}, #{paymentInfo.transactionId}, #{paymentInfo.paymentType},
#{paymentInfo.tradeState}, #{paymentInfo.payerTotal},#{paymentInfo.type}, #{paymentInfo.content},
#{paymentInfo.notified},#{paymentInfo.paymentMethod}, #{paymentInfo.last4},#{paymentInfo.hostedInvoiceUrl},
#{paymentInfo.country},#{paymentInfo.city},#{paymentInfo.ipAddress},#{paymentInfo.createTime});
#{paymentInfo.country},#{paymentInfo.city},#{paymentInfo.ipAddress},#{paymentInfo.promotionCode},#{paymentInfo.createTime});
</insert>
<select id="selectPaidPaymentsByAccountAndPromotion" resultType="com.ai.da.mapper.primary.entity.PaymentInfo">
SELECT pi.*
FROM t_order_info oi
LEFT JOIN t_payment_info pi ON oi.order_no = pi.order_no
WHERE oi.account_id = #{accountId}
AND pi.promotion_code = #{promotionCode}
AND pi.trade_state = 'paid'
</select>
</mapper>

View File

@@ -150,6 +150,12 @@ only.original.works.can.participate.in.the.event=Sorry, only original works can
remaining.credits.insufficient=Your remaining credits are insufficient for this generation. Please recharge.
you.haven't.subscribed.to.any.products.yet=You haven't subscribed to any products yet
generate.result.below.standard=The quality of the generated images currently falls below standard. Please consider adjusting your prompt and trying again.
partial.design.failed=Partial design failed, Please try again later.
email.count.limit=Rate limit reached. Retry in 1 hour.
model.path.cannot.be.empty=Model path cannot be empty.
this.promotion.code.has.expired=This promotion code has expired.
this.promotion.code.is.invalid=This promotion code is invalid.
one.time.limit.per.customer=This code has already been redeemed. Promo codes are limited to one-time use per customer.
# 可能会报异常
# Informative:

View File

@@ -130,6 +130,7 @@ the.workspace.lastIndex.not.found=未找到工作区的lastIndex。
gender.cannot.be.empty=性别不能为空。
image.synthesis.failed=图像合成失败。
priority.cannot.be.repeated=优先级不能重复。
image.modify.failed=图片修改失败,请稍后重试。
slogan.style.cannot.be.empty=标语风格文本不能为空。
slogan.image.cannot.be.empty=标语图片不能为空。
questionnaire.filled.out=您已填写过当前问卷。
@@ -145,6 +146,12 @@ only.original.works.can.participate.in.the.event=抱歉,只有原创作品能
remaining.credits.insufficient=您的剩余积分不够本次生成消耗,请充值
you.haven't.subscribed.to.any.products.yet=您还未订阅任何产品
generate.result.below.standard=当前生成的图像质量低于标准。请考虑调整您的提示词并再次尝试
partial.design.failed=局部设计失败。请稍后重试。
email.count.limit=您的账号触发邮件发送频率限制,请一小时后重试。
model.path.cannot.be.empty=模特路径不能为空
this.promotion.code.has.expired=该促销码已过期。
this.promotion.code.is.invalid=该促销码无效。
one.time.limit.per.customer=该码已兑换。每个促销码每位用户仅限使用一次。
# 可能会报异常
# Informative: