Merge remote-tracking branch 'origin/master'
# Conflicts: # src/main/java/cn/van/business/util/JDUtil.java
This commit is contained in:
@@ -1,22 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
package cn.van.business.util;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Leo
|
|
||||||
* @version 1.0
|
|
||||||
* @create 2025/4/4 20:45
|
|
||||||
* @description:
|
|
||||||
*/
|
|
||||||
public interface FlowStepHandler {
|
|
||||||
void handle(JDUtil util, String wxid, String input, JDUtil.UserInteractionState state);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user