领取记录 来源

This commit is contained in:
2025-11-17 11:06:56 +08:00
parent 4d7a706711
commit 495d1412bb
3 changed files with 16 additions and 11 deletions

View File

@@ -47,10 +47,14 @@ public interface MkShopCouponRecordService extends IService<MkShopCouponRecord>
/**
* 短信/公众号 事件发送优惠券
* 短信 事件发送优惠券
* 通过事件发放优惠券
*/
void smsGrantCoupon(SmsPushEventDTO param);
/**
* 公众号 事件发送优惠券
* 通过事件发放优惠券
*/
void acGrantCoupon(AcPushEventDTO param);
/**

View File

@@ -211,7 +211,7 @@ public class MkShopCouponRecordServiceImpl extends ServiceImpl<MkShopCouponRecor
giftDTO.setShopId(param.getShopId());
giftDTO.setSourceId(param.getId());
giftDTO.setCouponId(id);
giftDTO.setSource("营销短信发放");
giftDTO.setSource("公众号发放");
batchReceiveCoupon(giftDTO, num, userList);
}
} catch (Exception e) {
@@ -247,7 +247,7 @@ public class MkShopCouponRecordServiceImpl extends ServiceImpl<MkShopCouponRecor
giftDTO.setShopId(param.getShopId());
giftDTO.setSourceId(param.getId());
giftDTO.setCouponId(id);
giftDTO.setSource("营销短信发放");
giftDTO.setSource("短信发放");
batchReceiveCoupon(giftDTO, num, userList);
}
} catch (Exception e) {

View File

@@ -152,13 +152,13 @@ public class ShopCouponServiceImpl extends ServiceImpl<ShopCouponMapper, ShopCou
public void receivePopUp(Long shopId, Long userId, String getMode) {
ShopUser shopUser = null;
List<ShopCouponPopUp> popUps = getPopUp(shopId, userId, getMode);
if ("home".equals(getMode)) {
getMode = "首页";
} else if ("eat".equals(getMode)) {
getMode = "用餐";
} else if ("order".equals(getMode)) {
getMode = "订单";
}
// if ("home".equals(getMode)) {
// getMode = "首页";
// } else if ("eat".equals(getMode)) {
// getMode = "用餐";
// } else if ("order".equals(getMode)) {
// getMode = "订单";
// }
for (ShopCouponPopUp popUp : popUps) {
MkShopCouponGiftDTO giftDTO = new MkShopCouponGiftDTO();
giftDTO.setShopId(shopId);
@@ -168,7 +168,8 @@ public class ShopCouponServiceImpl extends ServiceImpl<ShopCouponMapper, ShopCou
giftDTO.setShopUserId(shopUser.getId());
giftDTO.setCouponId(popUp.getId());
giftDTO.setSourceId(-1L);
giftDTO.setSource(getMode + "弹窗领取");
giftDTO.setSource("用户弹窗领取");
// giftDTO.setSource(getMode + "弹窗领取");
recordService.receiveCoupon(giftDTO, 1, true);
}
}