消息中心
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
|
||||
package com.czg.account.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import lombok.experimental.Accessors;
|
||||
import java.io.Serial;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 实体类。
|
||||
*
|
||||
* @author gyj
|
||||
* @since 2025-12-09
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class AcUserMsgDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户 Id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 店铺 Id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 来源 Id;如订单 Id
|
||||
*/
|
||||
private Long sourceId;
|
||||
|
||||
/**
|
||||
* 来源类型:order 订单
|
||||
*/
|
||||
private String sourceType;
|
||||
|
||||
/**
|
||||
* 消息类型:cash 现金,points 积分
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 消息读取状态:0 未读,1 已读
|
||||
*/
|
||||
private Integer readStatus;
|
||||
|
||||
/**
|
||||
* 消息标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.czg.account.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
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 gyj
|
||||
* @since 2025-12-09
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("ac_user_msg")
|
||||
public class AcUserMsg implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户 Id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 店铺 Id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 来源 Id;如订单 Id
|
||||
*/
|
||||
private Long sourceId;
|
||||
|
||||
/**
|
||||
* 来源类型:order 订单
|
||||
*/
|
||||
private String sourceType;
|
||||
|
||||
/**
|
||||
* 消息类型:cash 现金,points 积分
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 消息读取状态:0 未读,1 已读
|
||||
*/
|
||||
private Integer readStatus;
|
||||
|
||||
/**
|
||||
* 消息标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.czg.account.service;
|
||||
|
||||
import com.czg.account.dto.AcUserMsgDTO;
|
||||
import com.czg.account.entity.AcUserMsg;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务层。
|
||||
*
|
||||
* @author gyj
|
||||
* @since 2025-12-09
|
||||
*/
|
||||
public interface AcUserMsgService extends IService<AcUserMsg> {
|
||||
|
||||
void addUserMsg(AcUserMsg msg);
|
||||
|
||||
Long getUnReadCount();
|
||||
|
||||
Page<AcUserMsgDTO> getUserMsgPage();
|
||||
|
||||
List<AcUserMsgDTO> getMsgListByOrderId(Long orderId);
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.czg.market.service;
|
||||
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.market.entity.MkConsumeCashbackRecord;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -47,5 +47,5 @@ public interface MkPointsUserService extends IService<MkPointsUser> {
|
||||
* 积分抵扣账单
|
||||
*/
|
||||
Long alterPoints(Long userId, Long shopUserId, @NotNull Long shopId, @NotNull PointsConstant floatType,
|
||||
@NotNull Integer points, String sourceId, @NotBlank String reason);
|
||||
@NotNull Integer points, Long sourceId, @NotBlank String reason);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user