| | |
| | | FROM |
| | | ( |
| | | SELECT |
| | | sr.*, ss.meta_value AS product_home_name, |
| | | sr.*, |
| | | ss.meta_value AS product_home_name, |
| | | ss.order_index, |
| | | bm.meta_value AS control_products_name, |
| | | supplier. NAME AS supplierName, |
| | | f.id favor, |
| | |
| | | </if> |
| | | UNION ALL |
| | | SELECT |
| | | sr.*, ss.meta_value AS product_home_name, |
| | | sr.*, |
| | | ss.meta_value AS product_home_name, |
| | | ss.order_index, |
| | | bm.meta_value AS control_products_name, |
| | | supplier.NAME AS supplierName, |
| | | f.id favor, |
| | |
| | | limit #{MaxSize} |
| | | </if> |
| | | ) as reagent |
| | | ORDER BY reagent.favortime DESC,length(reagent.name),price asc |
| | | ORDER BY reagent.favortime DESC,length(reagent.name),reagent.order_index,price asc |
| | | <if test="first != null and pageSize != null"> |
| | | limit #{first}, #{pageSize} |
| | | </if> |