Compare commits
2 Commits
4e1e4c77ec
...
82c54f409c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82c54f409c | ||
|
|
79775dde63 |
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
11
src/main/java/cn/van/business/util/FlowStepHandler.java
Normal file
11
src/main/java/cn/van/business/util/FlowStepHandler.java
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -61,5 +61,5 @@ rocketmq:
|
|||||||
consume-thread-max: 64 # 消费线程池最大线程数
|
consume-thread-max: 64 # 消费线程池最大线程数
|
||||||
consume-message-batch-max-size: 64 # 批量消费最大消息数
|
consume-message-batch-max-size: 64 # 批量消费最大消息数
|
||||||
isRunning:
|
isRunning:
|
||||||
wx: false
|
wx: true
|
||||||
jd: false
|
jd: true
|
||||||
|
|||||||
Reference in New Issue
Block a user