配置中心

This commit is contained in:
2025-10-27 16:51:20 +08:00
parent e6ad8baeeb
commit 49755e6354
10 changed files with 277 additions and 29 deletions

View File

@@ -3,19 +3,17 @@ 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.BigDecimal;
import java.sql.Timestamp;
import java.io.Serial;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 分销员表 实体类。
*
@@ -49,6 +47,8 @@ public class MkDistributionUser implements Serializable {
*/
private Long shopId;
private Long userId;
/**
* 店铺用户Id
*/

View File

@@ -2,6 +2,7 @@ package com.czg.market.service;
import com.czg.market.dto.MkDistributionUserDTO;
import com.czg.market.entity.MkDistributionUser;
import com.czg.market.vo.DistributionCenterShopVO;
import com.czg.order.dto.MkDistributionPayDTO;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
@@ -17,6 +18,27 @@ import java.util.Map;
*/
public interface MkDistributionUserService extends IService<MkDistributionUser> {
/**
* 分销员中心-用户信息
*/
Map<String, Object> centerUser(Long userId);
/**
* 分销员中心-已激活店铺
*/
Page<DistributionCenterShopVO> activates(Long userId, Integer page, Integer size);
/**
* 分销员中心-未激活店铺
*/
Page<DistributionCenterShopVO> unActivates(Long userId, Integer page, Integer size);
/**
* 分销员中心-配置信息
*/
Map<String, Object> centerConfig(Long userId);
/**
* 获取分销员分页列表
*/
@@ -29,7 +51,7 @@ public interface MkDistributionUserService extends IService<MkDistributionUser>
*/
void addDistributionUser(MkDistributionUser param);
/**
/**
* 更新分销员
*/
void updateDistributionUserById(MkDistributionUserDTO param);
@@ -48,6 +70,7 @@ public interface MkDistributionUserService extends IService<MkDistributionUser>
/**
* 分销员开通
*
* @param userId 用户
* @param amount 金额
* @param shopId 店铺id

View File

@@ -0,0 +1,37 @@
package com.czg.market.vo;
import lombok.Data;
import java.io.Serializable;
/**
*
* @author ww
* @description
*/
@Data
public class DistributionCenterShopVO implements Serializable {
private Long shopId;
//店铺封面
private String coverImg;
private String shopName;
//店铺地址
private String shopAddress;
//收益
private String income;
//标签内容
private String labelContent;
//开通方式 pay购买开通 auto自动开通 manual手动开通
private String openType;
//要求邀请人数
private Integer shopInviteCount;
//用户已邀请人数
private Integer userInviteCount;
//是否下过单
private Integer orderCount;
//是否进过店铺
private Integer shopUser;
}

View File

@@ -0,0 +1,41 @@
package com.czg.market.vo;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author ww
* @description
*/
@Data
public class DistributionCenterTopVO {
/**
* 总收益
*/
private BigDecimal totalIncome;
/**
* 待入账
*/
private BigDecimal pendingIncome;
/**
* 已提现
*/
private BigDecimal cashOutAmount;
public BigDecimal getTotalIncome() {
return totalIncome == null ? BigDecimal.ZERO : totalIncome;
}
public BigDecimal getPendingIncome() {
return pendingIncome == null ? BigDecimal.ZERO : pendingIncome;
}
public BigDecimal getCashOutAmount() {
return cashOutAmount == null ? BigDecimal.ZERO : cashOutAmount;
}
public BigDecimal getUnCashOutAmount() {
return getTotalIncome().subtract(getPendingIncome()).subtract(getCashOutAmount());
}
}