修改名称。
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
package com.xscm.moduleutil.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/8/27
|
||||
*@description: 推送过来的礼物信息,复用在盲盒活动获取礼物信息中
|
||||
*/
|
||||
@Data
|
||||
public class GiftBean {
|
||||
|
||||
private String gift_id;
|
||||
private String periods;
|
||||
private String gift_name;
|
||||
private String gift_price;
|
||||
private int file_type;
|
||||
private String play_image;
|
||||
private String base_image;
|
||||
private String gift_type;
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user