diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java index 3719887b..b70bd5a8 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java @@ -47,6 +47,7 @@ import com.red.circle.other.infra.database.mongo.service.sys.ActivityConfigServi import com.red.circle.other.infra.database.mongo.service.user.count.UserGuardCountService; import com.red.circle.other.infra.database.mongo.service.user.count.WeekFriendshipCardCountService; import com.red.circle.other.infra.database.rds.entity.dynamic.DynamicContent; +import com.red.circle.other.infra.database.rds.entity.dynamic.DynamicGift; import com.red.circle.other.infra.database.rds.entity.dynamic.DynamicMessage; import com.red.circle.other.infra.database.rds.entity.game.GameRoomPkIntegralRecord; import com.red.circle.other.infra.database.rds.entity.game.GameRoomPkRecord; @@ -755,7 +756,7 @@ public class GiftCountStrategy implements GiftStrategy { } // 保存或更新动态礼物 - dynamicGiftService.saveOrUpdate( + dynamicGiftService.save1( Long.parseLong(runningWater.getDynamicContentId()), runningWater.getGiftId(), runningWater.getUserId(), diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/dynamic/DynamicGiftService.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/dynamic/DynamicGiftService.java index 5dc444b0..204ed603 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/dynamic/DynamicGiftService.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/dynamic/DynamicGiftService.java @@ -29,6 +29,18 @@ public interface DynamicGiftService extends BaseService { void saveOrUpdate(Long dynamicContentId, Long giftId, Long createUser, Integer quantity, String giftUrl, BigDecimal unitPrice); + /** + * 保存动态礼物. + * @param dynamicContentId 动态内容ID + * @param giftId 礼物ID + * @param createUser 送礼用户 + * @param quantity 数量 + * @param giftUrl 礼物URL + * @param unitPrice 单价 + */ + void save1(Long dynamicContentId, Long giftId, Long createUser, + Integer quantity, String giftUrl, BigDecimal unitPrice); + /** * 分页查询动态礼物列表(按更新时间倒序). * diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/dynamic/impl/DynamicGiftServiceImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/dynamic/impl/DynamicGiftServiceImpl.java index 12c08291..e16d8106 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/dynamic/impl/DynamicGiftServiceImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/dynamic/impl/DynamicGiftServiceImpl.java @@ -10,6 +10,8 @@ import java.math.BigDecimal; import java.sql.Timestamp; import java.util.List; import java.util.Map; + +import com.red.circle.tool.core.date.TimestampUtils; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -62,6 +64,23 @@ public class DynamicGiftServiceImpl extends BaseServiceImpl pageByUpdateTimeDesc(PageQuery pageQuery, Long contentId) { return query()