1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.caimei365.commodity.mapper.ProductMapper">
- <select id="getBigTypeList" resultType="com.caimei365.commodity.model.vo.BigTypeVo">
- select
- bigTypeID as bigTypeId, typeSort, `name`, bigTypeCode, wwwValidFlag, crmValidFlag, wwwIcon, crmIcon, addTime, sortIndex
- from bigtype
- where
- typeSort = #{typeSort}
- <if test="source == 'www'.toString()">
- and wwwValidFlag = '1'
- </if>
- <if test="source == 'crm'.toString()">
- and crmValidFlag = '1'
- </if>
- order by ifnull(sortIndex,10000) , addTime DESC
- </select>
- <select id="getSmallTypeList" resultType="com.caimei365.commodity.model.vo.SmallTypeVo">
- select
- smallTypeID as smallTypeId, bigTypeID as bigTypeId, `name`, smallTypeCode, wwwValidFlag, crmValidFlag, wwwIcon, crmIcon, addTime, sortIndex
- from smalltype
- where bigTypeID = #{bigTypeId}
- <if test="source == 'www'.toString()">
- and wwwValidFlag = '1'
- </if>
- <if test="source == 'crm'.toString()">
- and crmValidFlag = '1'
- </if>
- order by ifnull(sortIndex,10000), addTime DESC
- </select>
- <select id="getTinyTypeList" resultType="com.caimei365.commodity.model.vo.TinyTypeVo">
- select
- tinyTypeID as tinyTypeId, smallTypeID as smallTypeId, `name`, tinyTypeCode, wwwValidFlag, crmValidFlag, wwwIcon, crmIcon, addTime, sortIndex
- from tinytype
- where smallTypeID = #{smallTypeId}
- <if test="source == 'www'.toString()">
- and wwwValidFlag = '1'
- </if>
- <if test="source == 'crm'.toString()">
- and crmValidFlag = '1'
- </if>
- order by ifnull(sortIndex,10000), addTime DESC
- </select>
- <select id="getPageTypeSort" resultType="java.lang.Integer">
- select typeSort from cm_page
- where id = #{pageId} and enabledStatus = '1'
- </select>
- <select id="getHotSearchByPageId" resultType="com.caimei365.commodity.model.vo.HotSearchVo">
- select
- id, pageId, name, isHot, link, linkParam, linkType, pcStatus, sort, appletsStatus, creationTime,
- from
- cm_page_hot_search
- where
- pageId = #{pageId}
- <if test="source == 1">
- and pcStatus = 1
- </if>
- <if test="source == 2">
- and appletsStatus = 1
- </if>
- order by sort desc, creationTime desc
- </select>
- <select id="getFloorByPageId" resultType="com.caimei365.commodity.model.vo.PageFloorVo">
- select id, title ,description as detail
- from cm_page_centre
- where pageId = #{pageId}
- <if test="source == 1">
- and enabledStatus = 1
- </if>
- <if test="source == 2">
- and crmEnabledStatus = 1
- </if>
- order by -sort desc, createDate desc
- </select>
- <select id="getFloorContentById" resultType="com.caimei365.commodity.model.vo.FloorContentVo">
- select
- id, floorId, centreId, templateType, pcAdsImage1, pcAdsImage2, pcAdsImage3,
- appletsAdsImage1, appletsAdsImage2, appletsAdsImage3, adsLink1, adsLink2, adsLink3
- from new_page_floor_content where centreId = #{id}
- </select>
- <select id="getFloorImageById" resultType="com.caimei365.commodity.model.vo.FloorImageVo">
- select
- id, floorId, centreId, productId, name, link, image, label, pcStatus, appletsStatus, sort, createDate
- from new_page_floor_image
- where centreId = #{id}
- <if test="source == 1">
- and pcStatus = 1
- </if>
- <if test="source == 2">
- and appletsStatus = 1
- </if>
- order by sort desc, createDate desc
- </select>
- </mapper>
|