公众号推送
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package com.czg.service.market.mapper;
|
||||
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.czg.market.entity.AcPushEvent;
|
||||
|
||||
/**
|
||||
* 公众号推送任务 映射层。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-10-20
|
||||
*/
|
||||
public interface AcPushEventMapper extends BaseMapper<AcPushEvent> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
package com.czg.service.market.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.account.service.ShopInfoService;
|
||||
import com.czg.config.RabbitPublisher;
|
||||
import com.czg.config.RedisCst;
|
||||
import com.czg.exception.CzgException;
|
||||
import com.czg.market.dto.AcPushEventDTO;
|
||||
import com.czg.market.entity.AcPushEvent;
|
||||
import com.czg.market.entity.SmsPushEvent;
|
||||
import com.czg.market.entity.SmsPushEventUser;
|
||||
import com.czg.market.service.AcPushEventService;
|
||||
import com.czg.market.service.MkShopCouponRecordService;
|
||||
import com.czg.service.RedisService;
|
||||
import com.czg.service.market.mapper.AcPushEventMapper;
|
||||
import com.czg.service.market.mapper.SmsPushEventUserMapper;
|
||||
import com.czg.utils.AssertUtil;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 公众号推送任务 服务层实现。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-10-20
|
||||
*/
|
||||
@Service
|
||||
public class AcPushEventServiceImpl extends ServiceImpl<AcPushEventMapper, AcPushEvent> implements AcPushEventService {
|
||||
@Resource
|
||||
private SmsPushEventUserMapper eventUserMapper;
|
||||
@DubboReference
|
||||
private ShopInfoService shopInfoService;
|
||||
@Resource
|
||||
private MkShopCouponRecordService couponRecordService;
|
||||
@Resource
|
||||
private RabbitPublisher rabbitPublisher;
|
||||
@Resource
|
||||
private RedisService redisService;
|
||||
|
||||
@Override
|
||||
public Page<AcPushEventDTO> getPushEventPage(Integer page, Integer size, Long shopId, Integer status, Long id) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq(SmsPushEvent::getShopId, shopId)
|
||||
.eq(SmsPushEvent::getId, id)
|
||||
.eq(SmsPushEvent::getStatus, status)
|
||||
.eq(SmsPushEvent::getIsDel, 0)
|
||||
.orderBy(SmsPushEvent::getCreateTime).desc();
|
||||
Page<AcPushEventDTO> page1 = pageAs(new Page<>(page, size), queryWrapper, AcPushEventDTO.class);
|
||||
for (AcPushEventDTO record : page1.getRecords()) {
|
||||
if (record.getUserType() != 2) {
|
||||
continue;
|
||||
}
|
||||
SmsPushEventUser eventUser = eventUserMapper.selectOneByQuery(
|
||||
new QueryWrapper()
|
||||
.eq(SmsPushEventUser::getType, "ac")
|
||||
.eq(SmsPushEventUser::getEventId, record.getId())
|
||||
);
|
||||
record.setPushEventUser(eventUser);
|
||||
}
|
||||
return page1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPushEvent(AcPushEventDTO param) {
|
||||
AssertUtil.isNull(param.getUserType(), "请选择用户范围后进行推送");
|
||||
if (param.getUserType() == 2 && param.getPushEventUser() == null) {
|
||||
throw new CzgException("范围推送时,必须指定用户范围");
|
||||
} else if (param.getUserType() == 3 && param.getUserId() == null) {
|
||||
throw new CzgException("指定推送时,必须指定用户");
|
||||
}
|
||||
if (param.getSendType() == 2) {
|
||||
AssertUtil.isNull(param.getSendTime(), "定时发送时,必须指定发送时间");
|
||||
} else {
|
||||
param.setSendTime(LocalDateTime.now());
|
||||
}
|
||||
AcPushEvent pushEvent = BeanUtil.toBean(param, AcPushEvent.class);
|
||||
save(pushEvent);
|
||||
if (param.getUserType() == 2) {
|
||||
SmsPushEventUser eventUser = param.getPushEventUser();
|
||||
eventUser.setType("ac");
|
||||
eventUser.setShopId(param.getShopId());
|
||||
eventUser.setEventId(pushEvent.getId());
|
||||
eventUserMapper.insert(eventUser);
|
||||
}
|
||||
param.setId(pushEvent.getId());
|
||||
Long mainShopId = shopInfoService.getMainIdByShopId(param.getShopId());
|
||||
// 推送消息 进行 消息发送
|
||||
rabbitPublisher.sendApplySmsMsg(mainShopId + "," + pushEvent.getId(), "sendWechatTemp");
|
||||
if (param.getSendType() == 1 && StrUtil.isNotBlank(param.getCoupon())) {
|
||||
couponRecordService.acGrantCoupon(param);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendPushEventCoupon(String eventId) {
|
||||
AcPushEvent acPushEvent = getOne(new QueryWrapper().eq(AcPushEvent::getId, eventId));
|
||||
AssertUtil.isNull(acPushEvent, "券发放失败,推送事件不存在");
|
||||
if (StrUtil.isNotBlank(acPushEvent.getCoupon())) {
|
||||
AcPushEventDTO pushEvent = BeanUtil.toBean(acPushEvent, AcPushEventDTO.class);
|
||||
SmsPushEventUser eventUser = eventUserMapper.selectOneByQuery(
|
||||
new QueryWrapper()
|
||||
.eq(SmsPushEventUser::getType, "ac")
|
||||
.eq(SmsPushEventUser::getEventId, eventId)
|
||||
);
|
||||
pushEvent.setPushEventUser(eventUser);
|
||||
couponRecordService.acGrantCoupon(pushEvent);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upPushEvent(AcPushEventDTO param) {
|
||||
AssertUtil.isNull(param.getUserType(), "请选择用户范围后进行推送");
|
||||
if (param.getUserType() == 2 && param.getPushEventUser() == null) {
|
||||
throw new CzgException("范围推送时,必须指定用户范围");
|
||||
} else if (param.getUserType() == 3 && param.getUserId() == null) {
|
||||
throw new CzgException("指定推送时,必须指定用户");
|
||||
}
|
||||
if (param.getSendType() == 2) {
|
||||
AssertUtil.isNull(param.getSendTime(), "定时发送时,必须指定发送时间");
|
||||
} else {
|
||||
param.setSendTime(LocalDateTime.now());
|
||||
}
|
||||
AcPushEvent pushEvent = BeanUtil.toBean(param, AcPushEvent.class);
|
||||
updateById(pushEvent);
|
||||
eventUserMapper.deleteByQuery(new QueryWrapper()
|
||||
.eq(SmsPushEventUser::getType, "ac")
|
||||
.eq(SmsPushEventUser::getEventId, pushEvent.getId()));
|
||||
if (param.getUserType() == 2) {
|
||||
SmsPushEventUser eventUser = param.getPushEventUser();
|
||||
eventUser.setType("ac");
|
||||
eventUser.setShopId(param.getShopId());
|
||||
eventUser.setEventId(pushEvent.getId());
|
||||
eventUserMapper.insert(eventUser);
|
||||
}
|
||||
Long mainShopId = shopInfoService.getMainIdByShopId(param.getShopId());
|
||||
// 推送消息 进行 消息发送
|
||||
rabbitPublisher.sendApplySmsMsg(mainShopId + "," + pushEvent.getId(), "sendWechatTemp");
|
||||
if (param.getSendType() == 1 && StrUtil.isNotBlank(param.getCoupon())) {
|
||||
couponRecordService.acGrantCoupon(param);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePushEvent(Long id) {
|
||||
AcPushEvent pushEvent = getById(id);
|
||||
AssertUtil.isNull(pushEvent, "记录不存在");
|
||||
if (pushEvent.getStatus() == 2) {
|
||||
throw new CzgException("已发送的记录不能删除");
|
||||
}
|
||||
redisService.del(RedisCst.classKeyExpired.EXPIRED_WECHAT + id);
|
||||
pushEvent.setIsDel(1);
|
||||
updateById(pushEvent);
|
||||
}
|
||||
}
|
||||
@@ -2,22 +2,24 @@ package com.czg.service.market.service.impl;
|
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.czg.account.dto.QueryReceiveDto;
|
||||
import com.czg.account.entity.ShopInfo;
|
||||
import com.czg.account.entity.ShopUser;
|
||||
import com.czg.account.entity.UserInfo;
|
||||
import com.czg.account.service.AShopUserService;
|
||||
import com.czg.account.service.ShopInfoService;
|
||||
import com.czg.account.service.ShopUserService;
|
||||
import com.czg.account.service.UserInfoService;
|
||||
import com.czg.account.vo.CouponReceiveVo;
|
||||
import com.czg.account.vo.UserCouponVo;
|
||||
import com.czg.exception.CzgException;
|
||||
import com.czg.market.dto.MkRewardCouponDTO;
|
||||
import com.czg.market.dto.MkShopCouponGiftDTO;
|
||||
import com.czg.market.dto.MkShopCouponRecordDTO;
|
||||
import com.czg.market.dto.*;
|
||||
import com.czg.market.entity.MkShopCouponRecord;
|
||||
import com.czg.market.entity.ShopCoupon;
|
||||
import com.czg.market.entity.SmsPushEventUser;
|
||||
import com.czg.market.service.MkShopCouponRecordService;
|
||||
import com.czg.market.vo.UserCouponVO;
|
||||
import com.czg.service.market.mapper.MkShopCouponRecordMapper;
|
||||
@@ -29,6 +31,7 @@ import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
|
||||
@@ -37,6 +40,7 @@ import java.time.LocalTime;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
/**
|
||||
* 优惠券发放记录表 服务层实现。
|
||||
@@ -44,6 +48,7 @@ import java.util.List;
|
||||
* @author ww
|
||||
* @since 2025-09-13
|
||||
*/
|
||||
@Slf4j
|
||||
@DubboService
|
||||
public class MkShopCouponRecordServiceImpl extends ServiceImpl<MkShopCouponRecordMapper, MkShopCouponRecord> implements MkShopCouponRecordService {
|
||||
|
||||
@@ -54,6 +59,8 @@ public class MkShopCouponRecordServiceImpl extends ServiceImpl<MkShopCouponRecor
|
||||
private ShopInfoService shopInfoService;
|
||||
@DubboReference
|
||||
private ShopUserService shopUserService;
|
||||
@DubboReference
|
||||
private AShopUserService aShopUserService;
|
||||
@Resource
|
||||
private ShopCouponMapper couponService;
|
||||
|
||||
@@ -177,6 +184,77 @@ public class MkShopCouponRecordServiceImpl extends ServiceImpl<MkShopCouponRecor
|
||||
return recordPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void acGrantCoupon(AcPushEventDTO param) {
|
||||
//发放优惠券
|
||||
CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
SmsPushEventUser smsPushEventUser = param.getPushEventUser();
|
||||
List<ShopUser> userList = new ArrayList<>();
|
||||
if (param.getUserType() == 1) {
|
||||
smsPushEventUser = new SmsPushEventUser();
|
||||
smsPushEventUser.setShopId(param.getShopId());
|
||||
smsPushEventUser.setIsAll(1);
|
||||
}
|
||||
userList = aShopUserService.getPushEventUserList(smsPushEventUser);
|
||||
// 2. 将JSON字符串解析为JSONArray
|
||||
JSONArray couponArray = JSON.parseArray(param.getCoupon());
|
||||
|
||||
// 3. 遍历JSONArray,逐个获取JSONObject的字段值
|
||||
for (int i = 0; i < couponArray.size(); i++) {
|
||||
// 获取单个优惠券的JSONObject对象
|
||||
JSONObject couponObj = couponArray.getJSONObject(i);
|
||||
// 通过键名获取对应值(需注意字段类型,按需转换)
|
||||
Long id = couponObj.getLong("id");
|
||||
Integer num = couponObj.getInteger("num");
|
||||
MkShopCouponGiftDTO giftDTO = new MkShopCouponGiftDTO();
|
||||
giftDTO.setShopId(param.getShopId());
|
||||
giftDTO.setSourceId(param.getId());
|
||||
giftDTO.setCouponId(id);
|
||||
giftDTO.setSource("营销短信发放");
|
||||
batchReceiveCoupon(giftDTO, num, userList);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("异步发放优惠券失败", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void smsGrantCoupon(SmsPushEventDTO param) {
|
||||
//发放优惠券
|
||||
CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
SmsPushEventUser smsPushEventUser = param.getSmsPushEventUser();
|
||||
List<ShopUser> userList = new ArrayList<>();
|
||||
if (param.getUserType() == 1) {
|
||||
smsPushEventUser = new SmsPushEventUser();
|
||||
smsPushEventUser.setShopId(param.getShopId());
|
||||
smsPushEventUser.setIsAll(1);
|
||||
}
|
||||
userList = aShopUserService.getPushEventUserList(smsPushEventUser);
|
||||
// 2. 将JSON字符串解析为JSONArray
|
||||
JSONArray couponArray = JSON.parseArray(param.getCoupon());
|
||||
|
||||
// 3. 遍历JSONArray,逐个获取JSONObject的字段值
|
||||
for (int i = 0; i < couponArray.size(); i++) {
|
||||
// 获取单个优惠券的JSONObject对象
|
||||
JSONObject couponObj = couponArray.getJSONObject(i);
|
||||
// 通过键名获取对应值(需注意字段类型,按需转换)
|
||||
Long id = couponObj.getLong("id");
|
||||
Integer num = couponObj.getInteger("num");
|
||||
MkShopCouponGiftDTO giftDTO = new MkShopCouponGiftDTO();
|
||||
giftDTO.setShopId(param.getShopId());
|
||||
giftDTO.setSourceId(param.getId());
|
||||
giftDTO.setCouponId(id);
|
||||
giftDTO.setSource("营销短信发放");
|
||||
batchReceiveCoupon(giftDTO, num, userList);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("异步发放优惠券失败", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveCoupon(MkShopCouponGiftDTO giftDTO, Integer number, boolean isLimit) {
|
||||
@@ -271,8 +349,13 @@ public class MkShopCouponRecordServiceImpl extends ServiceImpl<MkShopCouponRecor
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void batchReceiveCoupon(MkShopCouponGiftDTO giftDTO, Integer number, List<ShopUser> userList) {
|
||||
/**
|
||||
* 发放券 批量发放 不计限领
|
||||
* 检查优惠券状态 检查店铺ID是否存在且与发放店铺一致 检查优惠券是否失效
|
||||
* @param giftDTO 除 sourceFlowId shopUserId外 全必填 如果有 也填
|
||||
* @param number 发放数量
|
||||
*/
|
||||
private void batchReceiveCoupon(MkShopCouponGiftDTO giftDTO, Integer number, List<ShopUser> userList) {
|
||||
if (number == null || number <= 0) {
|
||||
throw new CzgException("发放数量不能小于0");
|
||||
}
|
||||
|
||||
@@ -2,15 +2,10 @@ package com.czg.service.market.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.czg.account.entity.ShopUser;
|
||||
import com.czg.account.service.AShopUserService;
|
||||
import com.czg.account.service.ShopInfoService;
|
||||
import com.czg.config.RabbitPublisher;
|
||||
import com.czg.config.RedisCst;
|
||||
import com.czg.exception.CzgException;
|
||||
import com.czg.market.dto.MkShopCouponGiftDTO;
|
||||
import com.czg.market.dto.SmsPushEventDTO;
|
||||
import com.czg.market.entity.SmsPushEvent;
|
||||
import com.czg.market.entity.SmsPushEventUser;
|
||||
@@ -30,9 +25,6 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
/**
|
||||
* 营销推送发送记录 服务层实现。
|
||||
@@ -46,10 +38,10 @@ public class SmsPushEventServiceImpl extends ServiceImpl<SmsPushEventMapper, Sms
|
||||
|
||||
@Resource
|
||||
private SmsPushEventUserMapper eventUserMapper;
|
||||
@DubboReference
|
||||
private ShopInfoService shopInfoService;
|
||||
@Resource
|
||||
private MkShopCouponRecordService couponRecordService;
|
||||
@DubboReference
|
||||
private AShopUserService shopUserService;
|
||||
@Resource
|
||||
private RabbitPublisher rabbitPublisher;
|
||||
@Resource
|
||||
@@ -104,10 +96,11 @@ public class SmsPushEventServiceImpl extends ServiceImpl<SmsPushEventMapper, Sms
|
||||
eventUserMapper.insert(eventUser);
|
||||
}
|
||||
param.setId(pushEvent.getId());
|
||||
Long mainShopId = shopInfoService.getMainIdByShopId(param.getShopId());
|
||||
// 推送消息 进行 消息发送
|
||||
rabbitPublisher.sendApplySmsMsg(pushEvent.getShopId() + "," + pushEvent.getId(), "sendMarkSms");
|
||||
rabbitPublisher.sendApplySmsMsg(mainShopId + "," + pushEvent.getId(), "sendMarkSms");
|
||||
if (param.getSendType() == 1 && StrUtil.isNotBlank(param.getCoupon())) {
|
||||
grantCoupon(param);
|
||||
couponRecordService.smsGrantCoupon(param);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,66 +130,30 @@ public class SmsPushEventServiceImpl extends ServiceImpl<SmsPushEventMapper, Sms
|
||||
eventUser.setEventId(pushEvent.getId());
|
||||
eventUserMapper.insert(eventUser);
|
||||
}
|
||||
Long mainShopId = shopInfoService.getMainIdByShopId(param.getShopId());
|
||||
// 推送消息 进行 消息发送
|
||||
rabbitPublisher.sendApplySmsMsg(pushEvent.getShopId() + "," + pushEvent.getId(), "sendMarkSms");
|
||||
//发放优惠券
|
||||
grantCoupon(param);
|
||||
|
||||
rabbitPublisher.sendApplySmsMsg(mainShopId + "," + pushEvent.getId(), "sendMarkSms");
|
||||
if (param.getSendType() == 1 && StrUtil.isNotBlank(param.getCoupon())) {
|
||||
couponRecordService.smsGrantCoupon(param);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendPushEventCoupon(String eventId) {
|
||||
SmsPushEvent smsPushEvent = getOne(new QueryWrapper().eq(SmsPushEvent::getId, eventId));
|
||||
AssertUtil.isNull(smsPushEvent, "券发放失败,推送事件不存在");
|
||||
SmsPushEventDTO pushEvent = BeanUtil.toBean(smsPushEvent, SmsPushEventDTO.class);
|
||||
SmsPushEventUser eventUser = eventUserMapper.selectOneByQuery(
|
||||
new QueryWrapper()
|
||||
.eq(SmsPushEventUser::getType, "sms")
|
||||
.eq(SmsPushEventUser::getEventId, eventId)
|
||||
);
|
||||
pushEvent.setSmsPushEventUser(eventUser);
|
||||
if (StrUtil.isNotBlank(pushEvent.getCoupon())) {
|
||||
grantCoupon(pushEvent);
|
||||
if (StrUtil.isNotBlank(smsPushEvent.getCoupon())) {
|
||||
SmsPushEventDTO pushEvent = BeanUtil.toBean(smsPushEvent, SmsPushEventDTO.class);
|
||||
SmsPushEventUser eventUser = eventUserMapper.selectOneByQuery(
|
||||
new QueryWrapper()
|
||||
.eq(SmsPushEventUser::getType, "sms")
|
||||
.eq(SmsPushEventUser::getEventId, eventId)
|
||||
);
|
||||
pushEvent.setSmsPushEventUser(eventUser);
|
||||
couponRecordService.smsGrantCoupon(pushEvent);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 发放优惠券
|
||||
private void grantCoupon(SmsPushEventDTO param) {
|
||||
//发放优惠券
|
||||
CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
SmsPushEventUser smsPushEventUser = param.getSmsPushEventUser();
|
||||
List<ShopUser> userList = new ArrayList<>();
|
||||
if (param.getUserType() == 1) {
|
||||
smsPushEventUser = new SmsPushEventUser();
|
||||
smsPushEventUser.setShopId(param.getShopId());
|
||||
smsPushEventUser.setIsAll(1);
|
||||
}
|
||||
userList = shopUserService.getPushEventUserList(smsPushEventUser);
|
||||
// 2. 将JSON字符串解析为JSONArray
|
||||
JSONArray couponArray = JSON.parseArray(param.getCoupon());
|
||||
|
||||
// 3. 遍历JSONArray,逐个获取JSONObject的字段值
|
||||
for (int i = 0; i < couponArray.size(); i++) {
|
||||
// 获取单个优惠券的JSONObject对象
|
||||
JSONObject couponObj = couponArray.getJSONObject(i);
|
||||
// 通过键名获取对应值(需注意字段类型,按需转换)
|
||||
Long id = couponObj.getLong("id");
|
||||
Integer num = couponObj.getInteger("num");
|
||||
MkShopCouponGiftDTO giftDTO = new MkShopCouponGiftDTO();
|
||||
giftDTO.setShopId(param.getShopId());
|
||||
giftDTO.setSourceId(param.getId());
|
||||
giftDTO.setCouponId(id);
|
||||
giftDTO.setSource("营销短信发放");
|
||||
couponRecordService.batchReceiveCoupon(giftDTO, num, userList);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("异步发放优惠券失败", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 逻辑删除记录
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czg.service.market.mapper.AcPushEventMapper">
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user