1. 后台交易订单列表改为按时间倒序,并增加订单号,商家账号,用户账号以及订单状态查询
This commit is contained in:
2026-05-21 10:20:05 +08:00
parent 8074b8f08a
commit c4925cb45c
2 changed files with 22 additions and 4 deletions

View File

@@ -40,10 +40,24 @@
</resultMap>
<select id="selectMerchantOrderPage" resultMap="merchantOrderResultMap">
select *
from market_merchant_order
where is_deleted = 0
<select id="selectMerchantOrderPage" resultType="org.springblade.modules.market.pojo.vo.MerchantOrderVO">
select mmo.*, bu.account as userAccount, bb.account as sellerAccount
from market_merchant_order mmo left join blade_user bu on mmo.user_id = bu.id
left join blade_user bb on mmo.seller_id = bb.id
where mmo.is_deleted = 0
<if test="merchantOrder.id != null">
and mmo.id = #{merchantOrder.id}
</if>
<if test="merchantOrder.userAccount != null and merchantOrder.userAccount != ''">
and bu.account = #{merchantOrder.userAccount}
</if>
<if test="merchantOrder.sellerAccount != null and merchantOrder.sellerAccount != ''">
and bb.account = #{merchantOrder.sellerAccount}
</if>
<if test="merchantOrder.status != null">
and mmo.status = #{merchantOrder.status}
</if>
order by mmo.id desc
</select>

View File

@@ -42,4 +42,8 @@ public class MerchantOrderVO extends MerchantOrderEntity {
@Serial
private static final long serialVersionUID = 1L;
private String userAccount;
private String sellerAccount;
}