23 lines
656 B
Java
23 lines
656 B
Java
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,false);
|
||
return;
|
||
}
|
||
state.getCollectedFields().put("amount", input);
|
||
state.setCurrentStep(STEP_QUANTITY);
|
||
}
|
||
}
|