liusheng
2025-11-07 c27e4ce95a0489907ba3848851f14ac7cca1caca
smartor/src/main/resources/mapper/smartor/PatBabyGrowthMapper.xml
@@ -23,12 +23,14 @@
        <result property="updateTime" column="update_time"/>
        <result property="createTime" column="create_time"/>
        <result property="sex" column="sex"/>
        <result property="generatedTime" column="generated_time"/>
    </resultMap>
    <sql id="selectPatBabyGrowthVo">
        select id,
               pat_id,
               height,
               generated_time,
               sex,
               head_cir,
               weight,
@@ -57,6 +59,9 @@
            </if>
            <if test="sex != null ">
                and sex = #{sex}
            </if>
            <if test="generatedTime != null ">
                and generated_time = #{generatedTime}
            </if>
            <if test="height != null  and height != ''">
                and height = #{height}
@@ -146,6 +151,9 @@
            </if>
            <if test="sex != null">sex,
            </if>
            <if test="generatedTime != null ">
                generated_time,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},
@@ -183,6 +191,9 @@
            <if test="createTime != null">#{createTime},
            </if>
            <if test="sex != null">#{sex},
            </if>
            <if test="generatedTime != null ">
                #{generatedTime},
            </if>
        </trim>
    </insert>
@@ -241,6 +252,9 @@
            <if test="sex != null">sex =
                #{sex},
            </if>
            <if test="generatedTime != null ">
                generated_time = #{generatedTime},
            </if>
        </trim>
        where id = #{id}
    </update>