Some points to reduce code complexity

Reasonable use of the following schemes can reduce the code complexity of the system and follow the open-close principle of program design:
build
<bean id="channelExInfoBuilderProxy" class="com.test.biz.shared.channelextinfo.ChannelExInfoBuilderProxyImpl"> <bean id="channelExInfoBuilderProxy"
class="com.test.biz.shared.channelextinfo.ChannelExInfoBuilderProxyImpl">
< property name="channelExtInfoBuilders">
<list>
<ref bean="payChannelBaseInfoBuilder" />
<ref bean="foreignChannelLowAmountInfoBuilder" />
<ref bean="instAliasInfoBuilder" />
<ref bean="discountInfoBuilder" />
<ref bean= "limitCouponInfoBuilder" />
<ref bean="iccForexRateBuilder" />
<ref bean="foreignChannelChargeInfoBuider" />
<ref bean=" iccForexInfoBuilder" />
<ref bean="iccButtonStyleInfoBuilder" />
<ref bean="foreignExpressButtonStyleInfoBuilder" />
</list>
</property>
</bean>

Configured processor
RuleConfigProcessor processor = ruleConfigProcessorFactory
            .getByType(RuleConfigProcessor.REFRESH_ROLLBACK);


based on META construction, it is essentially

the definition of the configuration context Context
TradeContext context
simplifies method parameters Use

less constructor
ExpressionXXX parser = new ExpressionXXX(ruleExp);
        ExpressionAst ast = parser.parse(); Change
to
ExpressionXXX parser = new ExpressionXXX();
        ExpressionAst ast = parser.parse(ruleExp)


; Must smoke. To simplify complex problems , for example, take the last day of a certain year and a certain month.






Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326607925&siteId=291194637