基本完成转链。富贵指日可待!
This commit is contained in:
22
src/main/java/cn/van/business/util/AmountStepHandler.java
Normal file
22
src/main/java/cn/van/business/util/AmountStepHandler.java
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user