记得上下班打卡 | git大法好,push需谨慎

Commit 2218316f authored by jiangxiulong's avatar jiangxiulong

admin nft列表:优化搜索 优化sql 增加展示是否是盲盒 兑换展示兑换码

parent 00db674e
...@@ -39,4 +39,6 @@ public class GoblinNftOrderListParam { ...@@ -39,4 +39,6 @@ public class GoblinNftOrderListParam {
private String payTimeStart; private String payTimeStart;
@ApiModelProperty(value = "支付结束时间") @ApiModelProperty(value = "支付结束时间")
private String payTimeEnd; private String payTimeEnd;
@ApiModelProperty(value = "兑换码")
private String exCode;
} }
...@@ -35,4 +35,8 @@ public class GoblinNftOrderRefundListParam { ...@@ -35,4 +35,8 @@ public class GoblinNftOrderRefundListParam {
private String payType; private String payType;
@ApiModelProperty(value = "订单状态") @ApiModelProperty(value = "订单状态")
private Integer status; private Integer status;
@ApiModelProperty(value = "支付开始时间")
private String payTimeStart;
@ApiModelProperty(value = "支付结束时间")
private String payTimeEnd;
} }
...@@ -15,4 +15,6 @@ public class GoblinNftOrderListDto { ...@@ -15,4 +15,6 @@ public class GoblinNftOrderListDto {
private String name; private String name;
private String tradingAt; private String tradingAt;
private String nftId; private String nftId;
private String exCode;
private String boxSkuId;
} }
...@@ -3,48 +3,53 @@ ...@@ -3,48 +3,53 @@
<mapper namespace="com.liquidnet.service.goblin.mapper.GoblinNftOrderMapper"> <mapper namespace="com.liquidnet.service.goblin.mapper.GoblinNftOrderMapper">
<select id="searchList" resultType="com.liquidnet.service.goblin.dto.admin.GoblinNftOrderListDto"> <select id="searchList" resultType="com.liquidnet.service.goblin.dto.admin.GoblinNftOrderListDto">
select select c.trading_at, c.nft_id, a.* from (select
a.user_id,a.order_code,a.order_type,a.pay_type,a.price_actual,a.status,a.pay_time,a.created_at, user_id,order_code,order_id,order_type,pay_type,price_actual,
b.name, status,pay_time,created_at,sku_title as name, mid, ex_code, box_sku_id
c.trading_at, c.nft_id from goblin_nft_order
from goblin_nft_order as a
left join goblin_goods_sku as b on b.sku_id = a.sku_id
left join goblin_user_digital_artwork as c on c.order_id = a.order_id and c.del_flg = '0'
<where> <where>
<if test="name!=''"> <if test="name!=''">
and b.name like concat('%', #{name}, '%') and sku_title like concat('%', #{name}, '%')
</if> </if>
<if test="userId!=''"> <if test="userId!=''">
and a.user_id = #{userId} and user_id = #{userId}
</if> </if>
<if test="shortOrderCode!=''"> <if test="shortOrderCode!=''">
and a.order_code like concat('%', #{shortOrderCode}, '%') and order_code like concat('%', #{shortOrderCode}, '%')
</if> </if>
<if test="orderCode!=''"> <if test="orderCode!=''">
and a.order_code = #{orderCode} and order_code = #{orderCode}
</if>
<if test="nftId!=''">
and c.nft_id = #{nftId}
</if> </if>
<if test="orderType != null and orderType!=''"> <if test="orderType != null and orderType!=''">
and a.order_type = #{orderType} and order_type = #{orderType}
</if> </if>
<if test="payType!=''"> <if test="payType!=''">
and a.pay_type = #{payType} and pay_type = #{payType}
</if> </if>
<if test="status != null and status!=''"> <if test="status != null and status!=''">
and a.status = #{status} and status = #{status}
</if> </if>
<if test="payTimeStart != null and payTimeStart != ''"> <if test="payTimeStart != null and payTimeStart != ''">
<!-- and amo.payment_at &gt; #{paymentAtStart} --> <!-- and amo.payment_at &gt; #{paymentAtStart} -->
and a.pay_time <![CDATA[>=]]> #{payTimeStart} and pay_time <![CDATA[>=]]> #{payTimeStart}
</if> </if>
<if test="payTimeEnd != null and payTimeEnd != ''"> <if test="payTimeEnd != null and payTimeEnd != ''">
<!-- and amo.payment_at &lt; #{paymentAtEnd} --> <!-- and amo.payment_at &lt; #{paymentAtEnd} -->
and a.pay_time <![CDATA[<=]]> #{payTimeEnd} and pay_time <![CDATA[<=]]> #{payTimeEnd}
</if>
<if test="exCode!=''">
and ex_code = #{exCode}
</if>
</where>
) as a
left join goblin_user_digital_artwork as c on c.order_id = a.order_id and c.del_flg = '0'
<where>
<if test="nftId!=''">
and c.nft_id = #{nftId}
</if> </if>
</where> </where>
group by a.order_id -- group by a.order_id
order by a.created_at desc -- order by a.created_at desc
order by a.mid desc
</select> </select>
</mapper> </mapper>
...@@ -37,8 +37,17 @@ ...@@ -37,8 +37,17 @@
<if test="status != null and status!=''"> <if test="status != null and status!=''">
and d.status = #{status} and d.status = #{status}
</if> </if>
<if test="payTimeStart != null and payTimeStart != ''">
<!-- and amo.payment_at &gt; #{paymentAtStart} -->
and a.pay_time <![CDATA[>=]]> #{payTimeStart}
</if>
<if test="payTimeEnd != null and payTimeEnd != ''">
<!-- and amo.payment_at &lt; #{paymentAtEnd} -->
and a.pay_time <![CDATA[<=]]> #{payTimeEnd}
</if>
</where> </where>
group by a.order_id -- group by a.order_id
order by d.created_at desc -- order by d.created_at desc
order by d.mid desc
</select> </select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment