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. JAVA内部线程1

    在做一个RuntimeException的异常验证的时候,发现即便是JVM的main线程遇到了此类异常,JVM也不一定进行退出,查阅了相关资料:                线   程        ...

  2. How Vmware snapshots works

    VMware中的快照是对VMDK在某个时间点的“拷贝”,这个“拷贝”并不是对VMDK文件的复制,而是保持磁盘文件和系统内存在该时间点的状态,以便在出现故障后虚拟机能够恢复到该时间点.如果对某个虚拟机创 ...

  3. Self20171218_Assert断言使用

     一.Assert用法: assertion(断言)在软件开发中是一种常用的调试方式,很多开发语言中都支持这种机制.在实现中,assertion就是在程序中的一条语句,它对一个boolean表达式进行 ...

  4. Spring面试,IoC和AOP的理解

    spring 的优点?1.降低了组件之间的耦合性 ,实现了软件各层之间的解耦 2.可以使用容易提供的众多服务,如事务管理,消息服务等 3.容器提供单例模式支持 4.容器提供了AOP技术,利用它很容易实 ...

  5. (实用)Eclipse中使用命令行(运行外部程序)

    备忘 http://www.oschina.net/question/28_46291 另外,在eclipse的console菜单中可以选择“new console view”(新控制台视图),这样就 ...

  6. ViewBag和ViewDate以及TempDate的区别

    简单的说,就是   ViewBag 和  ViewData 是数据共享的(他们都是共享 ViewData 的数据),ViewBag 实际就是对 ViewData的一个操作的封装.  区别 : View ...

  7. FunGuild 数据库简介

    FUNGulid = Fungi + Functional + Guild , 是一个真菌的功能注释的数据库,目前数据库中涵盖了超过12000个真菌的功能注释信息: 网址如下: http://www. ...

  8. C# 把string字符导出到txt文档方法

    public static string writtxt(string html, string file) { FileStream fileStream = new FileStream(Envi ...

  9. php 一维数组去重

    $input = array("a" => "green", "red", "b" => "gre ...

  10. cocos2d - CCSprite各种动画

    转自 ITeye技术网站 // 触摸屏 -(void) ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { for( UITouc ...