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 ...
随机推荐
- 在C++中调用DLL中的函数(2)
本文转自:http://blog.sina.com.cn/s/blog_53004b4901009h3b.html 应用程序使用DLL可以采用两种方式: 一种是隐式链接,另一种是显式链接.在使用DLL ...
- 关于Struts2开发过程中遇到的问题和解决方案
1.表的名字不要取关键字一样,不要取User这种的 2.java判断字符串相等用.equals,不能用== 3.<s:textfield name="caiuser.uphone&qu ...
- c递归程序
递归 long recursin(int); void main() { int n; long result; printf("input a integer number: \n&quo ...
- vb.net与c#相互转换工具
vb.net与c#相互转换工具: http://www.developerfusion.co.uk/utilities/convertvbtocsharp.aspx http://www.dotne ...
- smarty模板开发基础总结
前提:1. 部署smarty模板目录:2. 编写Smarty类的子类,定制好template_dir.compile_dir.config_dir.cache_dir.left_delimiter.r ...
- 使用Maven创建Web应用程序项目
用到的技术/工具: Maven 3.3.3 Eclipse 4.3 JDK 8 Spring 4.1.1.RELEASED Tomcat 7 Logback 1.0.13 1. 从Maven模板创建W ...
- e615. Finding the Next Focusable Component
public Component findNextFocus() { // Find focus owner Component c = KeyboardFocusManager.getCurrent ...
- MySql 存储过程总结
MySql 存储过程 -- ---------------------------- -- Procedure structure for `proc_adder` -- -------------- ...
- powerDesigner生成Html及Word
转载地址:https://blog.csdn.net/zdp072/article/details/51900794 1:点击Reports 2:点击New Reports 3:定义名字,选择简体中文 ...
- php + ajax 避免重复提交