标签:ice equals index substr new indexof eid tin als
public class EcPromoteRuleAdditionalNew extends BaseBO { private String[] promoteRuleIds; public String[] getPromoteRuleIds() { return promoteRuleIds; } public void setPromoteRuleIds(String[] promoteRuleIds) { this.promoteRuleIds = promoteRuleIds; } }
if (!allUsedPromoteRuleIds.equals("")) { allUsedPromoteRuleIds = allUsedPromoteRuleIds.substring(0, allUsedPromoteRuleIds.lastIndexOf(",")); } // 根据促销规则查询是否不支持货到付款 if (allUsedPromoteRuleIds != null && !allUsedPromoteRuleIds.equals("")) { EcPromoteRuleAdditionalNew promoteRuleAdditional = new EcPromoteRuleAdditionalNew(); promoteRuleAdditional.setPromoteRuleIds(allUsedPromoteRuleIds .split(",")); Integer count = myecService .getAdditionalKDFHCount(promoteRuleAdditional);
<!-- 根据促销规则查询附加优惠是否支持货到付款 --> <select id="getAdditionalKDFHCount" resultType="Integer" parameterType="EcPromoteRuleAdditionalNew"> select count(1) from ec_promote_rule_new pr, ec_promote_rule_ADDITIONAL_NEW pra where pr.promote_rule_id = pra.promote_rule_id and pra.additional_type = ‘FKFS‘ and pra.additional_value = ‘KDFH‘ <if test="promoteRuleIds != null"> and pra.PROMOTE_RULE_ID in <foreach collection="promoteRuleIds" index="index" item="item" open="(" separator="," close=")"> #{item} </foreach> </if> </select>
mybatis 之 resultType="Integer"
标签:ice equals index substr new indexof eid tin als
原文地址:http://www.cnblogs.com/wangchuanfu/p/7278865.html