mybatis 之 resultType="Integer"
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"的更多相关文章
- 问题-MyBatis不识别Integer值为0的数据
问题-MyBatis不识别Integer值为0的数据 问题:使用MyBatis的过程中,发现一个值为0的数据,Mybatis所识别,最后定位才发现,是自己的写法有问题, <if test=&qu ...
- MyBatis有关resultType和resultMap差异
MyBatis有关resultType和resultMap差异 MyBatis中在查询进行select映射的时候,返回类型能够用resultType,也能够用resultMap.resultTyp ...
- mybatis中resultType和resultMap的联系
在使用mybatis进行数据库连接操作时对于SQL语句返回结果的处理通常有两种方式,一种就是resultType另一种就是resultMap,下面说下我对这两者的认识和理解 比如,我们平时使用的单表查 ...
- Mybatis的resultType
使用mybatis去查询数据时,没有指定resultType,mybatis无法返回正常结果,当然在web中并没有出现报错,所以有点坑自己了,所以需要使用如下配置: <select id=&qu ...
- mybatis中使用Integer类型的参数<if>判断问题
mybatis对传入参数进行判断时,会使用if标签, 一般是判断不为null和'', 如下: <if test="name != null and 那么 != ''"> ...
- MyBatis中resultType和resultMap的区别
resultType和resultMap功能类似 ,都是返回对象信息 ,但是resultMap要更强大一些 ,可自定义.因为resultMap要配置一下,表和类的一一对应关系,所以说就算你的字段名 ...
- [转]MyBatis中resultType与resultMap区别
MyBatis中关于resultType和resultMap的具体区别如下: MyBatis中在查询进行select映射的时候,返回类型可以用resultType,也可以用resultMap.resu ...
- Mybatis中resultType和resultMap
一.概述MyBatis中在查询进行select映射的时候,返回类型可以用resultType,也可以用resultMap,resultType是直接表示返回类型的,而resultMap则是对外部Res ...
- MyBatis参数为Integer型并赋值为0时判断失误的问题解决
mybatis.xml中有if判断条件判断参数不为空时,赋值为0的Integer参数被MyBatis判断为空,因此不执行<if test="param != null and para ...
随机推荐
- soapui-groovy脚本中文乱码及符号乱码、响应乱码解决方案
groovy脚本中文乱码及符号乱码,解决方案: 响应乱码解决方案:
- caffe中的错误与解决问题:
1.在使用draw_net.py的时候,提示如下错误: AttributeError: 'google.protobuf.pyext._message.RepeatedScalarConta' obj ...
- 将项目安装到Maven本地资源库
在Maven中,可以使用“mvn install”打包项目,并自动部署到本地资源库,让其他开发人员使用它. mvn install 注意,当“install”在执行阶段,上述所有阶段 “validat ...
- unity--------------------------WheelCollider和小车实验的总结
WheelCollider总结 写了前面两篇文章,我想总结一下WheelCollider! 让我们能够更清晰的学会物理车的开发! 1.车的层次结构 一般这样分,车身,车身的包围盒,四个轮子和四个轮子的 ...
- James Whittaker的软件測试戒律(二)
摘录自<探索式软件測试>(注:作者模仿了圣经十诫的语气和内容编写了软件測试戒律) 1.汝应用大量输入重复锤炼汝之应用程序 2.汝应贪图汝之邻居的应用程序 3.汝应亲自寻找睿智的预言家 4. ...
- windows server 安装phpVirtualBox web服务
这是我在Windows server 2012 下的安装过程 (1) 安装virtualbox (2) 安装IIS和PHP, 参考: https://msdn.microsoft.com/zh-cn/ ...
- Vue中计算属性与class,style绑定
var vm=new Vue({ el:'#app', data:{ a:2, }, computed:{ //这里的b是计算属性:默认getter b:{ get:function(){ retur ...
- IE8下submit表单没反应
当在IE8浏览器下,例如以下代码<input type="submit" value="sub" />点击没反应.通常是因为表单里面嵌套了表单造成的 ...
- svn管理码云项目
1.设置SVN管理项目 进入项目->管理 2.获取SVN地址 3.SVN添加项目.单击右键 -> 检出->版本库Url(这里填写svn地址)
- ML基础 : 训练集,验证集,测试集关系及划分 Relation and Devision among training set, validation set and testing set
首先三个概念存在于 有监督学习的范畴 Training set: A set of examples used for learning, which is to fit the parameters ...