This commit is contained in:
van
2026-04-30 17:53:31 +08:00
parent 5da74a155c
commit e75f71d37b
6 changed files with 64 additions and 0 deletions

View File

@@ -290,6 +290,26 @@
ORDER BY create_time DESC
</select>
<resultMap id="QuickRecordModelOptionResult" type="com.ruoyi.jarvis.domain.dto.QuickRecordModelOption">
<result property="modelNumber" column="model_number"/>
<result property="lastPaymentAmount" column="last_payment_amount"/>
<result property="lastRebateAmount" column="last_rebate_amount"/>
</resultMap>
<select id="selectQuickRecordModelOptions" resultMap="QuickRecordModelOptionResult">
select o.model_number as model_number,
o.payment_amount as last_payment_amount,
o.rebate_amount as last_rebate_amount
from jd_order o
inner join (
select trim(model_number) as m, max(id) as mid
from jd_order
where model_number is not null and trim(model_number) != ''
group by trim(model_number)
) t on trim(o.model_number) = t.m and o.id = t.mid
order by o.id desc
</select>
</mapper>