The constant condition determination parameter Mybatis

Creative Commons License Copyright: Attribution, allow others to create paper-based, and must distribute paper (based on the original license agreement with the same license Creative Commons )

Constants class

public class Constants {
    public static final int SKU_STOCK_TEMP_IN= 1; 
}

xml:

 <if test="inOutType == @com.x.b.util.Constants@SKU_STOCK_TEMP_IN">
                ss.keep_number = (ss.keep_number + #{keepNumber}),
            </if>

Such a value can be judged Constants.SKU_STOCK_TEMP_IN if the conditions in the

Guess you like

Origin blog.csdn.net/qq_35548458/article/details/93199955