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 ...
随机推荐
- svn解决不能clean的方法
http://blog.csdn.net/victory08/article/details/42100325 svn执行clean up后出现提示:svn cleanup failed–previo ...
- 关于Unity中蒙皮网格和布料的使用
所以物体的要绘制出来就必须要有网格组件+材质属性,如果还需要其他特效或丰富内容的话,还可以再加组件. 蒙皮网格和布料 1: 例如要模拟衣服,随风摆动,模拟布料需要用到蒙皮网格和布料;2: 蒙皮网格可以 ...
- 使用ssh-keygen和ssh-copy-id三步实现SSH无密码登录
ssh-keygen 产生公钥与私钥对. ssh-copy-id 将本机的公钥复制到远程机器的authorized_keys文件中,ssh-copy-id也能让你有到远程机器的home, ~./ss ...
- 文本框中的回车处理 js
<input id="txtOrderID" onkeypress="getKey(event)" /> <button onclick=&q ...
- c#基础操作
内网 IPAddress ipAddr = Dns.Resolve(Dns.GetHostName()).AddressList[];//获得当前IP地址 string ip = ipAddr.ToS ...
- C# 判断网站是不是discuz论坛
if (this.txturl.Text == "") { this.lblmess.Text = "请输入网址"; } else { GetHttp getH ...
- Redis 缓存 + Spring 的集成示例(转载)
1. 依赖包安装 pom.xml 加入: <dependency> <groupId>org.springframework.data</groupId> < ...
- hibernate DetachedCriteria 分页
# 具有一个直观的.可扩展的条件查询API是Hibernate的特色. # # 15.1. 创建一个Criteria 实例 # org.hibernate.Criteria接口表示特定持久类的一个查询 ...
- bind带autocomplete时,最好是从新的tr复制
(function($) { //自动关联ItemNo $.fn.extend({ productitemlist: function(options) { return this.each(func ...
- 谈谈Android中的SurfaceTexture
2015.7.2更新 由于很多人要代码,我把代码下载链接放在这里了.不过还是要说一下,surfaceTexture和OpenGL ES结合才能发挥出它最大的效果,我这种写法只是我自己的想法,还有很多种 ...