Fancy
2024-08-20 745b115acbb46829eb52f904f0c276012decf938
pms-parent/pms-global/src/main/resources/mapper/PrOrderItemMapper.xml
@@ -83,4 +83,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>