Fixiaobai
2023-08-30 5d2932cadaee4be576c1b650b402c74d6296e6dd
laboratory-server/src/main/resources/mapper/ClassifyMapper.xml
@@ -3,20 +3,14 @@
<mapper namespace="com.yuanchu.limslaboratory.mapper.ClassifyMapper">
    <select id="selectOneByName" resultType="com.yuanchu.limslaboratory.pojo.Classify">
        SELECT id,
               father_name,
               son_name,
               state,
               create_time,
               update_time,
               version
        SELECT id
        FROM classify
        WHERE state = 1
          <if test="fatherName!=null and fatherName!=''">
              AND father_name = #{fatherName}
          </if>
          <if test="sonName!=null and sonName!=''">
              and son_name =#{sonName}
          </if>
        <if test="sonName!=null and sonName!=''">
            and son_name=#{sonName}
        </if>
    </select>
</mapper>