美文网首页
商城系统查询商品

商城系统查询商品

作者: 尼尔君 | 来源:发表于2019-05-13 16:25 被阅读0次



    <resultMap id="blogResult" type="com.cryq.plus.entity.more.ProductVo">
        <id property="brandName" column="brand_name"/>
        <result property="spuTitle" column="spu_title"/>
        <result property="name" column="category_name"/>
        <result property="spuTitle" column="spu_title"/>
        <result property="categoryId" column="category_id"/>

        <result property="spuStatus" column="spu_status"/>
        <result property="spuActive" column="spu_active"/>

        <result property="spuInfo" column="spu_info"/>
        <collection property="imgSrc" ofType="com.cryq.plus.entity.ShopSpuImg">
            <id property="id" column="SpuImgId"/>
            <result property="mainImg" column="main_img"/>
            <result property="imgSrc" column="img_src"/>
            <result property="status" column="img_status"/>
        </collection>


        <collection property="lists" ofType="com.cryq.plus.entity.more.SkuAttrVo" column="id">
            <id property="id" column="attr_id"/>
            <result property="attrName" column="attr_name"/>
            <collection property="lists" ofType="com.cryq.plus.entity.more.SkuValVo" column="id" javaType="list">
               <id property="id" column="id"/>
                <result property="skuAttrValue" column="sku_attr_value"/>
                <result property="imgSrc" column="img_src"/>
                <result property="skuAttrId" column="skuAttrId"/>
            </collection>
        </collection>
    </resultMap>

    <select id="selectInfo" resultMap="blogResult" >
          SELECT
                b.brand_name AS brand_name,
                c.`name` AS category_name,
                c.id AS category_id,
                spu.spu_title AS spu_title,
                spu.spu_status AS spu_status,
                spu.spu_active AS spu_active,
                img.id AS SpuImgId,
                img.img_src AS img_src,
                img.status as img_status,
                img.main_img as main_img,
                info.spu_info AS spu_info,
                attr.id AS attr_id,
                attr.attr_name AS attr_name,
                val.id as id,
                val.sku_attr_value AS sku_attr_value,
                val.img_src AS img_src ,
                val.sku_attr_id AS skuAttrId
            FROM
                shop_brand b,
                shop_category c,
                shop_sku_attr attr,
                shop_sku_val2 val,
                shop_spu_img img,
                shop_spu_info info,
                shop_spu spu
            WHERE
                b.id = spu.brand_id
                AND c.id = spu.category_id
                AND spu.id = img.spu_id
                AND spu.store_id = img.store_id
                AND spu.id = info.spu_id
                AND spu.id = val.spu_id
                AND attr.id = val.sku_attr_id
                AND spu.store_id = #{storeId}
                AND spu.id = #{spuId}
                AND spu.spu_status = #{status}

            ORDER BY
                img.main_img DESC,val.is_main DESC,
                val.sort ASC

    </select>

相关文章

  • 商城系统查询商品

  • 爱慕商城后台#PRD#

    后台管理系统 一、商品管理 1、商品列表 如上图,为爱慕商城后台管理系统商品列表页。包含如下几个功能模块: 查询框...

  • Niushop单商户V4商品分类树状结构开发

    商城系统中的商品分类能帮助用户更快更精准的找到自己想要的商品,因此,商城系统中的商品分类代码有序,不仅能提升商城运...

  • 细说无限级分类和nestedsets的使用方法

    前言: 当我们聊到商城系统,有一个话题是绕不开的.一个商城系统必然是有很多商品分类,这些商品分类,不仅多,而且层级...

  • Mysql常用功能

    MYSQL常用及存储过程一、常用查询语句1)LIKE的灵活运用 2)分组查询 实例:查询骑手商城的商品中定价大于1...

  • Soa架构使用dubbo是一个服务层管理工具

    分析 由于商城是基于soa的架构,表现层和服务层是不同的工程。所以要实现商品列表查询需要两个系统之间进行通信。如何...

  • Sentinel热点参数验证

    一、热点 热点就是访问非常频繁的参数,例如商城系统中首页的数据;热点参数就比如是商城系统商品的id。那么 Sent...

  • 商品那些事儿

    商品对于电商系统来说是根本基础,它的应用场景很多,从前端商城售卖到后台订单出入库等,商品贯穿整个电商后台系统,商品...

  • 2.8任务报告

    商品信息查询修改界面功能设计 1.1 任务内容 在智慧社区商超管理系统中,后台管理人员查询系统已有商品信息,然后对...

  • 前后台商城系统

    前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务、帮助中心等模块。 后...

网友评论

      本文标题:商城系统查询商品

      本文链接:https://www.haomeiwen.com/subject/iblraqtx.html