| | |
| | | </select> |
| | | |
| | | <select id="listQueryByFlashSale" resultMap="BaseResultMap"> |
| | | SELECT |
| | | <include refid="Base_Column_List" /> |
| | | FROM yeshi_ec_quality_factory h |
| | | |
| | | RIGHT JOIN yeshi_ec_quality_flash_sale |
| | | s ON h.`sg_id` = s.`fs_qfgoods_id` |
| | | |
| | | LEFT JOIN yeshi_ec_taobao_goods tb |
| | | ON h.`sg_goods_id`= tb.`id` |
| | | SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_quality_flash_sale s |
| | | LEFT JOIN yeshi_ec_quality_factory h ON h.`sg_goods_id` = s.`fs_qfgoods_id` |
| | | LEFT JOIN yeshi_ec_taobao_goods tb ON h.`sg_goods_id`= tb.`id` |
| | | |
| | | WHERE <![CDATA[ tb.`couponTotalCount` > 0 AND tb.couponLeftCount<tb.couponTotalCount ]]> |
| | | |
| | |
| | | |
| | | <select id="countQueryByFlashSale" resultType="java.lang.Long"> |
| | | SELECT IFNULL(COUNT( h.`sg_id`),0) FROM yeshi_ec_quality_factory h |
| | | RIGHT JOIN yeshi_ec_quality_flash_sale s ON h.`sg_goods_id` = s.`fs_qfgoods_id` |
| | | |
| | | RIGHT JOIN yeshi_ec_quality_flash_sale s ON h.`sg_id` = |
| | | s.`fs_qfgoods_id` |
| | | |
| | | LEFT JOIN yeshi_ec_taobao_goods tb ON |
| | | h.`sg_goods_id`= tb.`id` |
| | | LEFT JOIN yeshi_ec_taobao_goods tb ON h.`sg_goods_id`= tb.`id` |
| | | |
| | | WHERE <![CDATA[ tb.`couponTotalCount` > 0 AND tb.couponLeftCount<tb.couponTotalCount]]> |
| | | </select> |
| | |
| | | |
| | | <select id="listFlashSaleRandGoods" resultMap="GoodsResultMap"> |
| | | SELECT h.*, tb.* FROM yeshi_ec_quality_factory h |
| | | RIGHT JOIN yeshi_ec_quality_flash_sale s ON h.`sg_id` = s.`fs_qfgoods_id` |
| | | RIGHT JOIN yeshi_ec_quality_flash_sale s ON h.`sg_goods_id` = s.`fs_qfgoods_id` |
| | | LEFT JOIN yeshi_ec_taobao_goods tb ON h.`sg_goods_id`= tb.`id` |
| | | |
| | | WHERE s.`fs_id` IS NOT NULL AND tb.`biz30day` <![CDATA[>=]]> 10000 |