ソースを参照

feat: 新增CF值余额与流水实体及Mapper

Xiaogang Liao 1 ヶ月 前
コミット
4c47157962

+ 38 - 0
cfc-backend/src/main/java/com/etotem/cfc/entity/PlatformBalanceLog.java

@@ -0,0 +1,38 @@
+package com.etotem.cfc.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("platform_balance_log")
+public class PlatformBalanceLog implements Serializable {
+
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    private Long userId;
+
+    private Long familyId;
+
+    /** earn/spend/freeze/unfreeze/withdraw */
+    private String type;
+
+    private Integer amount;
+
+    /** 变动后可用余额 */
+    private Integer balanceAfter;
+
+    /** product_order/activity/withdrawal/migration */
+    private String refType;
+
+    private Long refId;
+
+    private String remark;
+
+    private Date createdAt;
+}

+ 40 - 0
cfc-backend/src/main/java/com/etotem/cfc/entity/UserPlatformBalance.java

@@ -0,0 +1,40 @@
+package com.etotem.cfc.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("user_platform_balance")
+public class UserPlatformBalance implements Serializable {
+
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    private Long userId;
+
+    private Long familyId;
+
+    /** 累计获得 */
+    private Integer totalEarned;
+
+    /** 可用余额(可提现/可兑换) */
+    private Integer available;
+
+    /** 冻结(提现审核中) */
+    private Integer frozen;
+
+    /** 已提现 */
+    private Integer withdrawn;
+
+    /** 已兑换 */
+    private Integer exchanged;
+
+    private Date updatedAt;
+
+    private Date createdAt;
+}

+ 9 - 0
cfc-backend/src/main/java/com/etotem/cfc/mapper/PlatformBalanceLogMapper.java

@@ -0,0 +1,9 @@
+package com.etotem.cfc.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.etotem.cfc.entity.PlatformBalanceLog;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface PlatformBalanceLogMapper extends BaseMapper<PlatformBalanceLog> {
+}

+ 9 - 0
cfc-backend/src/main/java/com/etotem/cfc/mapper/UserPlatformBalanceMapper.java

@@ -0,0 +1,9 @@
+package com.etotem.cfc.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.etotem.cfc.entity.UserPlatformBalance;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface UserPlatformBalanceMapper extends BaseMapper<UserPlatformBalance> {
+}