Просмотр исходного кода

Merge branch 'release_toaliyun_real' of https://git.malls.iformall.com/server/formallProject into release_toaliyun_real

release_toaliyun_real
xiaohanzi 4 лет назад
Родитель
Сommit
5c99d73d02
38 измененных файлов: 673 добавлений и 78 удалений
  1. +17
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/market/AliBusinessCircleOrderController.java
  2. +16
    -2
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxBusinessCircleOrderController.java
  3. +31
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxThirdPartyOrdersController.java
  4. +1
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/msg/WxMsgController.java
  5. +35
    -0
      mallinkAdmin/src/main/resources/db/migration/V202107120001__sendMSG.sql
  6. +100
    -0
      mallinkAdmin/src/main/resources/db/migration/V202107140001__wx_coupon_add_use_limit_rule.sql
  7. Двоичные данные
      mallinkAdmin/src/main/resources/doc/支付宝自助积分客户准备资料.docx
  8. Двоичные данные
      mallinkAdmin/src/main/resources/doc/支付宝自助积分接入文档.docx
  9. +1
    -0
      mallinkCApi/src/main/java/com/iformall/controller/WxMsgController.java
  10. +3
    -3
      mallinkPublicApi/src/main/java/com/iformall/utils/AppTest.java
  11. +2
    -1
      mallinkService/src/main/java/com/iformall/domain/po/AliBusinessCircleOrder.java
  12. +22
    -0
      mallinkService/src/main/java/com/iformall/domain/po/BusinessCircleBase.java
  13. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBusinessCircleOrder.java
  14. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java
  15. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxThirdPartyOrders.java
  16. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/WxCouponChannelVo.java
  17. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/WxCouponSendVo.java
  18. +160
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/WxThirdPartyOrdersVo.java
  19. +37
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumCouponUseLimitRule.java
  20. +1
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumTemplateType.java
  21. +2
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxThirdPartyOrdersMapper.java
  22. +3
    -0
      mallinkService/src/main/java/com/iformall/service/AliBusinessCircleOrderService.java
  23. +3
    -0
      mallinkService/src/main/java/com/iformall/service/WxBusinessCircleOrderService.java
  24. +5
    -0
      mallinkService/src/main/java/com/iformall/service/WxThirdPartyOrdersService.java
  25. +19
    -6
      mallinkService/src/main/java/com/iformall/service/impl/AliBusinessCircleOrderServiceImpl.java
  26. +19
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxBusinessCircleOrderServiceImpl.java
  27. +63
    -10
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java
  28. +36
    -32
      mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java
  29. +13
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxMsgServiceImpl.java
  30. +5
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java
  31. +11
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxTemplateMsgServiceImpl.java
  32. +24
    -8
      mallinkService/src/main/java/com/iformall/service/impl/WxThirdPartyOrdersServiceImpl.java
  33. +2
    -1
      mallinkService/src/main/resources/mapper/WxCouponCarMapper.xml
  34. +5
    -2
      mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml
  35. +14
    -2
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml
  36. +2
    -1
      mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml
  37. +7
    -0
      mallinkService/src/main/resources/mapper/WxThirdPartyOrdersMapper.xml
  38. +1
    -0
      mallinkTTAdmin/src/main/java/com/iformall/controller/msg/WxMsgController.java

+ 17
- 1
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);
}


}

+ 16
- 2
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);
}


}

+ 31
- 1
mallinkAdmin/src/main/java/com/iformall/controller/market/WxThirdPartyOrdersController.java Просмотреть файл

@@ -5,8 +5,10 @@ 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.enums.EnumThirdOrderType;
import com.iformall.service.WxThirdPartyOrdersService;
import com.iformall.utils.Constant;
import io.swagger.annotations.Api;
@@ -22,6 +24,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 +44,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 +75,30 @@ 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);
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);
}

}

+ 1
- 0
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<WxTemplateMsg> page = wxTemplateMsgService.listAsPageForMiniApp(wxTemplateMsg, pageNum, pageSize);
return new ResultData(page);


+ 35
- 0
mallinkAdmin/src/main/resources/db/migration/V202107120001__sendMSG.sql Просмотреть файл

@@ -0,0 +1,35 @@


--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\": [\"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);


--测试环境 直播消息
--记录789测试的直播订阅消息
--INSERT INTO `mallink`.`wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (44, '789', NULL, '8Ze_M87ejMPBIOiYqxQFgxboAZVyadwBDhpQkVQIrvA', 5, '{\"index\": [\"thing1\", \"date3\", \"thing4\", \"thing5\"], \"emphasis\": \"\"}', '2018-10-15 06:14:11', '2020-11-10 16:45:17', 0);


--生产测试
--INSERT INTO `mallink`.`wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (45913599326, '789', NULL, 'vuQ0lzIY13HOMS7lAQDG7DbG7yGgJM7FKUkQR3bHlPQ', 5, '{\"index\": [\"thing1\", \"date3\", \"thing4\", \"thing5\"], \"emphasis\": \"\"}', '2020-11-11 11:11:11', '2020-11-19 01:56:56', 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), '789', 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` = '789' and `type` = 5;


--因微信限制一次最多订阅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\": [\"thing1\", \"time3\", \"time4\", \"thing5\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0);

--记录西子生产即将废除的直播订阅消息
--INSERT INTO `mallink`.`wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (53676481940, '1003', NULL, 'gjeyOdVyrLyygptaPO3eevA7eUONzYYDxOzDGZkduXM', 5, '{\"index\": [\"thing1\", \"date3\", \"thing4\", \"thing5\"], \"emphasis\": \"\"}', '2020-11-11 11:11:11', '2020-11-19 11:28:33', 0);

delete from `wx_template_msg` where `tenant_id` = '1003' and `type` = 5;




+ 100
- 0
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`;

Двоичные данные
mallinkAdmin/src/main/resources/doc/支付宝自助积分客户准备资料.docx Просмотреть файл


Двоичные данные
mallinkAdmin/src/main/resources/doc/支付宝自助积分接入文档.docx Просмотреть файл


+ 1
- 0
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<WxTemplateMsg> page = wxTemplateMsgService.listAsPageForMiniApp(wxTemplateMsg, pageNum, pageSize);
return new ResultData(page);


+ 3
- 3
mallinkPublicApi/src/main/java/com/iformall/utils/AppTest.java Просмотреть файл

@@ -54,10 +54,10 @@ public class AppTest {
paramMap.put("transactionId",String.valueOf(idWorker.nextId()));//***订单Id
paramMap.put("shopNumber","1001");//***门店唯一标识 对应双方平台门店
// paramMap.put("shopName","百丽");//门店名称
paramMap.put("userNumber","564603843541262336");//***会员Id
paramMap.put("userNumber","516625539215818752");//***会员Id
// paramMap.put("userPhone","18872592633");//会员手机号
paramMap.put("timeEnd","2021-06-16 15:28:00");//***付款时间(yyyy-MM-dd HH:mm:ss)
paramMap.put("amount","1000");//***付款金额(分)
paramMap.put("timeEnd","2021-07-20 14:18:00");//***付款时间(yyyy-MM-dd HH:mm:ss)
paramMap.put("amount","1800");//***付款金额(分)
// paramMap.put("summary","");//付款摘要

/**


+ 2
- 1
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;



+ 22
- 0
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,43 @@ 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")
@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;

@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;



+ 2
- 0
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;



+ 3
- 0
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")


+ 2
- 0
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;



+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/vo/WxCouponChannelVo.java Просмотреть файл

@@ -52,6 +52,9 @@ public class WxCouponChannelVo extends WxCouponChannel implements Serializable {
@io.swagger.annotations.ApiModelProperty(value="单位0:钱分,1:小时",name="unit")
private Integer unit;

//EnumCouponUseLimitRule
@io.swagger.annotations.ApiModelProperty(value="限领规则",name="useLimitRule")
private Integer useLimitRule;
@io.swagger.annotations.ApiModelProperty(value="限领张数",name="useLimitQuantity")
private Integer useLimitQuantity;



+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/vo/WxCouponSendVo.java Просмотреть файл

@@ -20,6 +20,9 @@ public class WxCouponSendVo extends WxCouponSend implements Serializable{
@io.swagger.annotations.ApiModelProperty(value="剩余库存",name="remainInventory")
private Integer remainInventory;

//EnumCouponUseLimitRule
@io.swagger.annotations.ApiModelProperty(value="限领规则",name="useLimitRule")
private Integer useLimitRule;
@io.swagger.annotations.ApiModelProperty(value="限领张数",name="useLimitQuantity")
private Integer useLimitQuantity;



+ 160
- 0
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;

}

+ 37
- 0
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;
}
}

+ 1
- 0
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, "公众号卡券核销通知",""), // 公众号


+ 2
- 0
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<WxThirdPartyOrders, Long> {
List<WxThirdPartyOrders> findList(WxThirdPartyOrders record);
List<WxThirdPartyOrdersVo> findListVo(WxThirdPartyOrders circleOrder);

WxThirdPartyOrders getById(WxThirdPartyOrders record);



+ 3
- 0
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);
}

+ 3
- 0
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);
}

+ 5
- 0
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,7 @@ public interface WxThirdPartyOrdersService {
*/
void pointDeduction(WxThirdPartyOrders record);

void exportData(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response);

void exportDataVo(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response);
}

+ 19
- 6
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;

@@ -169,6 +174,13 @@ public class AliBusinessCircleOrderServiceImpl implements AliBusinessCircleOrder
redisLock.unlock(lockKey, timeStr);
return new ResultData(0);
}

try {
wxCouponSendService.sendCouponToUser(EnumCouponSendSendType.B_MICROPAY, record,EnumPayWay.PAY_WAY_NOT_UNPAY_B_MA);
} catch (Exception e) {
logger.error("支付发券: " + e.getMessage());
}

Integer businessId = EnumBusiness.BUSINESS_ID6.getCode();
if(wxMerchant != null){
businessId = wxMerchant.getBusinessId();
@@ -198,12 +210,6 @@ public class AliBusinessCircleOrderServiceImpl implements AliBusinessCircleOrder
record.setPointsUpdateTime(creditHistory.getCreateDate());
this.updatePoints(record);

try {
wxCouponSendService.sendCouponToUser(EnumCouponSendSendType.B_MICROPAY, record,EnumPayWay.PAY_WAY_NOT_UNPAY_B_MA);
} catch (Exception e) {
logger.error("支付发券: " + e.getMessage());
}

redisLock.unlock(lockKey, timeStr);
return new ResultData(creditNum);
}
@@ -346,4 +352,11 @@ public class AliBusinessCircleOrderServiceImpl implements AliBusinessCircleOrder
aliBusinessCircleOrderMapper.updatePoints(record);
}

@Override
public void exportData(AliBusinessCircleOrder circleOrder, HttpServletRequest request, HttpServletResponse response) {
List<AliBusinessCircleOrder> list = aliBusinessCircleOrderMapper.findList(circleOrder);
excelService.exportExcel(list, null, "支付宝商圈交易", AliBusinessCircleOrder.class, "支付宝商圈交易.xlsx", response, false);

}

}

+ 19
- 6
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;

@@ -163,8 +168,16 @@ public class WxBusinessCircleOrderServiceImpl implements WxBusinessCircleOrderSe
}

wxBusinessCircleOrderMapper.insertNoticeOrder(record);

Integer creditNum = 0;
if(record.getCUserId() != null){

try {
wxCouponSendService.sendCouponToUser(EnumCouponSendSendType.B_MICROPAY, record,EnumPayWay.PAY_WAY_NOT_UNPAY_B_MA);
} catch (Exception e) {
logger.error("支付发券: " + e.getMessage());
}

Integer businessId = EnumBusiness.BUSINESS_ID6.getCode();
if(wxMerchant != null){
businessId = wxMerchant.getBusinessId();
@@ -194,12 +207,6 @@ public class WxBusinessCircleOrderServiceImpl implements WxBusinessCircleOrderSe
record.setPointsUpdateTime(creditHistory.getCreateDate());
this.updatePoints(record);

try {
wxCouponSendService.sendCouponToUser(EnumCouponSendSendType.B_MICROPAY, record,EnumPayWay.PAY_WAY_NOT_UNPAY_B_MA);
} catch (Exception e) {
logger.error("支付发券: " + e.getMessage());
}

if(StringUtils.isNotBlank(record.getNoticeId())){
//同步积分
wxCallBackService.notifyPoints(record);
@@ -359,5 +366,11 @@ public class WxBusinessCircleOrderServiceImpl implements WxBusinessCircleOrderSe
wxBusinessCircleOrderMapper.updateIsPointsNotify(record);
}

@Override
public void exportData(WxBusinessCircleOrder circleOrder, HttpServletRequest request, HttpServletResponse response) {
List<WxBusinessCircleOrder> list = wxBusinessCircleOrderMapper.findList(circleOrder);
excelService.exportExcel(list, null, "微信商圈交易", WxBusinessCircleOrder.class, "微信商圈交易.xlsx", response, false);
}


}

+ 63
- 10
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<WxCouponSendVo> listAsPage(WxCouponSend record, Integer pageIndex, Integer pageSize) {
@@ -255,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());
}
}

@@ -426,8 +445,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,9 +495,42 @@ 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");
WxMsg msg = new WxMsg();
msg.updateTenantInfo(send);
msg.setPhones(cuser.getOpenId());
msg.setModelId(temp.getId());
Map<String,String> 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","你的优惠券已到账!请立即使用");
if(EnumCouponType.COUPON_TINGCHE.getCode().equals(couponOrder.getCouponType())
|| EnumCouponType.COUPON_CREDIT_PARK.getCode().equals(couponOrder.getCouponType())){
map.put("goToPage","pages/index/index?type=in");
}else{
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");
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String gotopage = Constant.mainPageUrl + "?type=mc";
// 7. 公众号消息
if (StringUtils.isNotBlank(user.getMpAppId()) &&


+ 36
- 32
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<String> 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<String> 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<String,String> 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<String,String> 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


+ 13
- 0
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;
}


+ 5
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java Просмотреть файл

@@ -469,9 +469,12 @@ public class WxOrderServiceImpl implements WxOrderService {
couponOrderQ.updateTenantInfo(counpon);
couponOrderQ.setCouponId(counpon.getId());
couponOrderQ.setCUserId(user.getId());
if (counpon.getSendType().equals(EnumCouponSendType.PASSIVE)) {
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());
// }
return wxCouponOrderMapper.findCount(couponOrderQ);
} catch (Exception e) {
logger.error("购买是否超限-DB, couponId: " + counpon.getId() + ", e:" + e.getMessage());
@@ -539,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 {


+ 11
- 0
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);
}


+ 24
- 8
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;
@@ -20,9 +21,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 +35,9 @@ public class WxThirdPartyOrdersServiceImpl implements WxThirdPartyOrdersService

private static final String THIRD_CIRCLE_KEY = "CIRCLE:TH:";

@Autowired
ExcelService excelService;

@Autowired
RedisLock redisLock;

@@ -169,6 +176,13 @@ public class WxThirdPartyOrdersServiceImpl implements WxThirdPartyOrdersService
redisLock.unlock(lockKey, timeStr);
return new ResultData(0);
}

try {
wxCouponSendService.sendCouponToUser(EnumCouponSendSendType.B_MICROPAY, record,EnumPayWay.PAY_WAY_NOT_UNPAY_B_MA);
} catch (Exception e) {
logger.error("支付发券: " + e.getMessage());
}

Integer businessId = EnumBusiness.BUSINESS_ID6.getCode();
if(wxMerchant != null){
businessId = wxMerchant.getBusinessId();
@@ -198,12 +212,6 @@ public class WxThirdPartyOrdersServiceImpl implements WxThirdPartyOrdersService
record.setPointsUpdateTime(creditHistory.getCreateDate());
this.updatePoints(record);

try {
wxCouponSendService.sendCouponToUser(EnumCouponSendSendType.B_MICROPAY, record,EnumPayWay.PAY_WAY_NOT_UNPAY_B_MA);
} catch (Exception e) {
logger.error("支付发券: " + e.getMessage());
}

redisLock.unlock(lockKey, timeStr);
return new ResultData(creditNum);
}
@@ -441,9 +449,17 @@ public class WxThirdPartyOrdersServiceImpl implements WxThirdPartyOrdersService
redisLock.unlock(lockKey, timeStr);
}
}


}

@Override
public void exportData(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response) {
List<WxThirdPartyOrders> list = wxThirdPartyOrdersMapper.findList(circleOrder);
excelService.exportExcel(list, null, "第三方订单交易", WxThirdPartyOrders.class, "第三方订单交易.xlsx", response, false);
}

@Override
public void exportDataVo(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response) {
List<WxThirdPartyOrdersVo> list = wxThirdPartyOrdersMapper.findListVo(circleOrder);
excelService.exportExcel(list, null, "第三方积分抵扣", WxThirdPartyOrdersVo.class, "第三方积分抵扣.xlsx", response, false);
}
}

+ 2
- 1
mallinkService/src/main/resources/mapper/WxCouponCarMapper.xml Просмотреть файл

@@ -109,6 +109,7 @@
<result column="sub_title" jdbcType="VARCHAR" property="subTitle" />
<result column="sale_price" jdbcType="INTEGER" property="salePrice" />
<result column="use_price" jdbcType="INTEGER" property="usePrice" />
<result column="use_limit_rule" jdbcType="INTEGER" property="useLimitRule" />
<result column="use_limit_quantity" jdbcType="INTEGER" property="useLimitQuantity" />
<result column="send_type" jdbcType="INTEGER" property="sendType" />
<result column="valid_type" jdbcType="INTEGER" property="validType" />
@@ -133,7 +134,7 @@
</resultMap>

<sql id="CouponCarColumns">
c.id,c.tenant_id,c.parent_tenant_id,c.type,c.cover_img,c.cover_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.valid_days,c.detail,c.price,c.unit,c.remain_inventory,c.inventory,c.remark,c.status,c.create_date,c.update_date,c.business,
c.id,c.tenant_id,c.parent_tenant_id,c.type,c.cover_img,c.cover_picture,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.valid_days,c.detail,c.price,c.unit,c.remain_inventory,c.inventory,c.remark,c.status,c.create_date,c.update_date,c.business,
car.vendor_type, car.vendor_params,c.credit_price, c.`auto_refund`, c.content_type
</sql>
<select id="findVoDetail" parameterType="java.lang.Long" resultMap="CouponCarMap">


+ 5
- 2
mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml Просмотреть файл

@@ -162,7 +162,7 @@
<sql id="CouponChannelVoColumns">
<include refid="allColumns" />,
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
</sql>

@@ -194,6 +194,7 @@
<result column="orig_price" jdbcType="INTEGER" property="origPrice"/>
<result column="unit" jdbcType="INTEGER" property="unit"/>
<result column="detail" jdbcType="VARCHAR" property="detail"/>
<result column="use_limit_rule" jdbcType="INTEGER" property="useLimitRule" />
<result column="use_limit_quantity" jdbcType="INTEGER" property="useLimitQuantity"/>
<result column="send_type" jdbcType="INTEGER" property="sendType"/>
<result column="support_transfer" jdbcType="INTEGER" property="supportTransfer"/>
@@ -263,7 +264,7 @@
<sql id="WxCouponCVoColumn">
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 @@
<result column="sub_title" jdbcType="VARCHAR" property="subTitle"/>
<result column="sale_price" jdbcType="INTEGER" property="salePrice"/>
<result column="use_price" jdbcType="INTEGER" property="usePrice"/>
<result column="use_limit_rule" jdbcType="INTEGER" property="useLimitRule" />
<result column="use_limit_quantity" jdbcType="INTEGER" property="useLimitQuantity"/>
<result column="send_type" jdbcType="INTEGER" property="sendType"/>
<result column="valid_type" jdbcType="INTEGER" property="validType"/>
@@ -343,6 +345,7 @@
<result column="sub_title" jdbcType="VARCHAR" property="subTitle"/>
<result column="sale_price" jdbcType="INTEGER" property="salePrice"/>
<result column="use_price" jdbcType="INTEGER" property="usePrice"/>
<result column="use_limit_rule" jdbcType="INTEGER" property="useLimitRule" />
<result column="use_limit_quantity" jdbcType="INTEGER" property="useLimitQuantity"/>
<result column="send_type" jdbcType="INTEGER" property="sendType"/>
<result column="valid_type" jdbcType="INTEGER" property="validType"/>


+ 14
- 2
mallinkService/src/main/resources/mapper/WxCouponMapper.xml Просмотреть файл

@@ -13,6 +13,7 @@
<result column="sub_title" jdbcType="VARCHAR" property="subTitle"/>
<result column="sale_price" jdbcType="INTEGER" property="salePrice"/>
<result column="use_price" jdbcType="INTEGER" property="usePrice"/>
<result column="use_limit_rule" jdbcType="INTEGER" property="useLimitRule"/>
<result column="use_limit_quantity" jdbcType="INTEGER" property="useLimitQuantity"/>
<result column="send_type" jdbcType="INTEGER" property="sendType"/>
<result column="valid_type" jdbcType="INTEGER" property="validType"/>
@@ -64,6 +65,7 @@
<result column="sub_title" jdbcType="VARCHAR" property="subTitle"/>
<result column="sale_price" jdbcType="INTEGER" property="salePrice"/>
<result column="use_price" jdbcType="INTEGER" property="usePrice"/>
<result column="use_limit_rule" jdbcType="INTEGER" property="useLimitRule"/>
<result column="use_limit_quantity" jdbcType="INTEGER" property="useLimitQuantity"/>
<result column="send_type" jdbcType="INTEGER" property="sendType"/>
<result column="valid_type" jdbcType="INTEGER" property="validType"/>
@@ -103,7 +105,7 @@

<sql id="allColumns">
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}
</if>

<if test=" null != useLimitRule ">
and `use_limit_rule` = #{useLimitRule}
</if>

<if test=" null != useLimitQuantity ">
and `use_limit_quantity` = #{useLimitQuantity}
</if>
@@ -376,6 +382,10 @@
and c.`use_price` = #{usePrice}
</if>

<if test=" null != useLimitRule ">
and c.`use_limit_rule` = #{useLimitRule}
</if>

<if test=" null != useLimitQuantity ">
and c.`use_limit_quantity` = #{useLimitQuantity}
</if>
@@ -596,6 +606,7 @@
<result column="sub_title" jdbcType="VARCHAR" property="subTitle"/>
<result column="sale_price" jdbcType="INTEGER" property="salePrice"/>
<result column="use_price" jdbcType="INTEGER" property="usePrice"/>
<result column="use_limit_rule" jdbcType="INTEGER" property="useLimitRule"/>
<result column="use_limit_quantity" jdbcType="INTEGER" property="useLimitQuantity"/>
<result column="send_type" jdbcType="INTEGER" property="sendType"/>
<result column="valid_type" jdbcType="INTEGER" property="validType"/>
@@ -644,6 +655,7 @@
<result column="sub_title" jdbcType="VARCHAR" property="subTitle"/>
<result column="sale_price" jdbcType="INTEGER" property="salePrice"/>
<result column="use_price" jdbcType="INTEGER" property="usePrice"/>
<result column="use_limit_rule" jdbcType="INTEGER" property="useLimitRule"/>
<result column="use_limit_quantity" jdbcType="INTEGER" property="useLimitQuantity"/>
<result column="send_type" jdbcType="INTEGER" property="sendType"/>
<result column="valid_type" jdbcType="INTEGER" property="validType"/>
@@ -1137,7 +1149,7 @@
<select id="findCouponByTopic" parameterType="com.iformall.domain.po.WxTopic"
resultType="com.iformall.domain.po.WxCoupon">
select ct.id as id,wc.id as couponId,
wc.tenant_id,wc.parent_tenant_id,wc.`type`,wc.`cover_img`,wc.`cover_picture`,wc.`detail_picture`,wc.`title`,wc.`sub_title`,wc.`sale_price`,wc.`use_price`,wc.`use_limit_quantity`,wc.`send_type`,
wc.tenant_id,wc.parent_tenant_id,wc.`type`,wc.`cover_img`,wc.`cover_picture`,wc.`detail_picture`,wc.`title`,wc.`sub_title`,wc.`sale_price`,wc.`use_price`,wc.`use_limit_rule`,wc.`use_limit_quantity`,wc.`send_type`,
wc.`valid_type`,wc.`valid_start_date`,wc.`valid_end_date`,wc.pick_start_date,wc.pick_end_date,wc.`valid_days`,wc.`detail`,wc.`price`,wc.tail_price,wc.orig_price,wc.`unit`,wc.`remain_inventory`,wc.`inventory`,
wc.`remark`,wc.`status`,wc.`create_date`,wc.`update_date`,wc.`business`,wc.`sub_business`,wc.`support_transfer`,wc.`subsidy_num`,wc.`subsidy_type`,
wc.`press_limit_num`, wc.`press_limit_hours`, wc.`auto_refund`,wc.`credit_price`,wc.`credit_refund`,wc.`conditions`,


+ 2
- 1
mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml Просмотреть файл

@@ -16,6 +16,7 @@
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName" />
<result column="remain_inventory" jdbcType="INTEGER" property="remainInventory"/>
<result column="inventory" jdbcType="INTEGER" property="inventory"/>
<result column="use_limit_rule" jdbcType="INTEGER" property="useLimitRule" />
<result column="use_limit_quantity" jdbcType="INTEGER" property="useLimitQuantity"/>
<result column="valid_start_date" jdbcType="TIMESTAMP" property="validStartDate"/>
<result column="valid_end_date" jdbcType="TIMESTAMP" property="validEndDate"/>
@@ -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
</sql>

<sql id="dynamicWhereConditions">


+ 7
- 0
mallinkService/src/main/resources/mapper/WxThirdPartyOrdersMapper.xml Просмотреть файл

@@ -157,6 +157,13 @@
<include refid="dynamicWhereConditions"/>
</select>

<select id="findListVo" parameterType="com.iformall.domain.po.WxThirdPartyOrders" resultType="com.iformall.domain.vo.WxThirdPartyOrdersVo">
select
<include refid="allColumns"/>
from wx_third_party_orders
<include refid="dynamicWhereConditions"/>
</select>

<select id="getById" parameterType="com.iformall.domain.po.WxThirdPartyOrders" resultMap="BaseResultMap">
select
<include refid="allColumns"/>


+ 1
- 0
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<WxTemplateMsg> page = wxTemplateMsgService.listAsPageForMiniApp(wxTemplateMsg, pageNum, pageSize);
return new ResultData(page);


Загрузка…
Отмена
Сохранить