2025-10-20 10:16:44 +08:00
|
|
|
|
package com.xscm.moduleutil.bean;
|
|
|
|
|
|
|
2025-10-24 17:52:11 +08:00
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
import java.util.Objects;
|
2025-10-20 10:16:44 +08:00
|
|
|
|
|
2025-10-24 17:52:11 +08:00
|
|
|
|
import lombok.Data;
|
|
|
|
|
|
/**
|
|
|
|
|
|
*@author qx
|
|
|
|
|
|
*@data 2025/8/27
|
|
|
|
|
|
*@description: 推送过来的礼物信息,复用在盲盒活动获取礼物信息中
|
|
|
|
|
|
*/
|
2025-10-20 10:16:44 +08:00
|
|
|
|
@Data
|
|
|
|
|
|
public class GiftBean {
|
|
|
|
|
|
|
|
|
|
|
|
private String gift_id;
|
2025-10-24 17:52:11 +08:00
|
|
|
|
private String periods;
|
2025-10-20 10:16:44 +08:00
|
|
|
|
private String gift_name;
|
|
|
|
|
|
private String gift_price;
|
|
|
|
|
|
private int file_type;
|
|
|
|
|
|
private String play_image;
|
|
|
|
|
|
private String base_image;
|
|
|
|
|
|
private String gift_type;
|
2025-10-24 17:52:11 +08:00
|
|
|
|
private int number;
|
|
|
|
|
|
private String createtime;
|
|
|
|
|
|
private String nickname;
|
|
|
|
|
|
private int count;
|
|
|
|
|
|
private String user_id;
|
|
|
|
|
|
private int num;
|
|
|
|
|
|
private boolean is_paly =false;
|
|
|
|
|
|
|
|
|
|
|
|
private long timestamp;
|
|
|
|
|
|
//谁送的
|
|
|
|
|
|
private String userAvatar;
|
|
|
|
|
|
|
|
|
|
|
|
// 发送者名称
|
|
|
|
|
|
private String senderName;
|
|
|
|
|
|
// 发送者头像URL
|
|
|
|
|
|
private String senderAvatarUrl;
|
|
|
|
|
|
|
|
|
|
|
|
// 判断两个礼物是否相同(同一人送同一礼物)
|
|
|
|
|
|
public boolean isSameGiftFromSameSender(GiftBean other) {
|
|
|
|
|
|
if (other == null) return false;
|
|
|
|
|
|
return Objects.equals(gift_id, other.gift_id) &&
|
|
|
|
|
|
Objects.equals(senderName, other.senderName);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 生成礼物唯一键
|
|
|
|
|
|
public String getGiftKey() {
|
|
|
|
|
|
return (senderName != null ? senderName : "unknown") + "_" +
|
|
|
|
|
|
(gift_id != null ? gift_id : "unknown");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public GiftBean clone() {
|
|
|
|
|
|
GiftBean clone = new GiftBean();
|
|
|
|
|
|
clone.gift_id = this.gift_id;
|
|
|
|
|
|
clone.gift_name = this.gift_name;
|
|
|
|
|
|
clone.base_image = this.base_image;
|
|
|
|
|
|
clone.senderName = this.senderName;
|
|
|
|
|
|
clone.userAvatar = this.userAvatar;
|
|
|
|
|
|
clone.senderAvatarUrl = this.senderAvatarUrl;
|
|
|
|
|
|
clone.number = this.number;
|
|
|
|
|
|
clone.timestamp = this.timestamp;
|
|
|
|
|
|
return clone;
|
|
|
|
|
|
}
|
2025-10-20 10:16:44 +08:00
|
|
|
|
}
|