Commit 80feb08e by 吕明尚

导出增加扫呗订单号,门店查询增加支付时间的范围查询

parent 835a9218
......@@ -147,4 +147,18 @@ public class SOrder extends BaseEntity
private Integer buyType;
/**
* 支付开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@TableField(select = false)
private Date startPayTime;
/**
* 支付结束时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@TableField(select = false)
private Date endPayTime;
}
package share.system.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import share.common.annotation.Excel;
import share.common.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
/**
* 扫呗接口调用日志对象 s_saobei_api_log
*
......@@ -14,6 +13,7 @@ import lombok.Data;
* @date 2023-12-14
*/
@Data
@TableName(value = "s_saobei_api_log")
public class SaobeiApiLog extends BaseEntity
{
private static final long serialVersionUID = 1L;
......
......@@ -37,6 +37,10 @@ public class SOrderVo
@Excel(name = "订单编号")
private String orderNo;
@Excel(name = "扫呗订单号")
@ApiModelProperty(value = "商户订单号")
private String outTradeNo;
/** 订单类型(0:订房订单,1:续房订单,2:充值订单) */
@ApiModelProperty(value = "订单类型(1:订房订单,2:续房订单,3:充值订单)")
......@@ -162,9 +166,6 @@ public class SOrderVo
private String remark;
@ApiModelProperty(value = "商户订单号")
private String outTradeNo;
@ApiModelProperty(value = "支付类型(1:微信,2:支付宝)")
private Integer payType;
......
......@@ -120,6 +120,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
@Autowired
private ISCouponService sCouponService;
@Autowired
private SaobeiApiLogService saobeiApiLogService;
private final static Long FIVE = 5l;
......@@ -673,6 +676,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
public List<SOrderVo> exportList(SOrder sOrder) {
List<SOrder> sOrders = selectSOrderList(sOrder);
List<SOrderVo> sOrderVos = convertDosToVos(sOrders);
List<SaobeiApiLog> saobeiApiLogs = saobeiApiLogService.list();
List<SConsumerCoupon> sConsumerCoupons = consumerCouponService.queryList();
List<SCoupon> list = sCouponService.list();
if (CollectionUtils.isNotEmpty(sOrderVos)) {
......@@ -698,6 +702,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
}
});
if (StringUtils.isNoneEmpty(item.getOutTradeNo())) {
item.setOutTradeNo(saobeiApiLogs.stream().filter(s -> s.getTerminalTrace().equals(item.getOutTradeNo())).findFirst().orElse(null).getOutTradeNo());
}
}
}
sOrderVos.sort(Comparator.comparing(SOrderVo::getCreateTime).reversed());
......
......@@ -144,6 +144,7 @@
and end_date >= NOW()
and use_status = '0'
<if test="consumerId != null ">and consumer_id = #{consumerId}</if>
order by coupon_type,end_date,sub_price desc
</where>
</select>
<select id="queryById" resultType="share.system.domain.SConsumerCoupon">
......
......@@ -106,6 +106,12 @@
<if test="couponPrice != null and couponPrice != ''">and coupon_price = #{couponPrice}</if>
<if test="totalPrice != null and totalPrice != ''">and total_price = #{totalPrice}</if>
<if test="payPrice != null and payPrice != ''">and pay_price = #{payPrice}</if>
<if test="startPayTime != null">
and DATE_FORMAT(pay_time, '%Y-%m-%d') &gt;= DATE_FORMAT(#{startPayTime}, '%Y-%m-%d')
</if>
<if test="endPayTime != null">
and DATE_FORMAT(pay_time, '%Y-%m-%d') &lt;= DATE_FORMAT(#{endPayTime}, '%Y-%m-%d')
</if>
<if test="payTime != null and payTime != ''">and pay_time = #{payTime}</if>
<if test="timeLong != null and timeLong != ''">and time_long = #{timeLong}</if>
<if test="preStartDate != null">
......
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