mybatis 之resultType="HashMap" parameterType="list"
<!-- 查询商品仓库信息 -->
<select id="loadGoodsStock" resultType="HashMap" parameterType="list">
select g.goods_id,
g.stock_id,
s.STOCK_NO,
s.STOCK_NAME,
g.goods_seller
from
goods g , stock s
where g.STOCK_ID = s.STOCK_ID and
g.goods_id in
<foreach collection="list" item="listItem" index="index" open="("
separator="," close=")">
#{listItem}
</foreach>
</select>
public List<Map<String, Object>> loadGoodsStock(List<Long> goodsIds);
public ServiceMessage<List<Map<String, Object>>> queryGoodsStockInfo(List<Long> goodsIds) {
try {
if (goodsIds == null || goodsIds.size() < 1) {
return super.returnParamsError("查询仓库信息参数为空goodsIds");
}
List<Map<String, Object>> goodsList = goodsMapper.loadGoodsStock(goodsIds);
return super.returnCorrectResult(goodsList);
} catch (Throwable e) {
return super.returnException(e);
}
}
<resultMap id="simpleProductExtLucene" type="HashMap">
<result column="goods_no" property="goodsNo" />
<result column="pro_catalog_id" property="proCatalogId" />
<result column="pro_catalog_name" property="proCatalogName" />
<result column="PROMOTE_PHRASE" property="promotePhrase"
javaType="String" />
<result column="EC_PRICE" property="ecPrice" javaType="String" />
<result column="MARKET_PRICE" property="marketPrice" javaType="decimal" />
<result column="PRO_IMAGE_URL" property="proImageUrl" javaType="String" />
<result column="TAG_ICON_URL" property="tagIconUrl" javaType="String" />
<result column="DRUG_PRESCRIPTION_TYPE" property="drugPrescriptionType"
javaType="String" />
<result column="PRODUCT_LEAST_ORDER" property="productLeastOrder"
javaType="decimal" />
<result column="ORDER_LIMIT_AMOUNT" property="orderLimitAmount"
javaType="decimal" />
<result column="AVAILABLE_STOCK" property="availableStock"
javaType="decimal" />
<result column="PRODUCT_ID" property="productId" />
<result column="GOODS_ID" property="goodsId" />
<result column="GOODS_NAME" property="goodsName" />
<result column="SALE_AMOUNT" property="saleAmount" />
<result column="CLICK_AMOUNT" property="clickAmount" />
<result column="GOODS_NAME" property="productName" />
<result column="PRODUCT_CHN_NO" property="productChnNo" />
<result column="MOBILE_SPECIAL" property="mobileSpecial" />
<result column="DRUG_TREATMENT" property="drugTreatment"
javaType="String" />
<result column="product_keyword" property="productKeyword" />
<result column="product_brand_name" property="productBrandName" />
<result column="product_order" property="productOrder" />
<result column="FULL_INDEX" property="fullIndex"/>
</resultMap>
mybatis 之resultType="HashMap" parameterType="list"的更多相关文章
- mybatis 之 resultType="HashMap" parameterType="list"
public ServiceMessage<List<Map<String, Object>>> queryGoodsStockInfo(List<Long& ...
- mybatis 之 resultType="Map" parameterType="String"
<select id="getAllGoodsForSouJiaYi" resultType="Map" parameterType="Stri ...
- mybatis传入参数类型parameterType和输出结果类型resultType详解
前言 Mybatis的Mapper文件中的select.insert.update.delete元素中都有一个parameterType和resultType属性,parameterType属性用于对 ...
- MyBatis的传入参数parameterType类型
1. MyBatis的传入参数parameterType类型分两种 1. 1. 基本数据类型:int,string,long,Date; 1. 2. 复杂数据类型:类和Map 2. 如何获取参数中的值 ...
- MyBatis中传入参数parameterType类型详解
前言 Mybatis的Mapper文件中的select.insert.update.delete元素中有一个parameterType属性,用于对应的mapper接口方法接受的参数类型.本文主要给大家 ...
- mybatis传入参数类型parameterType详解
前言 Mybatis的Mapper文件中的select.insert.update.delete元素中都有一个parameterType属性,用于对应的mapper接口方法接受的参数类型. ( res ...
- MyBatis之传入参数parameterType
在MyBatis的select.insert.update.delete这些元素中都提到了parameterType这个属性.MyBatis现在可以使用的parameterType有基本数据类型和Ja ...
- MyBatis之传入参数——parameterType(转)
鸣谢:http://blog.csdn.net/liaoxiaohua1981/article/details/6862764 ------------------------------------ ...
- MyBatis有关resultType和resultMap差异
MyBatis有关resultType和resultMap差异 MyBatis中在查询进行select映射的时候,返回类型能够用resultType,也能够用resultMap.resultTyp ...
随机推荐
- so在genymotation中错误问题
genymotation的android模拟器运行起来非常快,但是有些项目安装到上面不是crash,log一般是so文件调用失败的信息,或则直接提示INSTALL_FAILED_CPU_ABI_INC ...
- e839. 使JTabbedPane中的卡片可滚动
By default, all the tabs in a tabbed pane are displayed. When the tabs are wider than the width of t ...
- (原)从mp4,flv文件中解析出h264和aac,送解码器解码失败
转载请注明出处:http://www.cnblogs.com/lihaiping/p/5285166.html 今天在做本地文件解码测试,发现从mp4,flv文件中读出来的帧数据,h264和aac帧直 ...
- ubuntu -- 不输入密码执行sudo
作为ubuntu等桌面系统,默认登录的帐号是没有root权限的,为了提升权限来执行任务,我们一般用到 "sudo+命令" 来执行,但是不难发现我们 一般都要输入密码.那么有没有什么 ...
- R 语言消除pdf图片的空白
pdf 函数中,有一个参数onefile , 默认值为TRUE, 表示每张图片占用pdf 中的一页 当遇到pdf的前几页为空白时,是因为画图的代码产生了几张空白的图片 如果要消除前面的空白,只需要设 ...
- IDEA VS 快捷键 大全
[参考]IntelliJ IDEA 常用 黄金 快捷键 总结 不断更新 一.VS常用快捷键 (01).快速插入foreach.try等循环:Tab + Tab; (02).回到光标前一位置: ...
- FXAA
无抗锯齿 SSAA 硬件抗锯齿,OpenGL自带,4x FXAA 从图中可以看出 FXAA抗锯齿,没有硬件MSAA抗锯齿效果好
- Windows 环境搭建Redis集群(win 64位)
转: http://blog.csdn.net/zsg88/article/details/73715947 参考:https://www.cnblogs.com/tommy-huang/p/6240 ...
- [转]java线程安全、jstack\线程dump、内存查看分析总结
http://jameswxx.iteye.com/blog/808546 java线程安全总结二 http://jameswxx.iteye.com/blog/1041173 jstack和线程du ...
- Java集合之LinkedList源码解析
LinkedList简介 LinkedList基于双向链表,即FIFO(先进先出)和FILO(先进后出)都是支持的,这样它可以作为堆栈,队列使用 继承AbstractSequentialList,该类 ...