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 ...
随机推荐
- 关于qt QWebKit/QWebview 使用心得
当前项目为c/s客户端,采用qt4.8.7,需要使用仪表盘.折线图.柱状图等,曾经使用过qwt和自定义的图形控件,但是都不尽如人意.最近发现ECharts控件不错.为此就要在qt端使用web的技术.为 ...
- SpannableString
http://blog.csdn.net/fengkuanghun/article/details/7904284 背景介绍 在开发应用过程中经常会遇到显示一些不同的字体风格的信息犹如默认的LockS ...
- SSH框架环境搭建问题:java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required
SSH框架启动tomcate时出错 严重: Exception sending context initialized event to listener instance of class org. ...
- (笔记)Mysql命令create:创建数据库
create命令用于创建数据库. create命令格式:create database <数据库名>; 注意:创建数据库之前要先连接Mysql服务器. 1) 建立一个名为xhkdb的数据库 ...
- C#跳转网页7种方法
1.Response.Redirect(http://www.baidu.com,false); 目标页面和原页面可以在2个服务器上,可输入网址或相对路径.后面的bool值为是否停止执行当前页. 跳转 ...
- [转]CentOS虚拟机如何设置共享文件夹,并在Windows下映射网络驱动器?
CentOS虚拟机如何设置共享文件夹,并在Windows下映射网络驱动器? 转自这里 一.为什么要这么做? 最近在做Linux下的软件开发,但又想使用Windows下的编程工具“Source Insi ...
- 一则Gedit死机引起的错误之解决
一次,虚拟机中CentOS不明原因死机了,终端打开不能操作,SecureCRT和从SecureCRT中运行的托关于本机Windows下的Xming下的gedit也死掉了,无奈只能强制关机.重新启动后其 ...
- NSIS 资料
官方 http://nsis.sourceforge.net/Main_Page NSIS官方插件全集 http://az.eliang.com/aq_2013041703.html NSIS 衿华客 ...
- ABBYY FineReader 14助力2017,正式进入新纪元
ABBYY FineReader 12自2014年推出以来,已经给万千用户的工作带来了便捷,蝉联优秀殊荣这么久,相信不少用户早在期待新版本的到来了吧.这不,ABBYY FineReader 14问世了 ...
- QT中C++与Html端通信例子
C++(服务端)和HTML(客户端)通过websocket通信,通过qwebchannel.js实现 C++ -> HTML,通过信号. HTML -> C++,直接调用函数. Main函 ...