Skip to content

refactor(SellProduct): 优化货品更换逻辑和文本输出#1033

Merged
he0119 merged 5 commits intomainfrom
refactor/sell-product-retry
Mar 6, 2026
Merged

refactor(SellProduct): 优化货品更换逻辑和文本输出#1033
he0119 merged 5 commits intomainfrom
refactor/sell-product-retry

Conversation

@he0119
Copy link
Contributor

@he0119 he0119 commented Mar 6, 2026

利用 maxhit 限制换货次数,同时在成功卖出货品之后不再提示 该据点调度券不足,过一会再来吧

close #871

应该也能修复 fix #681,但是我这里没有测试环境。

Summary by Sourcery

优化 SellProduct 流水线,对商品兑换尝试次数进行上限控制,并在成功销售后避免出现误导性的优惠券不足警告。

Bug Fixes:

  • 修复在 SellProduct 流程中商品成功售出后,仍然出现优惠券不足警告的问题。

Enhancements:

  • 在不同地点的 SellProduct 流水线中,基于 maxhit 对商品兑换尝试次数施加上限限制。
Original summary in English

Summary by Sourcery

Refine SellProduct pipelines to cap product exchange attempts and avoid misleading coupon shortage warnings after successful sales.

Bug Fixes:

  • Prevent coupon shortage warnings from appearing after a product has been successfully sold in SellProduct flows.

Enhancements:

  • Apply maxhit-based limits on product exchange attempts across SellProduct pipelines for different locations.

Bug 修复:

  • 防止在商品成功售出后仍然出现“派发优惠券不足”的警告。

功能增强:

  • 在不同地点的 SellProduct 流水线中,通过 maxhit 配置限制商品兑换次数。
Original summary in English

Summary by Sourcery

优化 SellProduct 流水线,对商品兑换尝试次数进行上限控制,并在成功销售后避免出现误导性的优惠券不足警告。

Bug Fixes:

  • 修复在 SellProduct 流程中商品成功售出后,仍然出现优惠券不足警告的问题。

Enhancements:

  • 在不同地点的 SellProduct 流水线中,基于 maxhit 对商品兑换尝试次数施加上限限制。
Original summary in English

Summary by Sourcery

Refine SellProduct pipelines to cap product exchange attempts and avoid misleading coupon shortage warnings after successful sales.

Bug Fixes:

  • Prevent coupon shortage warnings from appearing after a product has been successfully sold in SellProduct flows.

Enhancements:

  • Apply maxhit-based limits on product exchange attempts across SellProduct pipelines for different locations.

Copilot AI review requested due to automatic review settings March 6, 2026 04:03
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗨——我已经 review 了你的改动,看起来很棒!


Sourcery 对开源项目是免费的——如果你觉得我们的代码审查有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进之后的代码审查。
Original comment in English

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

该 PR 针对 SellProduct 售卖流程做重构:通过锚点动态切换“调度券不足”提示节点,并用 max_hit 限制“缺货→更换货品”的触发次数,以实现「成功完成一次交易」后不再输出“该据点调度券不足,过一会再来吧”(close #871)。

Changes:

  • SellCore.json 引入 [Anchor]SellProductZeroMoneyHandler,并新增 SellProductZeroMoneyWithTip,实现“未成交才提示、成交后不提示”的分流。
  • 将“缺货处理”拆分为“先尝试换货(max_hit=1)”与“换货后仍缺货(进入换据点流程)”两个节点,移除 *AfterChange 分支。
  • Wuling.json / ValleyIV.json 的各据点入口设置锚点为 SellProductZeroMoneyWithTip,并在成交确认后将锚点切回无提示版本。

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
assets/resource_fast/pipeline/SellProduct/SellCore.json 核心售卖逻辑重构:缺货换货次数限制、调度券不足提示分流与锚点切换
assets/resource_fast/pipeline/SellProduct/ChangeGoods.json 更换货品确认后回到统一的 SellProductAtSell 流程
assets/resource_fast/pipeline/SellProduct/Wuling.json 武陵据点售卖入口设置 SellProductZeroMoneyHandler 锚点为带提示版本
assets/resource_fast/pipeline/SellProduct/ValleyIV.json 四号谷地各据点售卖入口设置 SellProductZeroMoneyHandler 锚点为带提示版本

@he0119 he0119 marked this pull request as draft March 6, 2026 05:27
@he0119 he0119 marked this pull request as ready for review March 6, 2026 06:11
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗨,我已经审查了你的改动,一切看起来都很好!


Sourcery 对开源项目是免费的——如果你觉得我们的代码审查有帮助,请考虑分享它们 ✨
帮我变得更有用!请对每条评论点 👍 或 👎,我会根据你的反馈改进之后的代码审查。
Original comment in English

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@he0119 he0119 merged commit ceb060d into main Mar 6, 2026
17 checks passed
@he0119 he0119 deleted the refactor/sell-product-retry branch March 6, 2026 07:55
MistEO pushed a commit that referenced this pull request Mar 9, 2026
利用 maxhit 限制换货次数,同时在成功卖出货品之后不再提示 `该据点调度券不足,过一会再来吧`。

close #871

应该也能修复 fix #681,但是我这里没有测试环境。

## Summary by Sourcery

优化 SellProduct 流水线,对商品兑换尝试次数进行上限控制,并在成功销售后避免出现误导性的优惠券不足警告。

Bug Fixes:
- 修复在 SellProduct 流程中商品成功售出后,仍然出现优惠券不足警告的问题。

Enhancements:
- 在不同地点的 SellProduct 流水线中,基于 `maxhit` 对商品兑换尝试次数施加上限限制。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Refine SellProduct pipelines to cap product exchange attempts and avoid
misleading coupon shortage warnings after successful sales.

Bug Fixes:
- Prevent coupon shortage warnings from appearing after a product has
been successfully sold in SellProduct flows.

Enhancements:
- Apply maxhit-based limits on product exchange attempts across
SellProduct pipelines for different locations.

</details>

Bug 修复:
- 防止在商品成功售出后仍然出现“派发优惠券不足”的警告。

功能增强:
- 在不同地点的 SellProduct 流水线中,通过 `maxhit` 配置限制商品兑换次数。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

优化 SellProduct 流水线,对商品兑换尝试次数进行上限控制,并在成功销售后避免出现误导性的优惠券不足警告。

Bug Fixes:
- 修复在 SellProduct 流程中商品成功售出后,仍然出现优惠券不足警告的问题。

Enhancements:
- 在不同地点的 SellProduct 流水线中,基于 `maxhit` 对商品兑换尝试次数施加上限限制。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Refine SellProduct pipelines to cap product exchange attempts and avoid
misleading coupon shortage warnings after successful sales.

Bug Fixes:
- Prevent coupon shortage warnings from appearing after a product has
been successfully sold in SellProduct flows.

Enhancements:
- Apply maxhit-based limits on product exchange attempts across
SellProduct pipelines for different locations.

</details>

</details>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
MistEO pushed a commit that referenced this pull request Mar 9, 2026
利用 maxhit 限制换货次数,同时在成功卖出货品之后不再提示 `该据点调度券不足,过一会再来吧`。

close #871

应该也能修复 fix #681,但是我这里没有测试环境。

## Summary by Sourcery

优化 SellProduct 流水线,对商品兑换尝试次数进行上限控制,并在成功销售后避免出现误导性的优惠券不足警告。

Bug Fixes:
- 修复在 SellProduct 流程中商品成功售出后,仍然出现优惠券不足警告的问题。

Enhancements:
- 在不同地点的 SellProduct 流水线中,基于 `maxhit` 对商品兑换尝试次数施加上限限制。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Refine SellProduct pipelines to cap product exchange attempts and avoid
misleading coupon shortage warnings after successful sales.

Bug Fixes:
- Prevent coupon shortage warnings from appearing after a product has
been successfully sold in SellProduct flows.

Enhancements:
- Apply maxhit-based limits on product exchange attempts across
SellProduct pipelines for different locations.

</details>

Bug 修复:
- 防止在商品成功售出后仍然出现“派发优惠券不足”的警告。

功能增强:
- 在不同地点的 SellProduct 流水线中,通过 `maxhit` 配置限制商品兑换次数。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

优化 SellProduct 流水线,对商品兑换尝试次数进行上限控制,并在成功销售后避免出现误导性的优惠券不足警告。

Bug Fixes:
- 修复在 SellProduct 流程中商品成功售出后,仍然出现优惠券不足警告的问题。

Enhancements:
- 在不同地点的 SellProduct 流水线中,基于 `maxhit` 对商品兑换尝试次数施加上限限制。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Refine SellProduct pipelines to cap product exchange attempts and avoid
misleading coupon shortage warnings after successful sales.

Bug Fixes:
- Prevent coupon shortage warnings from appearing after a product has
been successfully sold in SellProduct flows.

Enhancements:
- Apply maxhit-based limits on product exchange attempts across
SellProduct pipelines for different locations.

</details>

</details>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

一键售卖产品文本优化 当据点交易界面未选择交易品时一件售卖产品出现bug

2 participants