From 60840a899f416825d6273e63e7d6e2c1b7c835a8 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 30 Jun 2021 11:11:43 +0800 Subject: [PATCH 01/27] ceshi fajuan --- .../main/java/com/iformall/service/impl/WxOrderServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java index d34c973c8..3c5dcffd1 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java @@ -469,7 +469,7 @@ public class WxOrderServiceImpl implements WxOrderService { couponOrderQ.updateTenantInfo(counpon); couponOrderQ.setCouponId(counpon.getId()); couponOrderQ.setCUserId(user.getId()); - if (counpon.getSendType().equals(EnumCouponSendType.PASSIVE)) { + if (counpon.getSendType().equals(EnumCouponSendType.PASSIVE.getCode())) { couponOrderQ.setCouponOrderStatus(EnumCouponOrderStatus.COUPON_ORDER_USE_WAIT.getCode()); } return wxCouponOrderMapper.findCount(couponOrderQ); From 1198eb80c6d76ee8d3bd73cd50e7a90b1b26b9f2 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 30 Jun 2021 11:16:28 +0800 Subject: [PATCH 02/27] =?UTF-8?q?=E9=99=90=E8=B4=AD=EF=BC=88=E5=8F=AA?= =?UTF-8?q?=E8=A6=81=E6=8B=A5=E6=9C=89=E8=BF=87=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iformall/service/impl/WxOrderServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java index 3c5dcffd1..e184d0b83 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java @@ -469,9 +469,9 @@ public class WxOrderServiceImpl implements WxOrderService { couponOrderQ.updateTenantInfo(counpon); couponOrderQ.setCouponId(counpon.getId()); couponOrderQ.setCUserId(user.getId()); - if (counpon.getSendType().equals(EnumCouponSendType.PASSIVE.getCode())) { - couponOrderQ.setCouponOrderStatus(EnumCouponOrderStatus.COUPON_ORDER_USE_WAIT.getCode()); - } +// if (counpon.getSendType().equals(EnumCouponSendType.PASSIVE.getCode())) { +// couponOrderQ.setCouponOrderStatus(EnumCouponOrderStatus.COUPON_ORDER_USE_WAIT.getCode()); +// } return wxCouponOrderMapper.findCount(couponOrderQ); } catch (Exception e) { logger.error("购买是否超限-DB, couponId: " + counpon.getId() + ", e:" + e.getMessage()); From 110b19ac27a56ec1a6780cbe79b0e2502e818c37 Mon Sep 17 00:00:00 2001 From: xhxu Date: Mon, 12 Jul 2021 15:39:26 +0800 Subject: [PATCH 03/27] =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AliBusinessCircleOrderController.java | 18 +++++++++++++++++- .../WxBusinessCircleOrderController.java | 18 ++++++++++++++++-- .../market/WxThirdPartyOrdersController.java | 17 ++++++++++++++++- .../domain/po/AliBusinessCircleOrder.java | 3 ++- .../iformall/domain/po/BusinessCircleBase.java | 12 ++++++++++++ .../domain/po/WxBusinessCircleOrder.java | 2 ++ .../iformall/domain/po/WxThirdPartyOrders.java | 2 ++ .../service/AliBusinessCircleOrderService.java | 3 +++ .../service/WxBusinessCircleOrderService.java | 3 +++ .../service/WxThirdPartyOrdersService.java | 3 +++ .../AliBusinessCircleOrderServiceImpl.java | 12 ++++++++++++ .../impl/WxBusinessCircleOrderServiceImpl.java | 11 +++++++++++ .../impl/WxThirdPartyOrdersServiceImpl.java | 12 +++++++++++- 13 files changed, 110 insertions(+), 6 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/AliBusinessCircleOrderController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/AliBusinessCircleOrderController.java index b726bc429..fcf1396ee 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/AliBusinessCircleOrderController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/AliBusinessCircleOrderController.java @@ -6,6 +6,7 @@ import com.iformall.common.ErrorCode; import com.iformall.common.ResultData; import com.iformall.controller.base.BaseController; import com.iformall.domain.po.AliBusinessCircleOrder; +import com.iformall.domain.po.WxBusinessCircleOrder; import com.iformall.domain.po.base.BaseEntity; import com.iformall.service.AliBusinessCircleOrderService; import com.iformall.utils.Constant; @@ -22,6 +23,9 @@ import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + @RestController @RequestMapping("aliCircle") @Api(description = "订单相关接口") @@ -39,7 +43,7 @@ public class AliBusinessCircleOrderController extends BaseController { }) @SystemControllerLog(description = "-列表") public ResultData list(@ModelAttribute AliBusinessCircleOrder circleOrder, Integer pageNum, Integer pageSize) { - logger.debug("[" + getIpAddr() + "] WxOrderController::list"); + logger.debug("[" + getIpAddr() + "] AliBusinessCircleOrderController::list"); if (null == circleOrder) { circleOrder = new AliBusinessCircleOrder(); } @@ -70,5 +74,17 @@ public class AliBusinessCircleOrderController extends BaseController { return new ResultData(order); } + @GetMapping("exportData") + @SystemControllerLog(description = "券订单数据-导出数据") + public void exportData(@ModelAttribute AliBusinessCircleOrder circleOrder, HttpServletRequest request, HttpServletResponse response) { + logger.debug("[" + getIpAddr() + "] AliBusinessCircleOrderController::exportData"); + if (null == circleOrder) { + circleOrder = new AliBusinessCircleOrder(); + } + circleOrder.updateTenantInfo(getTenantInfo()); + circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); + aliBusinessCircleOrderService.exportData(circleOrder, request, response); + } + } diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxBusinessCircleOrderController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxBusinessCircleOrderController.java index 736a04023..f422276ed 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxBusinessCircleOrderController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxBusinessCircleOrderController.java @@ -7,7 +7,6 @@ import com.iformall.common.ResultData; import com.iformall.controller.base.BaseController; import com.iformall.domain.po.*; import com.iformall.domain.po.base.BaseEntity; -import com.iformall.domain.po.tt.TtOrder; import com.iformall.service.*; import com.iformall.utils.Constant; import io.swagger.annotations.Api; @@ -20,6 +19,9 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + @RestController @RequestMapping("wxCircle") @Api(description = "订单相关接口") @@ -37,7 +39,7 @@ public class WxBusinessCircleOrderController extends BaseController { }) @SystemControllerLog(description = "-列表") public ResultData list(@ModelAttribute WxBusinessCircleOrder circleOrder, Integer pageNum, Integer pageSize) { - logger.debug("[" + getIpAddr() + "] WxOrderController::list"); + logger.debug("[" + getIpAddr() + "] WxBusinessCircleOrderController::list"); if (null == circleOrder) { circleOrder = new WxBusinessCircleOrder(); } @@ -68,5 +70,17 @@ public class WxBusinessCircleOrderController extends BaseController { return new ResultData(order); } + @GetMapping("exportData") + @SystemControllerLog(description = "券订单数据-导出数据") + public void exportData(@ModelAttribute WxBusinessCircleOrder circleOrder, HttpServletRequest request, HttpServletResponse response) { + logger.debug("[" + getIpAddr() + "] WxBusinessCircleOrderController::exportData"); + if (null == circleOrder) { + circleOrder = new WxBusinessCircleOrder(); + } + circleOrder.updateTenantInfo(getTenantInfo()); + circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); + wxBusinessCircleOrderService.exportData(circleOrder, request, response); + } + } diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxThirdPartyOrdersController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxThirdPartyOrdersController.java index 942355b80..6dba30a2a 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxThirdPartyOrdersController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxThirdPartyOrdersController.java @@ -5,6 +5,7 @@ import com.iformall.annotation.SystemControllerLog; import com.iformall.common.ErrorCode; import com.iformall.common.ResultData; import com.iformall.controller.base.BaseController; +import com.iformall.domain.po.AliBusinessCircleOrder; import com.iformall.domain.po.WxThirdPartyOrders; import com.iformall.domain.po.base.BaseEntity; import com.iformall.service.WxThirdPartyOrdersService; @@ -22,6 +23,9 @@ import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + @RestController @RequestMapping("thirdCircle") @Api(description = "订单相关接口") @@ -39,7 +43,7 @@ public class WxThirdPartyOrdersController extends BaseController { }) @SystemControllerLog(description = "-列表") public ResultData list(@ModelAttribute WxThirdPartyOrders circleOrder, Integer pageNum, Integer pageSize) { - logger.debug("[" + getIpAddr() + "] WxOrderController::list"); + logger.debug("[" + getIpAddr() + "] WxThirdPartyOrdersController::list"); if (null == circleOrder) { circleOrder = new WxThirdPartyOrders(); } @@ -70,5 +74,16 @@ public class WxThirdPartyOrdersController extends BaseController { return new ResultData(order); } + @GetMapping("exportData") + @SystemControllerLog(description = "券订单数据-导出数据") + public void exportData(@ModelAttribute WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response) { + logger.debug("[" + getIpAddr() + "] WxThirdPartyOrdersController::exportData"); + if (null == circleOrder) { + circleOrder = new WxThirdPartyOrders(); + } + circleOrder.updateTenantInfo(getTenantInfo()); + circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); + wxThirdPartyOrdersOrderService.exportData(circleOrder, request, response); + } } diff --git a/mallinkService/src/main/java/com/iformall/domain/po/AliBusinessCircleOrder.java b/mallinkService/src/main/java/com/iformall/domain/po/AliBusinessCircleOrder.java index ea30a7d11..d67086f85 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/AliBusinessCircleOrder.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/AliBusinessCircleOrder.java @@ -1,6 +1,6 @@ package com.iformall.domain.po; -import com.baomidou.mybatisplus.annotation.TableField; +import cn.afterturn.easypoi.excel.annotation.Excel; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.EqualsAndHashCode; @@ -18,6 +18,7 @@ public class AliBusinessCircleOrder extends BusinessCircleBase { @io.swagger.annotations.ApiModelProperty(value="发生交易的商圈(非商圈组)的名称",name="mallName") private String mallName; + @Excel(name = "门店编码", width = 20, orderNum = "1") @io.swagger.annotations.ApiModelProperty(value="门店编号,商户侧系统内编号",name="mallStoreId") private String mallStoreId; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java b/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java index 4471abafc..636ea6d67 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java @@ -1,5 +1,6 @@ package com.iformall.domain.po; +import cn.afterturn.easypoi.excel.annotation.Excel; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.iformall.domain.po.base.TenantEntity; @@ -29,6 +30,7 @@ public class BusinessCircleBase extends TenantEntity { @io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知回调摘要",name="summary") private String summary; + @Excel(name = "交易时间", width = 20, orderNum = "4", format = "yyyy-MM-dd HH:mm:ss") @io.swagger.annotations.ApiModelProperty(value="交易完成时间",name="timeEnd") private Date timeEnd; @@ -46,6 +48,7 @@ public class BusinessCircleBase extends TenantEntity { @io.swagger.annotations.ApiModelProperty(value="用户实际付款金额,单位(分)",name="payAmount") private Integer payAmount; + @Excel(name = "付款金额(元)", width = 20, orderNum = "5") @TableField(exist = false) @io.swagger.annotations.ApiModelProperty(value="用户实际付款金额,单位(元)",name="payAmountStr") private String payAmountStr; @@ -54,9 +57,11 @@ public class BusinessCircleBase extends TenantEntity { return payAmount != null ? new BigDecimal(payAmount).divide(new BigDecimal(100)).toPlainString(): payAmountStr; } + @Excel(name = "支付订单号", width = 20, orderNum = "3") @io.swagger.annotations.ApiModelProperty(value="支付订单号",name="transactionId") private String transactionId; + @Excel(name = "通知时间", width = 20, orderNum = "8", format = "yyyy-MM-dd HH:mm:ss") @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createTime") private Date createTime; @@ -65,26 +70,33 @@ public class BusinessCircleBase extends TenantEntity { @io.swagger.annotations.ApiModelProperty(value="门店Id,与第三方对齐",name="merchantId") private Long merchantId; + @Excel(name = "门店名称", width = 20, orderNum = "2") private String merchantName; @TableField(exist = false) private WxMerchant merchant; + @Excel(name = "会员ID", width = 20, orderNum = "6") @io.swagger.annotations.ApiModelProperty(value="c端会员id,与第三方对齐",name="cUserId") private Long cUserId; private String cUserNickName; + @Excel(name = "会员手机号", width = 20, orderNum = "7") private String cUserPhone; @TableField(exist = false) private WxCUserBasicInfo basicInfo; + @Excel(name = "是否获得积分", width = 20, orderNum = "9", replace = {"是_1", "否_0"}) @io.swagger.annotations.ApiModelProperty(value="是否获得积分(1:是,0:否)",name="earnPoints") private Integer earnPoints; + @Excel(name = "更新积分值", width = 20, orderNum = "10") @io.swagger.annotations.ApiModelProperty(value="订单更新积分值",name="increasedPoints") private Integer increasedPoints; + @Excel(name = "积分更新时间", width = 20, orderNum = "11", format = "yyyy-MM-dd HH:mm:ss") @io.swagger.annotations.ApiModelProperty(value="积分更新时间(新增)",name="increasedPoints") private Date pointsUpdateTime; + @Excel(name = "是否退款", width = 20, orderNum = "12", replace = {"是_1", "_0"}) @io.swagger.annotations.ApiModelProperty(value="是否退款(1:是,0:否)",name="isRefund") private Integer isRefund; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBusinessCircleOrder.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBusinessCircleOrder.java index 676eaff55..7139a91b6 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBusinessCircleOrder.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBusinessCircleOrder.java @@ -1,5 +1,6 @@ package com.iformall.domain.po; +import cn.afterturn.easypoi.excel.annotation.Excel; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.EqualsAndHashCode; @@ -20,6 +21,7 @@ public class WxBusinessCircleOrder extends BusinessCircleBase { @io.swagger.annotations.ApiModelProperty(value="门店名称,商圈在商圈小程序上圈店时填写的门店名称",name="wxShopName") private String wxShopName; + @Excel(name = "门店编码", width = 20, orderNum = "1") @io.swagger.annotations.ApiModelProperty(value="门店编号,商圈在商圈小程序上圈店时填写的门店编号,用于跟商圈自身已有的商户识别码对齐",name="wxShopNumber") private String wxShopNumber; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxThirdPartyOrders.java b/mallinkService/src/main/java/com/iformall/domain/po/WxThirdPartyOrders.java index abc94c7f3..500da03df 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxThirdPartyOrders.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxThirdPartyOrders.java @@ -1,5 +1,6 @@ package com.iformall.domain.po; +import cn.afterturn.easypoi.excel.annotation.Excel; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; @@ -25,6 +26,7 @@ public class WxThirdPartyOrders extends BusinessCircleBase { @io.swagger.annotations.ApiModelProperty(value="门店名称",name="shopName") private String shopName; + @Excel(name = "门店编码", width = 20, orderNum = "1") @io.swagger.annotations.ApiModelProperty(value="门店编号",name="shopNumber") private String shopNumber; diff --git a/mallinkService/src/main/java/com/iformall/service/AliBusinessCircleOrderService.java b/mallinkService/src/main/java/com/iformall/service/AliBusinessCircleOrderService.java index b830444fc..67e04a387 100644 --- a/mallinkService/src/main/java/com/iformall/service/AliBusinessCircleOrderService.java +++ b/mallinkService/src/main/java/com/iformall/service/AliBusinessCircleOrderService.java @@ -6,6 +6,8 @@ import com.iformall.domain.po.AliBusinessCircleOrder; import com.iformall.domain.po.WxMerchant; import com.iformall.domain.po.base.TenantEntity; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.List; public interface AliBusinessCircleOrderService { @@ -49,4 +51,5 @@ public interface AliBusinessCircleOrderService { */ void updatePoints(AliBusinessCircleOrder record); + void exportData(AliBusinessCircleOrder circleOrder, HttpServletRequest request, HttpServletResponse response); } diff --git a/mallinkService/src/main/java/com/iformall/service/WxBusinessCircleOrderService.java b/mallinkService/src/main/java/com/iformall/service/WxBusinessCircleOrderService.java index 2cdc08e64..3136666c0 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxBusinessCircleOrderService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxBusinessCircleOrderService.java @@ -5,6 +5,8 @@ import com.iformall.common.ResultData; import com.iformall.domain.po.WxBusinessCircleOrder; import com.iformall.domain.po.base.TenantEntity; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.List; public interface WxBusinessCircleOrderService { @@ -52,4 +54,5 @@ public interface WxBusinessCircleOrderService { */ void updateIsPointsNotify(WxBusinessCircleOrder record); + void exportData(WxBusinessCircleOrder circleOrder, HttpServletRequest request, HttpServletResponse response); } diff --git a/mallinkService/src/main/java/com/iformall/service/WxThirdPartyOrdersService.java b/mallinkService/src/main/java/com/iformall/service/WxThirdPartyOrdersService.java index deae7a389..62c1d3b77 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxThirdPartyOrdersService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxThirdPartyOrdersService.java @@ -6,6 +6,8 @@ import com.iformall.domain.po.WxThirdPartyOrders; import com.iformall.domain.po.base.TenantEntity; import com.iformall.enums.EnumThirdOrderType; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.List; public interface WxThirdPartyOrdersService { @@ -55,4 +57,5 @@ public interface WxThirdPartyOrdersService { */ void pointDeduction(WxThirdPartyOrders record); + void exportData(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response); } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/AliBusinessCircleOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/AliBusinessCircleOrderServiceImpl.java index 7d97ae68b..4e138fee0 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/AliBusinessCircleOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/AliBusinessCircleOrderServiceImpl.java @@ -20,6 +20,8 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.Date; import java.util.List; @@ -30,6 +32,9 @@ public class AliBusinessCircleOrderServiceImpl implements AliBusinessCircleOrder private static final String ALI_CIRCLE_KEY = "CIRCLE:ALI:"; + @Autowired + ExcelService excelService; + @Autowired RedisLock redisLock; @@ -346,4 +351,11 @@ public class AliBusinessCircleOrderServiceImpl implements AliBusinessCircleOrder aliBusinessCircleOrderMapper.updatePoints(record); } + @Override + public void exportData(AliBusinessCircleOrder circleOrder, HttpServletRequest request, HttpServletResponse response) { + List list = aliBusinessCircleOrderMapper.findList(circleOrder); + excelService.exportExcel(list, null, "支付宝商圈交易", AliBusinessCircleOrder.class, "支付宝商圈交易.xlsx", response, false); + + } + } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBusinessCircleOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBusinessCircleOrderServiceImpl.java index 12b940d00..75586aeee 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBusinessCircleOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBusinessCircleOrderServiceImpl.java @@ -20,6 +20,8 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; import java.util.Date; import java.util.List; @@ -31,6 +33,9 @@ public class WxBusinessCircleOrderServiceImpl implements WxBusinessCircleOrderSe private final String WX_CIRCLE_KEY = "CIRCLE:WX:"; + @Autowired + ExcelService excelService; + @Autowired RedisLock redisLock; @@ -359,5 +364,11 @@ public class WxBusinessCircleOrderServiceImpl implements WxBusinessCircleOrderSe wxBusinessCircleOrderMapper.updateIsPointsNotify(record); } + @Override + public void exportData(WxBusinessCircleOrder circleOrder, HttpServletRequest request, HttpServletResponse response) { + List list = wxBusinessCircleOrderMapper.findList(circleOrder); + excelService.exportExcel(list, null, "微信商圈交易", WxBusinessCircleOrder.class, "微信商圈交易.xlsx", response, false); + } + } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxThirdPartyOrdersServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxThirdPartyOrdersServiceImpl.java index dff8938df..16e025847 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxThirdPartyOrdersServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxThirdPartyOrdersServiceImpl.java @@ -20,9 +20,12 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; import java.util.Date; import java.util.List; +import java.util.Map; @Service public class WxThirdPartyOrdersServiceImpl implements WxThirdPartyOrdersService { @@ -31,6 +34,9 @@ public class WxThirdPartyOrdersServiceImpl implements WxThirdPartyOrdersService private static final String THIRD_CIRCLE_KEY = "CIRCLE:TH:"; + @Autowired + ExcelService excelService; + @Autowired RedisLock redisLock; @@ -441,8 +447,12 @@ public class WxThirdPartyOrdersServiceImpl implements WxThirdPartyOrdersService redisLock.unlock(lockKey, timeStr); } } + } - + @Override + public void exportData(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response) { + List list = wxThirdPartyOrdersMapper.findList(circleOrder); + excelService.exportExcel(list, null, "三方交易", WxThirdPartyOrders.class, "三方交易.xlsx", response, false); } From de8542f4b69769864fbad3312918acf768a99723 Mon Sep 17 00:00:00 2001 From: xhxu Date: Mon, 12 Jul 2021 17:10:38 +0800 Subject: [PATCH 04/27] =?UTF-8?q?=E8=AE=A2=E9=98=85=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/controller/msg/WxMsgController.java | 1 + .../db/migration/V202107120001__sendMSG.sql | 11 +++++++++++ .../com/iformall/controller/WxMsgController.java | 1 + .../java/com/iformall/enums/EnumTemplateType.java | 1 + .../com/iformall/service/impl/WxMsgServiceImpl.java | 13 +++++++++++++ .../service/impl/WxTemplateMsgServiceImpl.java | 11 +++++++++++ .../iformall/controller/msg/WxMsgController.java | 1 + 7 files changed, 39 insertions(+) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V202107120001__sendMSG.sql diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/msg/WxMsgController.java b/mallinkAdmin/src/main/java/com/iformall/controller/msg/WxMsgController.java index c9ef03487..cef65c79e 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/msg/WxMsgController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/msg/WxMsgController.java @@ -94,6 +94,7 @@ public class WxMsgController extends BaseController { types.add(EnumTemplateType.ACTIVITY_REMIND.getCode()); types.add(EnumTemplateType.LIVE_REMIND.getCode()); types.add(EnumTemplateType.CREDIT_UPD_REMIND.getCode()); + types.add(EnumTemplateType.SEND_COUPON_REMIND.getCode()); wxTemplateMsg.setTypes(types); final PageInfo page = wxTemplateMsgService.listAsPageForMiniApp(wxTemplateMsg, pageNum, pageSize); return new ResultData(page); diff --git a/mallinkAdmin/src/main/resources/db/migration/V202107120001__sendMSG.sql b/mallinkAdmin/src/main/resources/db/migration/V202107120001__sendMSG.sql new file mode 100644 index 000000000..3515ed19c --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V202107120001__sendMSG.sql @@ -0,0 +1,11 @@ + + +INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`) +select CEILING(RAND()*90000000000+10000000000) ,tenant_id,parent_tenant_id,'',51,'{\"index\": [\"thing1\", \"time3\", \"time4\", \"thing5\"], \"emphasis\": \"\"}',now(),now() +from wx_mall +where id != 1 and id != 10011 and id != 10071 and id != 10141 ; + + +INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1001', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); +INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1007', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); +INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1014', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); diff --git a/mallinkCApi/src/main/java/com/iformall/controller/WxMsgController.java b/mallinkCApi/src/main/java/com/iformall/controller/WxMsgController.java index c7164cc59..4a1924216 100644 --- a/mallinkCApi/src/main/java/com/iformall/controller/WxMsgController.java +++ b/mallinkCApi/src/main/java/com/iformall/controller/WxMsgController.java @@ -41,6 +41,7 @@ public class WxMsgController extends BaseController { types.add(EnumTemplateType.ACTIVITY_REMIND.getCode()); types.add(EnumTemplateType.LIVE_REMIND.getCode()); types.add(EnumTemplateType.CREDIT_UPD_REMIND.getCode()); + types.add(EnumTemplateType.SEND_COUPON_REMIND.getCode()); wxTemplateMsg.setTypes(types); final PageInfo page = wxTemplateMsgService.listAsPageForMiniApp(wxTemplateMsg, pageNum, pageSize); return new ResultData(page); diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumTemplateType.java b/mallinkService/src/main/java/com/iformall/enums/EnumTemplateType.java index 6b149f0dd..2a563c418 100644 --- a/mallinkService/src/main/java/com/iformall/enums/EnumTemplateType.java +++ b/mallinkService/src/main/java/com/iformall/enums/EnumTemplateType.java @@ -17,6 +17,7 @@ public enum EnumTemplateType { ACTIVITY_REMIND(4, "活动开始提醒","386"), // 小程序 LIVE_REMIND(5, "直播开播提醒","8501"), // 小程序 CREDIT_UPD_REMIND(50, "积分变更提醒","310"), // 小程序 + SEND_COUPON_REMIND(51, "优惠券到账提醒","3209"), // 小程序 AUDIT_MESSAGE(101, "公众号审核结果通知",""), // 公众号 VERIFY_RESULT(102, "公众号卡券核销通知",""), // 公众号 diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxMsgServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxMsgServiceImpl.java index ea05a73e3..800dbac09 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxMsgServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxMsgServiceImpl.java @@ -431,6 +431,19 @@ public class WxMsgServiceImpl implements WxMsgService { customParam.getString("time4"), customParam.getString("thing3") )); + }else if(wxTemplateMsg.getType() == EnumTemplateType.SEND_COUPON_REMIND.getCode()){ + /** + * 券名称{{thing1.DATA}} + * 获取时间{{time3.DATA}} + * 过期日期{{time4.DATA}} + * 备注{{thing5.DATA}} + */ + smartAppMsg.setDataList(Lists.newArrayList( + customParam.getString("thing1"), + customParam.getString("time3"), + customParam.getString("time4"), + customParam.getString("thing5") + )); }else{ return; } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxTemplateMsgServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxTemplateMsgServiceImpl.java index f23c3471c..22ce95c4f 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxTemplateMsgServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxTemplateMsgServiceImpl.java @@ -61,6 +61,10 @@ public class WxTemplateMsgServiceImpl implements WxTemplateMsgService { wxTemplateMsg.setType(EnumTemplateType.CREDIT_UPD_REMIND.getCode()); wxTemplateMsg.setCustomParam("{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}"); wxTemplateMsgMapper.insert(wxTemplateMsg); + wxTemplateMsg.setId(null); + wxTemplateMsg.setType(EnumTemplateType.SEND_COUPON_REMIND.getCode()); + wxTemplateMsg.setCustomParam("{\"index\": [\"thing1\", \"time3\", \"time4\", \"thing5\"], \"emphasis\": \"\"}"); + wxTemplateMsgMapper.insert(wxTemplateMsg); } @Override @@ -142,6 +146,13 @@ public class WxTemplateMsgServiceImpl implements WxTemplateMsgService { } catch (WxErrorException e) { return new ResultData(ErrorCode.TEMPLATE_ADD_ERROR); } + }else if(byId.getType() == EnumTemplateType.SEND_COUPON_REMIND.getCode()){ + try { + s = wxMaService.getSubscribeService().addTemplate(EnumTemplateType.SEND_COUPON_REMIND.getTid(), + Lists.newArrayList(1, 3, 4, 5),EnumTemplateType.SEND_COUPON_REMIND.getMessage()); + } catch (WxErrorException e) { + return new ResultData(ErrorCode.TEMPLATE_ADD_ERROR); + } }else{ return new ResultData(ErrorCode.TEMPLATE_NOT_FOUND); } diff --git a/mallinkTTAdmin/src/main/java/com/iformall/controller/msg/WxMsgController.java b/mallinkTTAdmin/src/main/java/com/iformall/controller/msg/WxMsgController.java index c9ef03487..cef65c79e 100644 --- a/mallinkTTAdmin/src/main/java/com/iformall/controller/msg/WxMsgController.java +++ b/mallinkTTAdmin/src/main/java/com/iformall/controller/msg/WxMsgController.java @@ -94,6 +94,7 @@ public class WxMsgController extends BaseController { types.add(EnumTemplateType.ACTIVITY_REMIND.getCode()); types.add(EnumTemplateType.LIVE_REMIND.getCode()); types.add(EnumTemplateType.CREDIT_UPD_REMIND.getCode()); + types.add(EnumTemplateType.SEND_COUPON_REMIND.getCode()); wxTemplateMsg.setTypes(types); final PageInfo page = wxTemplateMsgService.listAsPageForMiniApp(wxTemplateMsg, pageNum, pageSize); return new ResultData(page); From a58a5e205952bae678caea53daa9323a520c7a22 Mon Sep 17 00:00:00 2001 From: xhxu Date: Mon, 12 Jul 2021 18:13:29 +0800 Subject: [PATCH 05/27] =?UTF-8?q?=E8=AE=A2=E9=98=85=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxCouponSendServiceImpl.java | 37 +++++++++- .../impl/WxCreditHistoryServiceImpl.java | 68 ++++++++++--------- 2 files changed, 71 insertions(+), 34 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java index b341c1d30..839bdac20 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java @@ -12,6 +12,7 @@ import com.iformall.domain.po.base.BaseEntity; import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.po.msg.AppUniformMsg; import com.iformall.domain.po.msg.MpAppMsg; +import com.iformall.domain.po.msg.WxMsg; import com.iformall.domain.po.msg.WxMsgRecord; import com.iformall.domain.vo.WxCouponSendVo; import com.iformall.enums.*; @@ -68,6 +69,10 @@ public class WxCouponSendServiceImpl implements WxCouponSendService { WxMsgLimitService wxMsgLimitService; @Autowired WxCouponMerchantMapper wxCouponMerchantMapper; + @Autowired + WxTemplateMsgService wxTemplateMsgService; + @Autowired + WxMsgService wxMsgService; @Override public PageInfo listAsPage(WxCouponSend record, Integer pageIndex, Integer pageSize) { @@ -426,8 +431,9 @@ public class WxCouponSendServiceImpl implements WxCouponSendService { setUserId(couponOrder.getCUserId()); }}); if(list != null && list.size() > 0){ - WxCUser cuser = list.get(0); - if(cuser != null){ + for (WxCUser cuser:list) { + //发订阅消息 + sendCouponRemind(send, couponOrder, cuser); // 发送微信模板消息(公众号模板消息/小程序统一消息/小程序模板消息) sendMpMsgForSendCoupon(send, couponOrder, cuser); } @@ -475,6 +481,33 @@ public class WxCouponSendServiceImpl implements WxCouponSendService { } } + private void sendCouponRemind(WxCouponSend send, WxCouponOrder couponOrder,WxCUser cuser){ + try { + WxTemplateMsg temp = new WxTemplateMsg(); + temp.updateTenantInfo(send); + temp.setType(EnumTemplateType.SEND_COUPON_REMIND.getCode()); + temp = wxTemplateMsgService.getByObj(temp); + if(temp.getId() != null){ + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); + WxMsg msg = new WxMsg(); + msg.updateTenantInfo(send); + msg.setPhones(cuser.getOpenId()); + msg.setModelId(temp.getId()); + Map map = new HashMap<>(); + map.put("thing1",send.getTitle()); + map.put("time3",dateFormat.format(couponOrder.getCreateDate())); + map.put("time4",dateFormat.format(couponOrder.getExpiredTime())); + map.put("thing5","你的优惠卷已到账!请立即使用"); + map.put("goToPage","pages/index/index?type=mc"); + msg.setMsg(JSONObject.toJSONString(map)); + wxMsgService.batchSendAppinfo(msg); + } + } catch (Exception e) { +// e.printStackTrace(); + logger.error("发卷消息发送异常"); + } + } + private boolean sendMpMsgForSendCoupon(WxCouponSend send, WxCouponOrder couponOrder, WxCUser user) { // 发送 公众号 模板消息 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java index f3e920e37..48c012249 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java @@ -316,47 +316,51 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { } //发消息 - try { - WxTemplateMsg temp = new WxTemplateMsg(); - temp.updateTenantInfo(record); - temp.setType(EnumTemplateType.CREDIT_UPD_REMIND.getCode()); - temp = wxTemplateMsgService.getByObj(temp); - if(temp.getId() != null){ - List openIds = wxCUserMapper.findOpenIdList(wxCUserBasicInfo.getId(),tenantId); - if(openIds != null && openIds.size() > 0){ - WxMsg msg = new WxMsg(); - msg.updateTenantInfo(record); + sendCreditUpdRemind(wxCUserBasicInfo,record,tenantId); + + + } else { + //wxCreditHistoryMapper.updateById(record); + } + } + return record; + } + + private void sendCreditUpdRemind(WxCUserBasicInfo wxCUserBasicInfo,WxCreditHistory record,String tenantId){ + try { + WxTemplateMsg temp = new WxTemplateMsg(); + temp.updateTenantInfo(record); + temp.setType(EnumTemplateType.CREDIT_UPD_REMIND.getCode()); + temp = wxTemplateMsgService.getByObj(temp); + if(temp.getId() != null){ + List openIds = wxCUserMapper.findOpenIdList(wxCUserBasicInfo.getId(),tenantId); + if(openIds != null && openIds.size() > 0){ + WxMsg msg = new WxMsg(); + msg.updateTenantInfo(record); // msg.setWay(EnumSendWay.APPINFOR.getCode()); // msg.setIsright(EnumMsgSend.MSG_SEND_IMMEDIATELY.getCode()); // msg.setStatus(EnumMsgStatus.MSG_STATUS_NOT_SEND.getCode()); - msg.setPhones(String.join(",", openIds)); - msg.setModelId(temp.getId()); - Map map = new HashMap<>(); - map.put("character_string1",record.getCreditNum().toString()); - map.put("character_string2",record.getCreditAmount().toString()); - map.put("time4",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getCreateDate())); - map.put("thing3",EnumScoreType.getEnum(record.getCreditType()).getMessage()); - map.put("goToPage","pages/index/index?type=jf"); - msg.setMsg(JSONObject.toJSONString(map)); + msg.setPhones(String.join(",", openIds)); + msg.setModelId(temp.getId()); + Map map = new HashMap<>(); + map.put("character_string1",record.getCreditNum().toString()); + map.put("character_string2",record.getCreditAmount().toString()); + map.put("time4",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getCreateDate())); + map.put("thing3",EnumScoreType.getEnum(record.getCreditType()).getMessage()); + map.put("goToPage","pages/index/index?type=jf"); + msg.setMsg(JSONObject.toJSONString(map)); // msg.setName(EnumTemplateType.CREDIT_UPD_REMIND.name()); // msg.setSignature(EnumTemplateType.CREDIT_UPD_REMIND.name()); // wxMsgService.add(msg); - wxMsgService.batchSendAppinfo(msg); - }else{ - logger.error("找不到微信用户"); - } - } - } catch (Exception e) { -// e.printStackTrace(); - logger.error("积分消息发送异常"); + wxMsgService.batchSendAppinfo(msg); + }else{ + logger.error("找不到微信用户"); } - - - } else { - //wxCreditHistoryMapper.updateById(record); } + } catch (Exception e) { +// e.printStackTrace(); + logger.error("积分消息发送异常"); } - return record; } @Override From f0d8365ac57e389abd9abafa9f40ce64cb4058fe Mon Sep 17 00:00:00 2001 From: xhxu Date: Tue, 13 Jul 2021 14:33:38 +0800 Subject: [PATCH 06/27] bug --- .../db/migration/V202107120001__sendMSG.sql | 21 ++++++++++++------- .../service/impl/WxCouponSendServiceImpl.java | 4 ++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/mallinkAdmin/src/main/resources/db/migration/V202107120001__sendMSG.sql b/mallinkAdmin/src/main/resources/db/migration/V202107120001__sendMSG.sql index 3515ed19c..40cfcb8fc 100644 --- a/mallinkAdmin/src/main/resources/db/migration/V202107120001__sendMSG.sql +++ b/mallinkAdmin/src/main/resources/db/migration/V202107120001__sendMSG.sql @@ -1,11 +1,18 @@ -INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`) -select CEILING(RAND()*90000000000+10000000000) ,tenant_id,parent_tenant_id,'',51,'{\"index\": [\"thing1\", \"time3\", \"time4\", \"thing5\"], \"emphasis\": \"\"}',now(),now() -from wx_mall -where id != 1 and id != 10011 and id != 10071 and id != 10141 ; +--INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`) +--select CEILING(RAND()*90000000000+10000000000) ,tenant_id,parent_tenant_id,'',51,'{\"index\": [\"thing1\", \"time3\", \"time4\", \"thing5\"], \"emphasis\": \"\"}',now(),now() +--from wx_mall +--where id != 1 and id != 10011 and id != 10071 and id != 10141 ; -INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1001', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); -INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1007', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); -INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1014', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); +--INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1001', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); +--INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1007', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); +--INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1014', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); + + +--因微信限制一次最多订阅3条订阅消息 +--需要发卷订阅消息 废除直播开播提醒订阅消息EnumTemplateType +INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1003', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); + +delete from `wx_template_msg` where `tenant_id` = '1003' and `type` = 5; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java index 839bdac20..3842fc30c 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java @@ -488,7 +488,7 @@ public class WxCouponSendServiceImpl implements WxCouponSendService { temp.setType(EnumTemplateType.SEND_COUPON_REMIND.getCode()); temp = wxTemplateMsgService.getByObj(temp); if(temp.getId() != null){ - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); WxMsg msg = new WxMsg(); msg.updateTenantInfo(send); msg.setPhones(cuser.getOpenId()); @@ -510,7 +510,7 @@ public class WxCouponSendServiceImpl implements WxCouponSendService { private boolean sendMpMsgForSendCoupon(WxCouponSend send, WxCouponOrder couponOrder, WxCUser user) { // 发送 公众号 模板消息 - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String gotopage = Constant.mainPageUrl + "?type=mc"; // 7. 公众号消息 if (StringUtils.isNotBlank(user.getMpAppId()) && From f3948a84a66bb619f7e70297b69440f1cfa90b9e Mon Sep 17 00:00:00 2001 From: xhxu Date: Tue, 13 Jul 2021 15:26:11 +0800 Subject: [PATCH 07/27] bug --- .../resources/db/migration/V202107120001__sendMSG.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mallinkAdmin/src/main/resources/db/migration/V202107120001__sendMSG.sql b/mallinkAdmin/src/main/resources/db/migration/V202107120001__sendMSG.sql index 40cfcb8fc..abf06a846 100644 --- a/mallinkAdmin/src/main/resources/db/migration/V202107120001__sendMSG.sql +++ b/mallinkAdmin/src/main/resources/db/migration/V202107120001__sendMSG.sql @@ -6,13 +6,13 @@ --where id != 1 and id != 10011 and id != 10071 and id != 10141 ; ---INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1001', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); ---INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1007', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); ---INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1014', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); +--INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1001', NULL, '', 51, '{\"index\": [\"thing1\", \"time3\", \"time4\", \"thing5\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); +--INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1007', NULL, '', 51, '{\"index\": [\"thing1\", \"time3\", \"time4\", \"thing5\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); +--INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1014', NULL, '', 51, '{\"index\": [\"thing1\", \"time3\", \"time4\", \"thing5\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); --因微信限制一次最多订阅3条订阅消息 --需要发卷订阅消息 废除直播开播提醒订阅消息EnumTemplateType -INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1003', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); +INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1003', NULL, '', 51, '{\"index\": [\"thing1\", \"time3\", \"time4\", \"thing5\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0); delete from `wx_template_msg` where `tenant_id` = '1003' and `type` = 5; From c11c8701a2656588489e9ab8e933b6a8247b9110 Mon Sep 17 00:00:00 2001 From: xhxu Date: Tue, 13 Jul 2021 15:47:12 +0800 Subject: [PATCH 08/27] bug --- .../java/com/iformall/service/impl/WxCouponSendServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java index 3842fc30c..3ac311515 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java @@ -497,7 +497,7 @@ public class WxCouponSendServiceImpl implements WxCouponSendService { map.put("thing1",send.getTitle()); map.put("time3",dateFormat.format(couponOrder.getCreateDate())); map.put("time4",dateFormat.format(couponOrder.getExpiredTime())); - map.put("thing5","你的优惠卷已到账!请立即使用"); + map.put("thing5","你的优惠券已到账!请立即使用"); map.put("goToPage","pages/index/index?type=mc"); msg.setMsg(JSONObject.toJSONString(map)); wxMsgService.batchSendAppinfo(msg); From 90c7481daf6f761ff4fbf85393bd6422e31727a7 Mon Sep 17 00:00:00 2001 From: xhxu Date: Tue, 13 Jul 2021 18:25:33 +0800 Subject: [PATCH 09/27] =?UTF-8?q?=E6=94=B6=E9=93=B6=E5=8F=91=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxCouponSendServiceImpl.java | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java index 3ac311515..eb2e4a891 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java @@ -260,32 +260,46 @@ public class WxCouponSendServiceImpl implements WxCouponSendService { if(StringUtils.isBlank(wxCouponSend.getConditions())){ return true; } + if (param.getClass().equals(WxOrder.class)){ WxOrder wxOrder = (WxOrder) param; try { JSONObject jo = JSONObject.parseObject(wxCouponSend.getConditions()); + Long sendId = jo.getLong("id"); + int miniPayment = jo.getIntValue("miniPayment")*100; + if(sendId == null && wxOrder.getPayment().intValue() >= miniPayment){ + return true; + } WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById(wxOrder.getProductId()); - - if (wxMerchantBUser.getMerchantId() != null - && wxMerchantBUser.getMerchantId().equals(jo.getLong("id"))) { + if (sendId != null && wxMerchantBUser.getMerchantId() != null + && wxMerchantBUser.getMerchantId().equals(sendId) + && wxOrder.getPayment().intValue() >= miniPayment) { return true; } + logger.info("收银台发券条件判断--不满足{}"+wxOrder.getId()); } catch (Exception e) { - logger.error("收银发券条件判断错误:ID=" + wxCouponSend.getId() + e.getMessage()); + logger.error("收银台发券条件判断错误:ID=" + wxCouponSend.getId() + e.getMessage()); } }else if(param instanceof BusinessCircleBase){ BusinessCircleBase circleBase = (BusinessCircleBase) param; try { JSONObject jo = JSONObject.parseObject(wxCouponSend.getConditions()); + Long sendId = jo.getLong("id"); + int miniPayment = jo.getIntValue("miniPayment")*100; + if(sendId == null && circleBase.getPayAmount().intValue() >= miniPayment){ + return true; + } - if (circleBase.getMerchantId() != null - && circleBase.getMerchantId().equals(jo.getLong("id"))) { + if (sendId != null && circleBase.getMerchantId() != null + && circleBase.getMerchantId().equals(sendId) + && circleBase.getPayAmount().intValue() >= miniPayment) { return true; } + logger.info("商圈收银发券条件判断--不满足{}"+circleBase.getId()); } catch (Exception e) { - logger.error("收银发券条件判断错误:ID=" + wxCouponSend.getId() + e.getMessage()); + logger.error("商圈收银条件判断错误:ID=" + wxCouponSend.getId() + e.getMessage()); } } @@ -337,7 +351,6 @@ public class WxCouponSendServiceImpl implements WxCouponSendService { BusinessCircleBase circleBase = (BusinessCircleBase) param; cUserId = circleBase.getCUserId(); tenantEntity = circleBase; - break; }else{ return false; } From 051e0f0d61277ef706046eefc0f1ec1a8cac6950 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 14 Jul 2021 10:54:28 +0800 Subject: [PATCH 10/27] =?UTF-8?q?=E9=99=90=E8=B4=AD=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...07140001__wx_coupon_add_use_limit_rule.sql | 100 ++++++++++++++++++ .../java/com/iformall/domain/po/WxCoupon.java | 3 + .../enums/EnumCouponUseLimitRule.java | 37 +++++++ .../service/impl/WxOrderServiceImpl.java | 3 + .../main/resources/mapper/WxCouponMapper.xml | 16 ++- 5 files changed, 157 insertions(+), 2 deletions(-) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V202107140001__wx_coupon_add_use_limit_rule.sql create mode 100644 mallinkService/src/main/java/com/iformall/enums/EnumCouponUseLimitRule.java diff --git a/mallinkAdmin/src/main/resources/db/migration/V202107140001__wx_coupon_add_use_limit_rule.sql b/mallinkAdmin/src/main/resources/db/migration/V202107140001__wx_coupon_add_use_limit_rule.sql new file mode 100644 index 000000000..726360c35 --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V202107140001__wx_coupon_add_use_limit_rule.sql @@ -0,0 +1,100 @@ +ALTER TABLE `wx_coupon_0` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_1` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_2` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_3` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_4` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_5` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_6` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_7` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_8` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_9` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_10` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_11` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_12` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_13` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_14` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_15` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_16` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_17` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_18` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_19` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_20` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_21` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_22` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_23` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_24` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_25` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_26` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_27` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_28` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_29` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_30` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_31` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_32` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_33` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_34` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_35` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_36` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_37` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_38` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_39` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_40` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_41` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_42` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_43` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_44` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_45` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_46` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_47` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_48` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_49` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_50` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_51` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_52` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_53` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_54` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_55` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_56` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_57` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_58` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_59` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_60` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_61` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_62` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_63` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_64` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_65` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_66` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_67` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_68` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_69` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_70` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_71` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_72` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_73` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_74` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_75` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_76` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_77` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_78` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_79` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_80` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_81` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_82` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_83` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_84` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_85` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_86` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_87` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_88` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_89` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_90` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_91` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_92` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_93` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_94` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_95` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_96` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_97` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_98` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; +ALTER TABLE `wx_coupon_99` ADD COLUMN `use_limit_rule` int(1) NOT NULL DEFAULT 1 COMMENT '1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量' AFTER `unit`; \ No newline at end of file diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java b/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java index f1f77aa98..c987285fe 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java @@ -86,6 +86,9 @@ public class WxCoupon extends TenantEntity { private Integer salePrice; @io.swagger.annotations.ApiModelProperty(value="使用条件金额(适用于类型1,2,3,4)",name="usePrice") private Integer usePrice; + //EnumCouponUseLimitRule + @io.swagger.annotations.ApiModelProperty(value="限领规则",name="useLimitRule") + private Integer useLimitRule; @io.swagger.annotations.ApiModelProperty(value="限领张数",name="useLimitQuantity") private Integer useLimitQuantity; @io.swagger.annotations.ApiModelProperty(value="1.主动领取2.定向投放",name="sendType") diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumCouponUseLimitRule.java b/mallinkService/src/main/java/com/iformall/enums/EnumCouponUseLimitRule.java new file mode 100644 index 000000000..9fbfe3a41 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumCouponUseLimitRule.java @@ -0,0 +1,37 @@ +package com.iformall.enums; + +/** + * 商品限购规则 + * Created by Stormeye on 2018/08/09. + */ +public enum EnumCouponUseLimitRule { + + // 1:(默认)限制领取该券总数量 2:只限制券包中未使用的该券数量 + TOTAL_USELIMIT(1, "限制领取该券总数量"), + TOBEUSED_USELIMIT(2, "只限制券包中未使用的该券数量"); + + public static EnumCouponUseLimitRule getEnum(Integer code) { + for (EnumCouponUseLimitRule value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + + private Integer code; + private String message; + + EnumCouponUseLimitRule(Integer code, String message) { + this.code = code; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getMessage() { + return message; + } +} diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java index e184d0b83..fdb7b3802 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java @@ -469,6 +469,9 @@ public class WxOrderServiceImpl implements WxOrderService { couponOrderQ.updateTenantInfo(counpon); couponOrderQ.setCouponId(counpon.getId()); couponOrderQ.setCUserId(user.getId()); + if (counpon.getUseLimitRule().equals(EnumCouponUseLimitRule.TOBEUSED_USELIMIT.getCode())) { + couponOrderQ.setCouponOrderStatus(EnumCouponOrderStatus.COUPON_ORDER_USE_WAIT.getCode()); + } // if (counpon.getSendType().equals(EnumCouponSendType.PASSIVE.getCode())) { // couponOrderQ.setCouponOrderStatus(EnumCouponOrderStatus.COUPON_ORDER_USE_WAIT.getCode()); // } diff --git a/mallinkService/src/main/resources/mapper/WxCouponMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponMapper.xml index 124eebca4..5351d42de 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponMapper.xml @@ -13,6 +13,7 @@ + @@ -64,6 +65,7 @@ + @@ -103,7 +105,7 @@ distinct c.`id`,c.`tenant_id`,c.`parent_tenant_id`,c.`type`,c.`cover_img`,c.`cover_picture`,c.`detail_picture`, - c.`title`,c.`sub_title`,c.`sale_price`,c.`use_price`,c.`use_limit_quantity`,c.`send_type`, + c.`title`,c.`sub_title`,c.`sale_price`,c.`use_price`,c.`use_limit_rule`,c.`use_limit_quantity`,c.`send_type`, c.`valid_type`,c.`valid_start_date`,c.`valid_end_date`,c.pick_start_date,c.pick_end_date,c.`valid_days`,c.`detail`,c.`price`,c.tail_price,c.orig_price,c.`unit`,c.`remain_inventory`,c.`inventory`, c.`remark`,c.`status`,c.`create_date`,c.`update_date`,c.`business`,c.`sub_business`,c.`support_transfer`,c.`subsidy_num`,c.`subsidy_type`, c.`press_limit_num`, c.`press_limit_hours`, c.`auto_refund`,c.`credit_price`,c.`credit_refund`,c.`put_apply_status`,c.`stock_apply_status`,c.`cancle_apply_status`, @@ -152,6 +154,10 @@ and `use_price` = #{usePrice} + + and `use_limit_rule` = #{useLimitRule} + + and `use_limit_quantity` = #{useLimitQuantity} @@ -376,6 +382,10 @@ and c.`use_price` = #{usePrice} + + and c.`use_limit_rule` = #{useLimitRule} + + and c.`use_limit_quantity` = #{useLimitQuantity} @@ -596,6 +606,7 @@ + @@ -644,6 +655,7 @@ + @@ -1137,7 +1149,7 @@ diff --git a/mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml index a83ecfcc4..c26ad46e8 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml @@ -162,7 +162,7 @@ , c.remain_inventory,c.inventory,c.cover_img,c.sub_title,c.sale_price,c.detail, - c.use_price,c.price,c.tail_price,c.orig_price,c.unit,c.use_limit_quantity,c.send_type,c.support_transfer,c.press_limit_num,c.auto_refund,c.conditions, + c.use_price,c.price,c.tail_price,c.orig_price,c.unit,c.use_limit_rule,c.use_limit_quantity,c.send_type,c.support_transfer,c.press_limit_num,c.auto_refund,c.conditions, c.valid_type,c.valid_start_date,c.valid_end_date,c.pick_start_date,c.pick_end_date,c.valid_days,c.credit_price,c.content_type,c.source_type @@ -194,6 +194,7 @@ + @@ -263,7 +264,7 @@ cc.id,cc.coupon_id,cc.target_ad,cc.begin_time,cc.end_time, c.tenant_id,c.parent_tenant_id,c.type,c.cover_img,c.cover_picture,c.detail_picture,c.title,c.sub_title,c.sale_price,c.use_price, - c.use_limit_quantity,c.send_type,c.valid_type,c.valid_start_date,c.valid_end_date,c.pick_start_date,c.pick_end_date, + c.use_limit_rule,c.use_limit_quantity,c.send_type,c.valid_type,c.valid_start_date,c.valid_end_date,c.pick_start_date,c.pick_end_date, c.valid_days,c.detail,c.price,c.tail_price,c.orig_price,c.unit,c.remain_inventory,c.inventory,c.remark,c.status, c.create_date,c.update_date,c.business,c.sub_business,c.support_transfer,c.press_limit_num, c.auto_refund,c.credit_price,c.conditions,c.content_type, cc.qr_code @@ -291,6 +292,7 @@ + @@ -343,6 +345,7 @@ + diff --git a/mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml index 4353c3d91..62f936dd0 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml @@ -16,6 +16,7 @@ + @@ -39,7 +40,7 @@ else '[多商户通用]' end) as merchant_name, - c.remain_inventory, c.use_limit_quantity, c.inventory, c.valid_start_date, c.valid_end_date,c.valid_type,cs.send_sms,c.valid_days + c.remain_inventory, c.use_limit_rule,c.use_limit_quantity, c.inventory, c.valid_start_date, c.valid_end_date,c.valid_type,cs.send_sms,c.valid_days From c4b732556066ddf4f91fbfb55c361c0ef0d5cb9d Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 14 Jul 2021 16:16:47 +0800 Subject: [PATCH 12/27] fajuan --- .../com/iformall/domain/po/BusinessCircleBase.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java b/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java index 636ea6d67..f19704a75 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java @@ -76,10 +76,22 @@ public class BusinessCircleBase extends TenantEntity { private WxMerchant merchant; @Excel(name = "会员ID", width = 20, orderNum = "6") + @TableField(exist = false) + private Long userId; + public Long getUserId(){ + userId = cUserId; + return userId; + } @io.swagger.annotations.ApiModelProperty(value="c端会员id,与第三方对齐",name="cUserId") private Long cUserId; private String cUserNickName; @Excel(name = "会员手机号", width = 20, orderNum = "7") + @TableField(exist = false) + private String userPhone; + public String getUserPhone(){ + userPhone = cUserPhone; + return userPhone; + } private String cUserPhone; @TableField(exist = false) private WxCUserBasicInfo basicInfo; From ca2f5721e1315ccedd939fefb082d184068bb1e6 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 14 Jul 2021 16:41:04 +0800 Subject: [PATCH 13/27] fajuan --- .../main/java/com/iformall/domain/po/BusinessCircleBase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java b/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java index f19704a75..95c0c4109 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java @@ -79,7 +79,7 @@ public class BusinessCircleBase extends TenantEntity { @TableField(exist = false) private Long userId; public Long getUserId(){ - userId = cUserId; + this.userId = this.cUserId; return userId; } @io.swagger.annotations.ApiModelProperty(value="c端会员id,与第三方对齐",name="cUserId") @@ -89,7 +89,7 @@ public class BusinessCircleBase extends TenantEntity { @TableField(exist = false) private String userPhone; public String getUserPhone(){ - userPhone = cUserPhone; + this.userPhone = this.cUserPhone; return userPhone; } private String cUserPhone; From 4e788a5e0b2eb645b3e27999927173beb7821e94 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 14 Jul 2021 16:41:45 +0800 Subject: [PATCH 14/27] fajuan --- .../main/java/com/iformall/domain/po/BusinessCircleBase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java b/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java index 95c0c4109..b21b6191d 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java @@ -80,7 +80,7 @@ public class BusinessCircleBase extends TenantEntity { private Long userId; public Long getUserId(){ this.userId = this.cUserId; - return userId; + return this.userId; } @io.swagger.annotations.ApiModelProperty(value="c端会员id,与第三方对齐",name="cUserId") private Long cUserId; @@ -90,7 +90,7 @@ public class BusinessCircleBase extends TenantEntity { private String userPhone; public String getUserPhone(){ this.userPhone = this.cUserPhone; - return userPhone; + return this.userPhone; } private String cUserPhone; @TableField(exist = false) From 88d09b92547801c6a6c79d3e0b6dcc62396a3bd8 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 14 Jul 2021 16:45:20 +0800 Subject: [PATCH 15/27] daochu --- .../iformall/domain/po/BusinessCircleBase.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java b/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java index b21b6191d..6bdd2422c 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java @@ -77,20 +77,20 @@ public class BusinessCircleBase extends TenantEntity { @Excel(name = "会员ID", width = 20, orderNum = "6") @TableField(exist = false) - private Long userId; - public Long getUserId(){ - this.userId = this.cUserId; - return this.userId; + private String userIdStr; + public String getUserIdStr(){ + this.userIdStr = Long.toString(this.cUserId); + return this.userIdStr; } @io.swagger.annotations.ApiModelProperty(value="c端会员id,与第三方对齐",name="cUserId") private Long cUserId; private String cUserNickName; @Excel(name = "会员手机号", width = 20, orderNum = "7") @TableField(exist = false) - private String userPhone; - public String getUserPhone(){ - this.userPhone = this.cUserPhone; - return this.userPhone; + private String userPhoneStr; + public String getUserPhoneStr(){ + this.userPhoneStr = this.cUserPhone; + return this.userPhoneStr; } private String cUserPhone; @TableField(exist = false) From 28d8b3a3848201e0ca3faadee1641faf433fca41 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 14 Jul 2021 16:54:35 +0800 Subject: [PATCH 16/27] business --- .../java/com/iformall/domain/po/BusinessCircleBase.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java b/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java index 6bdd2422c..bcb448ab5 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java @@ -79,8 +79,7 @@ public class BusinessCircleBase extends TenantEntity { @TableField(exist = false) private String userIdStr; public String getUserIdStr(){ - this.userIdStr = Long.toString(this.cUserId); - return this.userIdStr; + return Long.toString(cUserId); } @io.swagger.annotations.ApiModelProperty(value="c端会员id,与第三方对齐",name="cUserId") private Long cUserId; @@ -89,8 +88,7 @@ public class BusinessCircleBase extends TenantEntity { @TableField(exist = false) private String userPhoneStr; public String getUserPhoneStr(){ - this.userPhoneStr = this.cUserPhone; - return this.userPhoneStr; + return cUserPhone; } private String cUserPhone; @TableField(exist = false) From 6d1e663a00f6475aaca4f09c22f3a73ff1b7602c Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 14 Jul 2021 17:03:01 +0800 Subject: [PATCH 17/27] business --- .../main/java/com/iformall/domain/po/BusinessCircleBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java b/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java index bcb448ab5..f081188ec 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java @@ -79,7 +79,7 @@ public class BusinessCircleBase extends TenantEntity { @TableField(exist = false) private String userIdStr; public String getUserIdStr(){ - return Long.toString(cUserId); + return cUserId == null?"":Long.toString(cUserId); } @io.swagger.annotations.ApiModelProperty(value="c端会员id,与第三方对齐",name="cUserId") private Long cUserId; From b5ccbce56e17bf6f669d0a3ebd5d59cbd1965521 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 14 Jul 2021 18:02:21 +0800 Subject: [PATCH 18/27] business --- .../java/com/iformall/service/impl/WxCouponSendServiceImpl.java | 2 ++ .../main/java/com/iformall/service/impl/WxOrderServiceImpl.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java index eb2e4a891..1ff2a3ca5 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java @@ -257,6 +257,8 @@ public class WxCouponSendServiceImpl implements WxCouponSendService { return false; } else if (wxCouponSend.getSendType().equals(EnumCouponSendSendType.B_MICROPAY.getCode())) { + logger.info("wxCouponSend{}"+wxCouponSend.toString()); + logger.info("param{}"+param.toString()); if(StringUtils.isBlank(wxCouponSend.getConditions())){ return true; } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java index fdb7b3802..b9de00f4a 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java @@ -542,7 +542,7 @@ public class WxOrderServiceImpl implements WxOrderService { //解锁 redisLock.unlock(couponIdStr, timeStr); logger.error("此券购买数量已超限, couponId: " + couponIdStr + ", count: " + count); - throw new MallinkException(ErrorCode.ORDER_IS_LIMITED.getCode(), coupon.getTitle() + ErrorCode.ORDER_IS_LIMITED.getMessage()); + throw new MallinkException(ErrorCode.ORDER_IS_LIMITED.getCode(), coupon.getTitle() + " 已超限购"); } try { From f1afdb637072997f5dafb40c9a7ff7394daae491 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 14 Jul 2021 18:06:09 +0800 Subject: [PATCH 19/27] business --- .../java/com/iformall/service/impl/WxCouponSendServiceImpl.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java index 1ff2a3ca5..eb2e4a891 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java @@ -257,8 +257,6 @@ public class WxCouponSendServiceImpl implements WxCouponSendService { return false; } else if (wxCouponSend.getSendType().equals(EnumCouponSendSendType.B_MICROPAY.getCode())) { - logger.info("wxCouponSend{}"+wxCouponSend.toString()); - logger.info("param{}"+param.toString()); if(StringUtils.isBlank(wxCouponSend.getConditions())){ return true; } From 8978d1185d52edec54a9835f1e4051a7cf3cc36d Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 14 Jul 2021 18:35:28 +0800 Subject: [PATCH 20/27] business --- .../market/WxThirdPartyOrdersController.java | 15 ++ .../domain/vo/WxThirdPartyOrdersVo.java | 160 ++++++++++++++++++ .../mapper/WxThirdPartyOrdersMapper.java | 2 + .../service/WxThirdPartyOrdersService.java | 2 + .../impl/WxThirdPartyOrdersServiceImpl.java | 9 +- .../mapper/WxThirdPartyOrdersMapper.xml | 7 + 6 files changed, 193 insertions(+), 2 deletions(-) create mode 100644 mallinkService/src/main/java/com/iformall/domain/vo/WxThirdPartyOrdersVo.java diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxThirdPartyOrdersController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxThirdPartyOrdersController.java index 6dba30a2a..30a96009d 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxThirdPartyOrdersController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxThirdPartyOrdersController.java @@ -8,6 +8,7 @@ import com.iformall.controller.base.BaseController; import com.iformall.domain.po.AliBusinessCircleOrder; import com.iformall.domain.po.WxThirdPartyOrders; import com.iformall.domain.po.base.BaseEntity; +import com.iformall.enums.EnumThirdOrderType; import com.iformall.service.WxThirdPartyOrdersService; import com.iformall.utils.Constant; import io.swagger.annotations.Api; @@ -83,7 +84,21 @@ public class WxThirdPartyOrdersController extends BaseController { } circleOrder.updateTenantInfo(getTenantInfo()); circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); + circleOrder.setSourceType(EnumThirdOrderType.RMB_PAY.getCode()); wxThirdPartyOrdersOrderService.exportData(circleOrder, request, response); } + @GetMapping("exportDataVo") + @SystemControllerLog(description = "券订单数据-导出数据") + public void exportDataVo(@ModelAttribute WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response) { + logger.debug("[" + getIpAddr() + "] WxThirdPartyOrdersController::exportDataVo"); + if (null == circleOrder) { + circleOrder = new WxThirdPartyOrders(); + } + circleOrder.updateTenantInfo(getTenantInfo()); + circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); + circleOrder.setSourceType(EnumThirdOrderType.CREDIT_PAY.getCode()); + wxThirdPartyOrdersOrderService.exportDataVo(circleOrder, request, response); + } + } diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxThirdPartyOrdersVo.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxThirdPartyOrdersVo.java new file mode 100644 index 000000000..b518a8107 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxThirdPartyOrdersVo.java @@ -0,0 +1,160 @@ +package com.iformall.domain.vo; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.iformall.domain.po.BusinessCircleBase; +import com.iformall.domain.po.WxCUserBasicInfo; +import com.iformall.domain.po.WxMerchant; +import com.iformall.domain.po.base.TenantEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import java.math.BigDecimal; +import java.util.Date; + + +@Data +@ToString(callSuper = true) +@EqualsAndHashCode(callSuper = true) +public class WxThirdPartyOrdersVo extends TenantEntity { + + protected Long id; + + @io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知Id",name="noticeId") + private String noticeId; + + @io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知创建时间",name="noticeCreateTime") + private Date noticeCreateTime; + + @io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知类型:MALL_TRANSACTION.SUCCESS",name="noticeEventType") + private String noticeEventType; + + @Excel(name = "摘要", width = 20, orderNum = "8") + @io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知回调摘要",name="summary") + private String summary; + + @Excel(name = "抵扣时间", width = 20, orderNum = "4", format = "yyyy-MM-dd HH:mm:ss") + @io.swagger.annotations.ApiModelProperty(value="交易完成时间",name="timeEnd") + private Date timeEnd; + + @io.swagger.annotations.ApiModelProperty(value="用户实际消费金额,单位(分)",name="amount") + private Integer amount; + + @TableField(exist = false) + @io.swagger.annotations.ApiModelProperty(value="用户实际消费金额,单位(元)",name="amountStr") + private String amountStr; + + public String getAmountStr() { + return amount != null ? new BigDecimal(amount).divide(new BigDecimal(100)).toPlainString(): amountStr; + } + + @Excel(name = "积分数量", width = 20, orderNum = "5") + @io.swagger.annotations.ApiModelProperty(value="用户实际付款金额,单位(分)",name="payAmount") + private Integer payAmount; + + @TableField(exist = false) + @io.swagger.annotations.ApiModelProperty(value="用户实际付款金额,单位(元)",name="payAmountStr") + private String payAmountStr; + + public String getPayAmountStr() { + return payAmount != null ? new BigDecimal(payAmount).divide(new BigDecimal(100)).toPlainString(): payAmountStr; + } + + @Excel(name = "订单编号", width = 20, orderNum = "3") + @io.swagger.annotations.ApiModelProperty(value="支付订单号",name="transactionId") + private String transactionId; + + @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createTime") + private Date createTime; + + @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateTime") + private Date updateTime; + + @io.swagger.annotations.ApiModelProperty(value="门店Id,与第三方对齐",name="merchantId") + private Long merchantId; + @Excel(name = "门店名称", width = 20, orderNum = "2") + private String merchantName; + @TableField(exist = false) + private WxMerchant merchant; + + @Excel(name = "会员ID", width = 20, orderNum = "6") + @TableField(exist = false) + private String userIdStr; + public String getUserIdStr(){ + return cUserId == null?"":Long.toString(cUserId); + } + @io.swagger.annotations.ApiModelProperty(value="c端会员id,与第三方对齐",name="cUserId") + private Long cUserId; + private String cUserNickName; + @Excel(name = "会员手机号", width = 20, orderNum = "7") + @TableField(exist = false) + private String userPhoneStr; + public String getUserPhoneStr(){ + return cUserPhone; + } + private String cUserPhone; + @TableField(exist = false) + private WxCUserBasicInfo basicInfo; + + @io.swagger.annotations.ApiModelProperty(value="是否获得积分(1:是,0:否)",name="earnPoints") + private Integer earnPoints; + + @io.swagger.annotations.ApiModelProperty(value="订单更新积分值",name="increasedPoints") + private Integer increasedPoints; + + @io.swagger.annotations.ApiModelProperty(value="积分更新时间(新增)",name="increasedPoints") + private Date pointsUpdateTime; + + @io.swagger.annotations.ApiModelProperty(value="是否退款(1:是,0:否)",name="isRefund") + private Integer isRefund; + + @io.swagger.annotations.ApiModelProperty(value="正常订单状态(is_refund=0时)1:部分退款2:订单关闭",name="orderStatus") + private Integer orderStatus; + + @io.swagger.annotations.ApiModelProperty(value="微信支付退款单号",name="refundId") + private String refundId; + + @TableField(exist = false) + @io.swagger.annotations.ApiModelProperty(value="查询-开始时间",name="startdate") + private Date startTime; + + @TableField(exist = false) + @io.swagger.annotations.ApiModelProperty(value="查询-结束时间",name="enddate") + private Date endTime; + + @io.swagger.annotations.ApiModelProperty(value="用户退款金额,单位(分)",name="refundAmount") + private Integer refundAmount; + + @TableField(exist = false) + @io.swagger.annotations.ApiModelProperty(value="用户退款金额,单位(元)",name="refundAmountStr") + private String refundAmountStr; + + public String getRefundAmountStr() { + return refundAmount != null ? new BigDecimal(refundAmount).divide(new BigDecimal(100)).toPlainString(): refundAmountStr; + } + + @io.swagger.annotations.ApiModelProperty(value="来源(wx_third_party_api)",name="sourceAppId") + private String sourceAppId; + @TableField(exist = false) + @io.swagger.annotations.ApiModelProperty(value="来源(wx_third_party_api)",name="sourceAppName") + private String sourceAppName; + + @io.swagger.annotations.ApiModelProperty(value="1:RMB订单;2:积分订单",name="sourceType") + private Integer sourceType; + + @io.swagger.annotations.ApiModelProperty(value="门店名称",name="shopName") + private String shopName; + + @Excel(name = "门店编码", width = 20, orderNum = "1") + @io.swagger.annotations.ApiModelProperty(value="门店编号",name="shopNumber") + private String shopNumber; + + @io.swagger.annotations.ApiModelProperty(value="顾客手机号",name="userPhone") + private String userPhone; + + @io.swagger.annotations.ApiModelProperty(value="顾客编号",name="userNumber") + private String userNumber; + +} diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxThirdPartyOrdersMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxThirdPartyOrdersMapper.java index 06a2e8c92..c4be6bc8a 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxThirdPartyOrdersMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxThirdPartyOrdersMapper.java @@ -3,6 +3,7 @@ package com.iformall.mapper; import com.iformall.common.CommonMapper; import com.iformall.domain.po.WxThirdPartyOrders; +import com.iformall.domain.vo.WxThirdPartyOrdersVo; import java.util.List; @@ -10,6 +11,7 @@ import java.util.List; public interface WxThirdPartyOrdersMapper extends CommonMapper { List findList(WxThirdPartyOrders record); + List findListVo(WxThirdPartyOrders circleOrder); WxThirdPartyOrders getById(WxThirdPartyOrders record); diff --git a/mallinkService/src/main/java/com/iformall/service/WxThirdPartyOrdersService.java b/mallinkService/src/main/java/com/iformall/service/WxThirdPartyOrdersService.java index 62c1d3b77..49b749efc 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxThirdPartyOrdersService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxThirdPartyOrdersService.java @@ -58,4 +58,6 @@ public interface WxThirdPartyOrdersService { void pointDeduction(WxThirdPartyOrders record); void exportData(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response); + + void exportDataVo(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response); } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxThirdPartyOrdersServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxThirdPartyOrdersServiceImpl.java index 16e025847..9b1f26da2 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxThirdPartyOrdersServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxThirdPartyOrdersServiceImpl.java @@ -7,6 +7,7 @@ import com.iformall.common.IdWorker; import com.iformall.common.ResultData; import com.iformall.domain.po.*; import com.iformall.domain.po.base.TenantEntity; +import com.iformall.domain.vo.WxThirdPartyOrdersVo; import com.iformall.enums.*; import com.iformall.exception.MallinkException; import com.iformall.mapper.WxThirdPartyOrdersMapper; @@ -452,8 +453,12 @@ public class WxThirdPartyOrdersServiceImpl implements WxThirdPartyOrdersService @Override public void exportData(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response) { List list = wxThirdPartyOrdersMapper.findList(circleOrder); - excelService.exportExcel(list, null, "三方交易", WxThirdPartyOrders.class, "三方交易.xlsx", response, false); + excelService.exportExcel(list, null, "第三方订单交易", WxThirdPartyOrders.class, "第三方订单交易.xlsx", response, false); } - + @Override + public void exportDataVo(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response) { + List list = wxThirdPartyOrdersMapper.findListVo(circleOrder); + excelService.exportExcel(list, null, "第三方积分抵扣", WxThirdPartyOrdersVo.class, "第三方积分抵扣.xlsx", response, false); + } } diff --git a/mallinkService/src/main/resources/mapper/WxThirdPartyOrdersMapper.xml b/mallinkService/src/main/resources/mapper/WxThirdPartyOrdersMapper.xml index 9e3780f4c..70e8e061c 100644 --- a/mallinkService/src/main/resources/mapper/WxThirdPartyOrdersMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxThirdPartyOrdersMapper.xml @@ -157,6 +157,13 @@ + +