zxl
2 天以前 e2d5c94d2e313523edfdc0335862b03fff7be8bd
商家优惠劵领取
4个文件已修改
55 ■■■■ 已修改文件
framework/src/main/java/cn/lili/modules/lmk/domain/vo/StoreCouponClaimRecordVO.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponClaimRecordServiceImpl.java 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/order/order/entity/dto/StoreCouponClaimRecordDTO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/resources/mapper/lmk/StoreCouponClaimRecordMapper.xml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/domain/vo/StoreCouponClaimRecordVO.java
@@ -105,6 +105,11 @@
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date claimTime;
    @ApiModelProperty("订单状态")
    private String orderStatus;
    public static StoreCouponClaimRecordVO getVoByEntity(@NonNull StoreCouponClaimRecord entity, StoreCouponClaimRecordVO vo) {
        if(vo == null) {
            vo = new StoreCouponClaimRecordVO();
framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponClaimRecordServiceImpl.java
@@ -266,7 +266,7 @@
        Row header = sheet.createRow(0);
        String[] headers = {
                "会员名称", "优惠券名称", "发布店铺", "面额/折扣",
                 "获取方式", "会员优惠券状态", "优惠券类型",
                 "获取方式", "会员优惠券状态", "优惠券类型","订单状态",
                 "使用起始时间", "截止时间","领取时间"
        };
        for (int i = 0; i < headers.length; i++) {
@@ -355,9 +355,33 @@
            }
            row.createCell(6).setCellValue(couponTypeDesc);
            //7.订单状态
            String orderStatusType = dto.getOrderStatus();
            System.out.println(orderStatusType);
            String orderStatusDesc;
            if ("UNPAID".equals(orderStatusType)) {
                orderStatusDesc = "未付款";
            } else if ("PAID".equals(orderStatusType)) {
                orderStatusDesc = "已付款";
            }else if ("UNDELIVERED".equals(orderStatusType)) {
                orderStatusDesc = "待发货";
            }else if ("DELIVERED".equals(orderStatusType)) {
                orderStatusDesc = "已发货";
            }else if ("COMPLETED".equals(orderStatusType)) {
                orderStatusDesc = "已完成";
            }else if ("STAY_PICKED_UP".equals(orderStatusType)) {
                orderStatusDesc = "待自提";
            }else if ("TAKE".equals(orderStatusType)) {
                orderStatusDesc = "待核验";
            }else if ("CANCELLED".equals(orderStatusType)) {
                orderStatusDesc = "已关闭";
            }else {
                orderStatusDesc ="未知";
            }
            Cell orderStatus = row.createCell(7);
            orderStatus.setCellValue(orderStatusDesc);
            // 10. 使用起始时间(处理null,格式化时间)
            Cell startTimeCell = row.createCell(7);
            Cell startTimeCell = row.createCell(8);
            if (Objects.nonNull(dto.getStartTime())) {
                startTimeCell.setCellValue(DateUtil.formatDateTime(dto.getStartTime()));
            } else {
@@ -365,13 +389,13 @@
            }
            // 11. 截止时间(同上)
            Cell endTimeCell = row.createCell(8);
            Cell endTimeCell = row.createCell(9);
            if (Objects.nonNull(dto.getEndTime())) {
                endTimeCell.setCellValue(DateUtil.formatDateTime(dto.getEndTime()));
            } else {
                endTimeCell.setCellValue("");
            }
            Cell claimTimeCell = row.createCell(9);
            Cell claimTimeCell = row.createCell(10);
            if (Objects.nonNull(dto.getClaimTime())) {
                endTimeCell.setCellValue(DateUtil.formatDateTime(dto.getClaimTime()));
            } else {
framework/src/main/java/cn/lili/modules/order/order/entity/dto/StoreCouponClaimRecordDTO.java
@@ -98,4 +98,6 @@
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date claimTime;
    private String orderStatus;
}
framework/src/main/resources/mapper/lmk/StoreCouponClaimRecordMapper.xml
@@ -53,6 +53,8 @@
        <result column="user_id" property="userId"/>
        <result column="coupon_name" property="couponName"/>
        <result column="claimTime" property="claimTime"/>
        <result column="order_status" property="orderStatus"/>
    </resultMap>
    <select id="getPage" resultMap="BaseResultMapByManager">
@@ -75,14 +77,18 @@
        lsccr.user_id,
        lsccr.coupon_name,
        lsccr.create_time AS claimTime,
        lsccr.coupon_id
        lsccr.coupon_id,
        lo.order_status
        FROM
        lmk_store_coupon_claim_record lsccr
        INNER JOIN
        li_member_coupon lmc ON lmc.id = lsccr.member_coupon_id
        LEFT JOIN li_order lo ON lo.use_platform_member_coupon_id = lmc.id AND lo.delete_flag = 0
        WHERE
        lmc.delete_flag = 0
        AND lsccr.delete_flag = 0
        AND lmc.member_id = lsccr.user_id
        <!-- 1. 会员名称模糊查询(关联li_member_coupon表) -->
        <if test="query.memberName != null and query.memberName != ''">
            AND lmc.member_name LIKE CONCAT('%', #{query.memberName}, '%')
@@ -131,15 +137,19 @@
        lsccr.user_id,
        lsccr.coupon_name,
        lsccr.create_time AS claimTime,
        lsccr.coupon_id
        lsccr.coupon_id,
        lo.order_status
        FROM
        lmk_store_coupon_claim_record lsccr
        INNER JOIN
        li_member_coupon lmc ON lmc.id = lsccr.member_coupon_id
        LEFT JOIN li_order lo ON lo.use_platform_member_coupon_id = lmc.id AND lo.delete_flag = 0
        WHERE
        lmc.delete_flag = 0
        AND lsccr.delete_flag = 0
        AND lmc.member_id = lsccr.user_id
        <!-- 1. 会员名称模糊查询(关联li_member_coupon表) -->
        <if test="query.memberName != null and query.memberName != ''">
            AND lmc.member_name LIKE CONCAT('%', #{query.memberName}, '%')