Fancy
2024-08-20 b32dba6d0c069e4d1a416358501b441865714ab3
pms-parent/pms-global/src/main/resources/mapper/PrOrderItemMapper.xml
@@ -25,6 +25,7 @@
        where  id = #{id,jdbcType=BIGINT} 
    </select>
    <select id="selectItems"  parameterType="java.lang.Long" resultMap="BaseResultMap">
        <!--算出完成率-->
        select
        <include refid="Base_Column_List" />
        from pr_order_item
@@ -63,6 +64,7 @@
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrOrderItem">
        <!--@mbg.generated-->
        update pr_order_item
        <set>
                <if test="orderId != null">
@@ -83,4 +85,35 @@
        </set>
        where   id = #{id,jdbcType=BIGINT} 
    </update>
    <delete id="deleteLogicById">
        update pr_order_item set deleted = 1 where id = #{id}
    </delete>
    <select id="selectSome" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_order_item p
        where p.deleted!=1
        <trim prefix="and " suffixOverrides="and">
            <if test="orderId != null and orderId != ''">
                p.orderId = #{orderId,jdbcType=BIGINT} and
            </if>
        </trim>
        order by id desc
        <trim prefix="limit " >
            <if test="start != null and count != null">
                #{start}, #{count}
            </if>
        </trim>
    </select>
    <select id="selectSomeCount" resultType="java.lang.Long">
        select count(1)
        from pr_order_item p
        where p.deleted!=1
        <trim prefix="and " suffixOverrides="and">
            <if test="orderId != null and orderId != ''">
                p.orderId = #{orderId,jdbcType=BIGINT} and
            </if>
        </trim>
    </select>
</mapper>