发放标识
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
package com.czg.market.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 聊天消息表 实体类。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-12-04
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("chat_message")
|
||||
@Accessors(chain = true)
|
||||
public class ChatMessage implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 消息ID
|
||||
*/
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private BigInteger id;
|
||||
|
||||
/**
|
||||
* 发送者ID
|
||||
*/
|
||||
private String fromId;
|
||||
|
||||
/**
|
||||
* 接收者ID(单聊=对方ID,群聊=群ID)
|
||||
*/
|
||||
private String toId;
|
||||
|
||||
/**
|
||||
* 群ID
|
||||
*/
|
||||
private String groupId;
|
||||
|
||||
/**
|
||||
* 聊天类型:1=单聊,2=群聊
|
||||
*/
|
||||
private Integer chatType;
|
||||
|
||||
/**
|
||||
* 消息类型:1=文本/常用语/表情,2=图片,3=订单, 4 优惠券 5视频
|
||||
*/
|
||||
private Integer msgType;
|
||||
|
||||
/**
|
||||
* 文本/表情代码/常用语ID(仅msg_type=1)
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 图片URL(仅msg_type=2)
|
||||
*/
|
||||
private String imageUrl;
|
||||
|
||||
/**
|
||||
* 订单ID(仅msg_type=3)
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 优惠券信息 (仅msg_type=4)
|
||||
*/
|
||||
private String coupon;
|
||||
|
||||
/**
|
||||
* 是否已读:0=未读,1=已读
|
||||
*/
|
||||
private Integer isRead;
|
||||
|
||||
/**
|
||||
* 发送时间
|
||||
*/
|
||||
private LocalDateTime sendTime;
|
||||
|
||||
/**
|
||||
* 会话ID:单聊=min(from,to)_max(from,to),群聊=group_群ID
|
||||
*/
|
||||
private String sessionId;
|
||||
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* chat_coupon的 id
|
||||
*/
|
||||
private Long chatCouponId;
|
||||
|
||||
/**
|
||||
* 1 领取
|
||||
*/
|
||||
private Integer couponClaim;
|
||||
|
||||
}
|
||||
@@ -66,10 +66,13 @@ public interface MkShopCouponRecordService extends IService<MkShopCouponRecord>
|
||||
|
||||
Boolean grant(Long shopId, MkRewardCouponDTO rewardCouponDTO, String source);
|
||||
|
||||
/**
|
||||
* 组装 群聊活动优惠券
|
||||
*/
|
||||
MkShopCouponRecord assembleRecord(Long chatCouponId, ShopCoupon coupon);
|
||||
|
||||
/**
|
||||
* 优惠券发放
|
||||
* 群聊活动优惠券发放
|
||||
*/
|
||||
void grantChatCoupon(MkShopCouponRecord record, Integer number);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user