Fixiaobai
2023-08-29 093f3d39a5c58fe88f7880899ff00fb6b92c35b8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yuanchu.limslaboratory.mapper.ClassifyMapper">
 
    <select id="selectOneByName" resultType="com.yuanchu.limslaboratory.pojo.Classify">
        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>
    </select>
</mapper>