<!-- 根据货品编号查找货品图片地址,货品ID,商品ID,货品名称 -->
    <select id="getGoodsInfoByGoodsNo" parameterType="list" resultMap="goodsResultImg">
    select g.product_id,g.goods_id,g.goods_name,m.pro_image_url,g.goods_no,g.market_price
    from goods g
    inner join product t
    on t.product_id = g.product_id
    and g.is_delete = 'N'
    inner join product_img m
    on m.product_id = t.product_id
    and m.image_type = 'list'

    where g.goods_no in
    <foreach collection="list" item="listItem" index="index" open="("
            separator="," close=")">
            #{listItem,jdbcType=VARCHAR}
    </foreach>
    List<String> goodsNos = new ArrayList<String>();
                        for (int i = 0; i < templateGoodslist.size(); i++) {
                            goodsNos.add(templateGoodslist.get(i).getGoodsNo());
                        }
                        List<Goods> goodsImgAndPriceList =new ArrayList<Goods>();
                        if(!goodsNos.isEmpty()){
                            goodsImgAndPriceList = this.iGoodsMapper.getGoodsInfoByGoodsNo(goodsNos);
                        }

mybatis 之 parameterType="list"的更多相关文章

  1. mybatis中parameterType可以写的别名

    mybatis中parameterType可以写的别名 https://blog.csdn.net/sdzhangshulong/article/details/51749807 _byte byte ...

  2. mybatis的parameterType使用map实现真正的sql随意写

    在dao层给map赋值 纠正一下应该把dd作为传入而不是sbiId; sqlMap中的parameterType="java.util.Map", 就 OK package com ...

  3. 【JAVA - SSM】之MyBatis的ParameterType的使用

    在MyBatis的Mapper.xml文件中,参数的表示方法有两种:一种是使用 "#{XXX}" 的方式表示的,另一种是使用 "${XXX}" 的方式表示的.今 ...

  4. MyBatis mapper parameterType

    1.   传入简单类型 JAVA代码: public User get(Long id) { return (User) getSqlSession().selectOne("com.liu ...

  5. Mybatis中parameterType、resultMap、statementType等等配置详解(标签中基本配置详解)

    一.(转自:https://blog.csdn.net/majinggogogo/article/details/72123185) 映射文件是以<mapper>作为根节点,在根节点中支持 ...

  6. mybatis之parameterType传递多个参数

    当在查询的时候需要传入多个参数的时候该怎么办呢: 1,封装成一个Model对象,底层HashMap还是一个 User user=new User(); user.setUserName("z ...

  7. MyBatis的parameterType传入参数类型

    在mybatis映射接口的配置中,有select,insert,update,delete等元素都提到了parameterType的用法,parameterType为输入参数,在配置的时候,配置相应的 ...

  8. 【JavaEE】之MyBatis的ParameterType的使用

    在MyBatis的Mapper.xml文件中,参数的表示方法有两种:一种是使用 “#{XXX}” 的方式表示的,另一种是使用 “${XXX}” 的方式表示的.今天来介绍以下这两种方式的不同之处. 1. ...

  9. Mybatis的parameterType传入多个参数

    如果查询的条件有多个的时候,mybatis有三种传入方式: 1.通过注解传入 例如: public interface Mapper(){ public User login(@Param(" ...

  10. mybatis 之 parameterType="String" resultType="java.util.HashMap">

    public ServiceMessage<Map<String, String>> getGoodsStockNo( List<Map<String, Strin ...

随机推荐

  1. Pandas 的轴向连接 concat

    在pandas里面,另一种数据何必运算也被称为连接(concatenation).绑定(binding)或堆叠(stacking). Numpy的轴向连接, concatenation Numpy有一 ...

  2. python epoll

    需要用python实现中断的功能,所以用epoll监听gpio文件的变化.写个demo测试一下. 参考: http://www.cnblogs.com/coser/archive/2012/01/06 ...

  3. 第三百四十六节,Python分布式爬虫打造搜索引擎Scrapy精讲—Requests请求和Response响应介绍

    第三百四十六节,Python分布式爬虫打造搜索引擎Scrapy精讲—Requests请求和Response响应介绍 Requests请求 Requests请求就是我们在爬虫文件写的Requests() ...

  4. EF5+MVC4系列(8) ActionResult的返回值

    我们在MVC的代码中,经常会看到这样的一个 代码 可能有人会有疑问,既然我定义的是ActionResult,为什么返回值会是View方法呢? 其实这个View方法的返回值的类型是ActionResul ...

  5. Linux 查看操作系统版本

    在下载软件的时候,需要知道操作系统对应的版本,通过 cat /etc/issue 可以查看对应信息 运行的结果如下: CentOS release 6.7 (Final) Kernel \r on a ...

  6. com.alibaba.com.caucho.hessian.io.SerializerFactory getDeserializer

    2016-1-27 14:40:25 com.alibaba.com.caucho.hessian.io.SerializerFactory getDeserializer 警告: Hessian/B ...

  7. mongoose实现批量删除和多id查询的api/方法

    删除一条数据:传入id Model.remove({ _id: 传入的id }); 删除多条数据,传入id数组,使用$in方法 Model.remove({ _id: { $in: ['aID', ' ...

  8. koa-route模块

    const Koa = require('koa'); const route = require('koa-route'); const app = new Koa(); const about = ...

  9. libaio.so.1: undefined reference to `__stack_chk_fail@GLIBC_2.4'

    没有别的原因: 找正确的  libaio.so.1 包就成. 我这儿有,需要的可以下载奥!

  10. windows 下查看端口占用情况

    windows下面查看端口占用情况: netstat -ano|findstr "8888" TCP 127.0.0.1:8888 0.0.0.0:0 LISTENING 6876 ...