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);
        }
    }
    public List<Map<String, Object>> loadGoodsStock(List<Long> goodsIds);
 <!-- 查询商品仓库信息 -->
    <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>
<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"的更多相关文章

  1. mybatis 之resultType="HashMap" parameterType="list"

    <!-- 查询商品仓库信息 --> <select id="loadGoodsStock" resultType="HashMap" para ...

  2. mybatis 之 resultType="Map" parameterType="String"

    <select id="getAllGoodsForSouJiaYi" resultType="Map" parameterType="Stri ...

  3. mybatis传入参数类型parameterType和输出结果类型resultType详解

    前言 Mybatis的Mapper文件中的select.insert.update.delete元素中都有一个parameterType和resultType属性,parameterType属性用于对 ...

  4. MyBatis的传入参数parameterType类型

    1. MyBatis的传入参数parameterType类型分两种 1. 1. 基本数据类型:int,string,long,Date; 1. 2. 复杂数据类型:类和Map 2. 如何获取参数中的值 ...

  5. MyBatis中传入参数parameterType类型详解

    前言 Mybatis的Mapper文件中的select.insert.update.delete元素中有一个parameterType属性,用于对应的mapper接口方法接受的参数类型.本文主要给大家 ...

  6. mybatis传入参数类型parameterType详解

    前言 Mybatis的Mapper文件中的select.insert.update.delete元素中都有一个parameterType属性,用于对应的mapper接口方法接受的参数类型. ( res ...

  7. MyBatis之传入参数parameterType

    在MyBatis的select.insert.update.delete这些元素中都提到了parameterType这个属性.MyBatis现在可以使用的parameterType有基本数据类型和Ja ...

  8. MyBatis之传入参数——parameterType(转)

    鸣谢:http://blog.csdn.net/liaoxiaohua1981/article/details/6862764 ------------------------------------ ...

  9. MyBatis有关resultType和resultMap差异

    MyBatis有关resultType和resultMap差异   MyBatis中在查询进行select映射的时候,返回类型能够用resultType,也能够用resultMap.resultTyp ...

随机推荐

  1. 让QtCreator在调试时显示字符串 Qt调试助手 QtDebuggingHelper qtc-debugging-helper

    When starting gdb with application message “Debugging Helper Missing” is displayed [Solved] http://q ...

  2. 解决DoubanFM第三方客户端UI线程与工作线程交互问题

    最新文章:Virson's Blog 首先要感谢yk000123的慷慨开源,开源地址见:http://doubanfm.codeplex.com/ 最近正好在学习WPF,然后在Codeplex上找到了 ...

  3. git patch 使用

    使用git的时候,需要删除几个id,会对到之前的代码,但又想保留现在的代码,以便后面从新合并,所以就将现在的代码打包成patch,留到下次合并. 参考链接 http://www.jianshu.com ...

  4. linux下locale中的各环境变量的含义

    本文来自:http://blog.sina.com.cn/s/blog_406127500101dk26.html Locale是软件在运行时的语言环境, 它包括语言(Language), 地域 (T ...

  5. SpringMVC系列(六)处理模型数据

    Spring MVC 提供了以下几种途径输出模型数据:  ModelAndView: 处理方法返回值类型为 ModelAndView时, 方法体即可通过该对象添加模型数据  Map 及 Model: ...

  6. e768. 创建单选按钮

    // Create an action for each radio button Action action1 = new AbstractAction("RadioButton Labe ...

  7. (实用)将wordpad添加到Windows PowerShell中

    PowerShell能够直接打开notepad,但是无法调用wordpad,因为后者的可执行文件并不在系统默认的环境变量$env:Path中,只要将wordpad所在的路径添加到$env:Path,就 ...

  8. (弃) Keystone CLI_可选命令详解

    本文详细介绍keystone客户端命令行界面(CLI)keystone的可选子命令.关于keystone客户端命令行工具keystone命令的子命令和选项列表,请参考前文<解读keystone命 ...

  9. Unreal发展史

    Unreal发展史 引子 四年前的一个深夜,或者说是一个早晨,Unreal的传奇开始了.它发生在马里兰州一个不起眼的市镇Rockvill,在一套公寓大楼里回响起一支墨西哥流浪乐队的曲子,那里住着Epi ...

  10. IntelliJ IDEA 的 .idea 目录加入.gitignore无效的解决方法

    [转载] 无效的原因是:对应的目录或者文件已经被git跟踪,此时再加入.gitignore后就无效了, 解决办法: 先执行 [文件夹]  git rm -r --cached .idea [文件]   ...