Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为 Java 用户提供 DSL 方式构建消息。 #39

Open
IceCream-QAQ opened this issue Sep 16, 2021 · 0 comments
Open

为 Java 用户提供 DSL 方式构建消息。 #39

IceCream-QAQ opened this issue Sep 16, 2021 · 0 comments
Labels
大饼 相对于饼而言,它获得实现的时间要稍晚。 需求 一个新的功能建议

Comments

@IceCream-QAQ
Copy link
Member

举例演示。

        buildMessage(() -> {
            textLine("%s,您好。", member.getNameCard());
            if (memberGirlsNow == 0){
                text("您当前还没有老婆!");
                return;
            }

            for (String girl : girls) {
                textLine("-------------");
                textLine("老婆:%s。",girl);
                imageByFile();
            }

            if (memberGirlsNow == memberGirlsMax){
                textLine("-------------");
                text("您的老婆已达上限!");
            }
        });

相比于 LineQ 方式,DSL 方式在承载业务上,要轻松的多。
LineQ 主要用于非承载业务的复杂消息构建。
DSL 主要用于承载业务的复杂消息构建。

@IceCream-QAQ IceCream-QAQ added 需求 一个新的功能建议 大饼 相对于饼而言,它获得实现的时间要稍晚。 labels Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
大饼 相对于饼而言,它获得实现的时间要稍晚。 需求 一个新的功能建议
Projects
None yet
Development

No branches or pull requests

1 participant