kongzy
2023-11-01 dd8795a2675e32b25abe98f644f80d5f72fadb90
src/main/java/com/nanometer/smartlab/dao/SysReagentDao.xml
@@ -179,6 +179,35 @@
  </select>
  <select id="reagentSimpleInfoList" resultMap="SysReagent">
    select sr.id,sr.name,sr.cas,sr.product_sn,sr.create_time,sr.update_time,bm.meta_value as reagent_type,bm2.meta_value as reagent_character from sys_reagent sr
    left join base_meta as bm on bm.id=sr.reagent_type
    left join base_meta as bm2 on bm2.id=sr.reagent_character
    <where>
        and sr.valid_flag = 1 and sr.type=1
      <if test="cas != null and cas != ''">
        and sr.cas like concat("%", #{cas} ,"%")
      </if>
      <if test="name != null and name != ''">
        and sr.name like concat("%", #{name} ,"%")
      </if>
    </where>
    order by sr.create_time desc
    limit #{first},#{pageSize}
  </select>
  <select id="reagentSimpleInfoCount" resultType="int">
    select count(1) from sys_reagent sr
    <where>
      and sr.valid_flag = 1 and sr.type=1
      <if test="cas != null and cas != ''">
        and sr.cas like concat("%", #{cas} ,"%")
      </if>
      <if test="name != null and name != ''">
        and sr.name like concat("%", #{name} ,"%")
      </if>
    </where>
  </select>
  <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,