基本完成转链。富贵指日可待!

This commit is contained in:
Leo
2025-04-05 01:45:09 +08:00
parent 79775dde63
commit 82c54f409c
3 changed files with 566 additions and 262 deletions

View File

@@ -0,0 +1,22 @@
package cn.van.business.util;
import static cn.van.business.util.JDUtil.UserInteractionState.GiftMoneyStep.STEP_QUANTITY;
/**
* @author Leo
* @version 1.0
* @create 2025/4/4 20:46
* @description
*/
// 实现金额处理步骤
class AmountStepHandler implements FlowStepHandler {
public void handle(JDUtil util, String wxid, String input, JDUtil.UserInteractionState state) {
if (!util.isValidAmount(input)) {
util.wxUtil.sendTextMessage(wxid, "金额格式错误", 1, wxid);
return;
}
state.getCollectedFields().put("amount", input);
state.setCurrentStep(STEP_QUANTITY);
}
}