码迷,mamicode.com
首页 > 其他好文 > 详细

mybatis 之 resultType="Integer"

时间:2017-08-03 12:33:27      阅读:131      评论:0      收藏:0      [点我收藏+]

标签: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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!