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">
           )
         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"的更多相关文章

  1. 问题-MyBatis不识别Integer值为0的数据

    问题-MyBatis不识别Integer值为0的数据 问题:使用MyBatis的过程中,发现一个值为0的数据,Mybatis所识别,最后定位才发现,是自己的写法有问题, <if test=&qu ...

  2. MyBatis有关resultType和resultMap差异

    MyBatis有关resultType和resultMap差异   MyBatis中在查询进行select映射的时候,返回类型能够用resultType,也能够用resultMap.resultTyp ...

  3. mybatis中resultType和resultMap的联系

    在使用mybatis进行数据库连接操作时对于SQL语句返回结果的处理通常有两种方式,一种就是resultType另一种就是resultMap,下面说下我对这两者的认识和理解 比如,我们平时使用的单表查 ...

  4. Mybatis的resultType

    使用mybatis去查询数据时,没有指定resultType,mybatis无法返回正常结果,当然在web中并没有出现报错,所以有点坑自己了,所以需要使用如下配置: <select id=&qu ...

  5. mybatis中使用Integer类型的参数<if>判断问题

    mybatis对传入参数进行判断时,会使用if标签, 一般是判断不为null和'', 如下: <if test="name != null and 那么 != ''"> ...

  6. MyBatis中resultType和resultMap的区别

    resultType和resultMap功能类似  ,都是返回对象信息  ,但是resultMap要更强大一些 ,可自定义.因为resultMap要配置一下,表和类的一一对应关系,所以说就算你的字段名 ...

  7. [转]MyBatis中resultType与resultMap区别

    MyBatis中关于resultType和resultMap的具体区别如下: MyBatis中在查询进行select映射的时候,返回类型可以用resultType,也可以用resultMap.resu ...

  8. Mybatis中resultType和resultMap

    一.概述MyBatis中在查询进行select映射的时候,返回类型可以用resultType,也可以用resultMap,resultType是直接表示返回类型的,而resultMap则是对外部Res ...

  9. MyBatis参数为Integer型并赋值为0时判断失误的问题解决

    mybatis.xml中有if判断条件判断参数不为空时,赋值为0的Integer参数被MyBatis判断为空,因此不执行<if test="param != null and para ...

随机推荐

  1. UPNP

    基本概念 UPnP 的应用范围非常大,以致足够可以实现许多现成的.新的及令人兴奋的方案,包括家庭自动化.打印.图片处理.音频 / 视频娱乐.厨房设备.汽车网络和公共集会场所的类似网络.它可以充分发挥 ...

  2. Data truncation: Out of range value for column 'Quality' at row 1

    Q: Data truncation: Out of range value for column 'Quality' at row 1 com.mysql.jdbc.MysqlDataTruncat ...

  3. pandas Series KeyError: -1

    前几天写分析方法,遇到的一个错误: 具体我已经在stackoverflow 里面得到了详细的解答,下面我把问题和解决办法总结一下,方便日后的回顾 问题: sql = "select {}, ...

  4. SAP MM01 创建物料主数据 [关注公众号后回复MM01获取更多资料]

    操作内容 物料主数据,适用于所有有物料编码物料相关信息的系统维护 业务流程 新项目设计冻结后—M公司 PD用-物料编码申请表D-BOM Material Number  Application部门内部 ...

  5. 【转】【Python】Python发送邮件(常见四种邮件内容)

    在写脚本时,放到后台运行,想知道执行情况,会通过邮件.SMS(短信).飞信.微信等方式通知管理员,用的最多的是邮件.在linux下,Shell脚本发送邮件告警是件很简单的事,有现成的邮件服务软件或者调 ...

  6. e777. 获得JList组件的所有项

    // Create a list String[] items = {"A", "B", "C", "D"}; JLis ...

  7. Web打印控件Lodop实现证件套打

    第一次接触Lodop大概是在两年前了,那时候研究Lodop主要是为了验证它能不能实现打印时在不修改内容的前提下调整样式,结果是ok的,如今又一次接触它,是因为工作中需要使用它了,于是再一次碰面 Lod ...

  8. R语言ggplot2-labs 函数

    labs 函数主要有以下三个用途: 1) 设置图片的标题(title), 子标题(subtitle), 引用(caption) 代码示例: ggplot(mtcars, aes(mpg, wt, co ...

  9. Mybatis中#和$区别(带脑图)

    零.引言 使用 #{name} 的时候,MyBatis会进行预编译,防止SQL注入的问题(官方话) 用一个通俗一点的例子来解释,比如有如下MyBatis的SQL语句 21.#{}和${}的区别.png ...

  10. Linux环境下Redis安装配置步骤[转]

    在LInux下安装Redis的步骤如下: 1.首先下载一个Redis安装包,官网下载地址为:https://redis.io/ 2.在Linux下解压redis: tar -zxvf redis-2. ...