判空
This commit is contained in:
@@ -93,10 +93,6 @@ public class MkDistributionConfig implements Serializable {
|
||||
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 主店id
|
||||
*/
|
||||
private Long mainShopId;
|
||||
private Long shopId;
|
||||
|
||||
}
|
||||
|
||||
@@ -111,6 +111,10 @@ public class MkDistributionUser implements Serializable {
|
||||
/**
|
||||
* 是否删除 0 未删除 1 已删除
|
||||
*/
|
||||
private boolean isDel;
|
||||
private Integer isDel;
|
||||
/**
|
||||
* 邀请码
|
||||
*/
|
||||
private String inviteCode;
|
||||
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public interface MkDistributionUserService extends IService<MkDistributionUser>
|
||||
/**
|
||||
* 分销员中心-配置信息
|
||||
*/
|
||||
Map<String, Object> centerConfig(Long userId);
|
||||
Map<String, Object> centerConfig(Long userId, Long shopId);
|
||||
|
||||
/**
|
||||
* 获取分销员分页列表
|
||||
@@ -84,11 +84,12 @@ public interface MkDistributionUserService extends IService<MkDistributionUser>
|
||||
|
||||
/**
|
||||
* 发放分销奖励
|
||||
*
|
||||
* @param sourceId 来源id
|
||||
* @param orderNo 订单编号
|
||||
* @param amount 金额
|
||||
* @param userId 用户id
|
||||
* @param shopId 店铺id
|
||||
* @param orderNo 订单编号
|
||||
* @param amount 金额
|
||||
* @param userId 用户id
|
||||
* @param shopId 店铺id
|
||||
*/
|
||||
void distribute(Long sourceId, String orderNo, BigDecimal amount, Long userId, Long shopId, String type);
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.czg.utils;
|
||||
|
||||
import cn.hutool.core.lang.id.NanoId;
|
||||
|
||||
/**
|
||||
* @author ww
|
||||
* @description
|
||||
*/
|
||||
public class CzgRandomUtils {
|
||||
|
||||
private static final char[] DEFAULT_ALPHABET =
|
||||
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray();
|
||||
|
||||
/**
|
||||
* 默认长度
|
||||
*/
|
||||
public static final int DEFAULT_SIZE = 12;
|
||||
|
||||
|
||||
/**
|
||||
* 随机生成指定长度的字符串
|
||||
*
|
||||
* @return 随机字符串
|
||||
*/
|
||||
public static String randomString() {
|
||||
return NanoId.randomNanoId(null, DEFAULT_ALPHABET, DEFAULT_SIZE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 随机生成指定长度的字符串
|
||||
*
|
||||
* @param length 字符串长度
|
||||
* @return 随机字符串
|
||||
*/
|
||||
public static String randomString(int length) {
|
||||
return NanoId.randomNanoId(null, DEFAULT_ALPHABET, length);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user