| | |
| | | bm.meta_value AS control_products_name, |
| | | supplier. NAME AS supplierName, |
| | | f.id favor, |
| | | f.create_time favortime |
| | | f.create_time favortime, |
| | | supplier.valid_flag as supplierFlag |
| | | FROM |
| | | sys_reagent AS sr |
| | | LEFT JOIN base_meta AS ss ON sr.product_home = ss.id |
| | |
| | | and sr.product_sn like concat("%", #{productSn} ,"%") |
| | | </if> |
| | | UNION ALL |
| | | SELECT |
| | | (SELECT |
| | | 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, |
| | | f.create_time favortime |
| | | f.create_time favortime, |
| | | supplier.valid_flag as supplierFlag |
| | | FROM |
| | | sys_reagent AS sr |
| | | LEFT JOIN base_meta AS ss ON sr.product_home = ss.id |
| | |
| | | <if test="MaxSize != null"> |
| | | limit #{MaxSize} |
| | | </if> |
| | | ) |
| | | ) as reagent |
| | | ORDER BY reagent.favortime DESC,length(reagent.name),reagent.order_index,price asc |
| | | <if test="first != null and pageSize != null"> |
| | |
| | | |
| | | |
| | | <select id="favorList" parameterType="java.util.Map" resultMap="SysReagent"> |
| | | select sr.*, ss.meta_value as product_home_name, bm.meta_value as control_products_name,supplier.name as supplierName,f.id favor,f.create_time favortime |
| | | select sr.*, ss.meta_value as product_home_name, |
| | | bm.meta_value as control_products_name, |
| | | supplier.name as supplierName, |
| | | f.id favor, |
| | | f.create_time favortime, |
| | | supplier.valid_flag as supplierFlag |
| | | from sys_reagent as sr |
| | | left join base_meta as ss on sr.product_home = ss.id |
| | | left join base_meta bm on bm.id = sr.control_products |
| | |
| | | c.meta_value formatName, |
| | | d.meta_value product_home_name, |
| | | e.meta_value control_products_name, |
| | | s.name AS supplierName |
| | | s.name AS supplierName, |
| | | s.valid_flag as supplierFlag |
| | | from sys_reagent a |
| | | left join base_meta b on b.id=a.reagent_unit |
| | | left join base_meta c on c.id=a.reagent_format |