提交修改
This commit is contained in:
parent
2d2b6fa51a
commit
37ead7237a
@ -8,13 +8,14 @@ package com.heyu.api.data.dao.vv;
|
|||||||
* @since 2025-08-23
|
* @since 2025-08-23
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.heyu.api.data.entity.vv.VvBuyerEntity;
|
import com.heyu.api.data.entity.vv.VvBuyerEntity;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.lz.mybatis.plugin.annotations.*;
|
import com.lz.mybatis.plugin.annotations.*;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
@ -44,8 +45,14 @@ public interface VvBuyerDao extends BaseMapper<VvBuyerEntity> {
|
|||||||
@IF @LIKE String buyerName,
|
@IF @LIKE String buyerName,
|
||||||
@IF @LIKE String buyerPhone,
|
@IF @LIKE String buyerPhone,
|
||||||
@IF @LIKE String buyerWeixin,
|
@IF @LIKE String buyerWeixin,
|
||||||
@IF @GE Long minCreateTimestamp,
|
@IF @GE @Column(VvBuyerEntity.create_timestamp) Long minCreateTimestamp,
|
||||||
@IF @LE Long maxCreateTimestamp,
|
@IF @LE @Column(VvBuyerEntity.create_timestamp) Long maxCreateTimestamp,
|
||||||
|
@IF Integer isTest,
|
||||||
|
@IF String promoterId,
|
||||||
|
@IF Integer scanCode,
|
||||||
|
@IF Integer scanCodeAwardCount,
|
||||||
|
@IF @GE @Column(VvBuyerEntity.promoter_sum_amount) BigDecimal minPromoterSumAmount,
|
||||||
|
@IF @LE @Column(VvBuyerEntity.promoter_sum_amount) BigDecimal maxPromoterSumAmount,
|
||||||
@OrderBy @IF @Column(VvBuyerEntity.create_timestamp) String createTimestampSort);
|
@OrderBy @IF @Column(VvBuyerEntity.create_timestamp) String createTimestampSort);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -9,8 +9,13 @@ package com.heyu.api.data.dao.vv;
|
|||||||
*/
|
*/
|
||||||
import com.heyu.api.data.entity.vv.VvPromoterEntity;
|
import com.heyu.api.data.entity.vv.VvPromoterEntity;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.lz.mybatis.plugin.annotations.IFNullReturnEmpty;
|
||||||
|
import com.lz.mybatis.plugin.annotations.IN;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface VvPromoterDao extends BaseMapper<VvPromoterEntity> {
|
public interface VvPromoterDao extends BaseMapper<VvPromoterEntity> {
|
||||||
|
|
||||||
@ -33,4 +38,8 @@ public interface VvPromoterDao extends BaseMapper<VvPromoterEntity> {
|
|||||||
int deleteVvPromoterById(@Param("id")Long id);
|
int deleteVvPromoterById(@Param("id")Long id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<VvPromoterEntity> selectVvPromoterByPromoteIds(@IFNullReturnEmpty @IN List<String> promoterId);
|
||||||
}
|
}
|
||||||
@ -32,13 +32,15 @@ private static final long serialVersionUID = 1L;
|
|||||||
public final static String modify_timestamp = CLASS_NAME + "modify_timestamp"; // 买家修改时间
|
public final static String modify_timestamp = CLASS_NAME + "modify_timestamp"; // 买家修改时间
|
||||||
public final static String is_test = CLASS_NAME + "is_test"; // 是否是测试账号
|
public final static String is_test = CLASS_NAME + "is_test"; // 是否是测试账号
|
||||||
public final static String promoter_id = CLASS_NAME + "promoter_id"; // 推荐者id
|
public final static String promoter_id = CLASS_NAME + "promoter_id"; // 推荐者id
|
||||||
public final static String scan_code = CLASS_NAME + "scan_code"; // 是否是扫码关注
|
public final static String scan_code = CLASS_NAME + "scan_code"; // 是否是扫码关注的用户
|
||||||
public final static String scan_code_award_count = CLASS_NAME + "scan_code_award_count"; // 是否已经领取
|
public final static String scan_code_award_count = CLASS_NAME + "scan_code_award_count"; // 是否已经领取,是否已经领取新人福利,1 已领取,0 未领取
|
||||||
public final static String sum_amount = CLASS_NAME + "sum_amount"; // 总金额
|
public final static String promoter_sum_amount = CLASS_NAME + "promoter_sum_amount"; // 总金额
|
||||||
public final static String draw_cash_amount = CLASS_NAME + "draw_cash_amount"; // 提现金额
|
public final static String promoter_draw_cash_amount = CLASS_NAME + "promoter_draw_cash_amount"; // 提现金额
|
||||||
public final static String account_mount = CLASS_NAME + "account_mount"; // 账户余额
|
public final static String promoter_account_mount = CLASS_NAME + "promoter_account_mount"; // 账户余额
|
||||||
public final static String not_arrive_account = CLASS_NAME + "not_arrive_account"; // 未到账金额
|
public final static String promoter_not_arrive_account = CLASS_NAME + "promoter_not_arrive_account"; // 未到账金额
|
||||||
public final static String canceled_account = CLASS_NAME + "canceled_account"; // 取消金额
|
public final static String promoter_canceled_account = CLASS_NAME + "promoter_canceled_account"; // 取消金额
|
||||||
|
public final static String promoter_buyer_count = CLASS_NAME + "promoter_buyer_count"; // 推荐的买家数量
|
||||||
|
public final static String avatar_ = CLASS_NAME + "avatar"; // 微信头像
|
||||||
//
|
//
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
@ -62,20 +64,24 @@ private static final long serialVersionUID = 1L;
|
|||||||
private Integer isTest;
|
private Integer isTest;
|
||||||
//推荐者id
|
//推荐者id
|
||||||
private String promoterId;
|
private String promoterId;
|
||||||
//是否是扫码关注
|
//是否是扫码关注的用户
|
||||||
private Integer scanCode;
|
private Integer scanCode;
|
||||||
//是否已经领取
|
//是否已经领取,是否已经领取新人福利,1 已领取,0 未领取
|
||||||
private Integer scanCodeAwardCount;
|
private Integer scanCodeAwardCount;
|
||||||
//总金额
|
//总金额
|
||||||
private BigDecimal sumAmount;
|
private BigDecimal promoterSumAmount;
|
||||||
//提现金额
|
//提现金额
|
||||||
private BigDecimal drawCashAmount;
|
private BigDecimal promoterDrawCashAmount;
|
||||||
//账户余额
|
//账户余额
|
||||||
private BigDecimal accountMount;
|
private BigDecimal promoterAccountMount;
|
||||||
//未到账金额
|
//未到账金额
|
||||||
private BigDecimal notArriveAccount;
|
private BigDecimal promoterNotArriveAccount;
|
||||||
//取消金额
|
//取消金额
|
||||||
private BigDecimal canceledAccount;
|
private BigDecimal promoterCanceledAccount;
|
||||||
|
//推荐的买家数量
|
||||||
|
private Integer promoterBuyerCount;
|
||||||
|
//微信头像
|
||||||
|
private String avatar;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
@ -242,14 +248,14 @@ private static final long serialVersionUID = 1L;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否是扫码关注
|
* 是否是扫码关注的用户
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Integer getScanCode() {
|
public Integer getScanCode() {
|
||||||
return scanCode;
|
return scanCode;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 是否是扫码关注
|
* 是否是扫码关注的用户
|
||||||
* @param scanCode
|
* @param scanCode
|
||||||
*/
|
*/
|
||||||
public void setScanCode(Integer scanCode) {
|
public void setScanCode(Integer scanCode) {
|
||||||
@ -257,14 +263,14 @@ private static final long serialVersionUID = 1L;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否已经领取
|
* 是否已经领取,是否已经领取新人福利,1 已领取,0 未领取
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Integer getScanCodeAwardCount() {
|
public Integer getScanCodeAwardCount() {
|
||||||
return scanCodeAwardCount;
|
return scanCodeAwardCount;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 是否已经领取
|
* 是否已经领取,是否已经领取新人福利,1 已领取,0 未领取
|
||||||
* @param scanCodeAwardCount
|
* @param scanCodeAwardCount
|
||||||
*/
|
*/
|
||||||
public void setScanCodeAwardCount(Integer scanCodeAwardCount) {
|
public void setScanCodeAwardCount(Integer scanCodeAwardCount) {
|
||||||
@ -275,75 +281,105 @@ private static final long serialVersionUID = 1L;
|
|||||||
* 总金额
|
* 总金额
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public BigDecimal getSumAmount() {
|
public BigDecimal getPromoterSumAmount() {
|
||||||
return sumAmount;
|
return promoterSumAmount;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 总金额
|
* 总金额
|
||||||
* @param sumAmount
|
* @param promoterSumAmount
|
||||||
*/
|
*/
|
||||||
public void setSumAmount(BigDecimal sumAmount) {
|
public void setPromoterSumAmount(BigDecimal promoterSumAmount) {
|
||||||
this.sumAmount = sumAmount;
|
this.promoterSumAmount = promoterSumAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提现金额
|
* 提现金额
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public BigDecimal getDrawCashAmount() {
|
public BigDecimal getPromoterDrawCashAmount() {
|
||||||
return drawCashAmount;
|
return promoterDrawCashAmount;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 提现金额
|
* 提现金额
|
||||||
* @param drawCashAmount
|
* @param promoterDrawCashAmount
|
||||||
*/
|
*/
|
||||||
public void setDrawCashAmount(BigDecimal drawCashAmount) {
|
public void setPromoterDrawCashAmount(BigDecimal promoterDrawCashAmount) {
|
||||||
this.drawCashAmount = drawCashAmount;
|
this.promoterDrawCashAmount = promoterDrawCashAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 账户余额
|
* 账户余额
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public BigDecimal getAccountMount() {
|
public BigDecimal getPromoterAccountMount() {
|
||||||
return accountMount;
|
return promoterAccountMount;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 账户余额
|
* 账户余额
|
||||||
* @param accountMount
|
* @param promoterAccountMount
|
||||||
*/
|
*/
|
||||||
public void setAccountMount(BigDecimal accountMount) {
|
public void setPromoterAccountMount(BigDecimal promoterAccountMount) {
|
||||||
this.accountMount = accountMount;
|
this.promoterAccountMount = promoterAccountMount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 未到账金额
|
* 未到账金额
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public BigDecimal getNotArriveAccount() {
|
public BigDecimal getPromoterNotArriveAccount() {
|
||||||
return notArriveAccount;
|
return promoterNotArriveAccount;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 未到账金额
|
* 未到账金额
|
||||||
* @param notArriveAccount
|
* @param promoterNotArriveAccount
|
||||||
*/
|
*/
|
||||||
public void setNotArriveAccount(BigDecimal notArriveAccount) {
|
public void setPromoterNotArriveAccount(BigDecimal promoterNotArriveAccount) {
|
||||||
this.notArriveAccount = notArriveAccount;
|
this.promoterNotArriveAccount = promoterNotArriveAccount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取消金额
|
* 取消金额
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public BigDecimal getCanceledAccount() {
|
public BigDecimal getPromoterCanceledAccount() {
|
||||||
return canceledAccount;
|
return promoterCanceledAccount;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 取消金额
|
* 取消金额
|
||||||
* @param canceledAccount
|
* @param promoterCanceledAccount
|
||||||
*/
|
*/
|
||||||
public void setCanceledAccount(BigDecimal canceledAccount) {
|
public void setPromoterCanceledAccount(BigDecimal promoterCanceledAccount) {
|
||||||
this.canceledAccount = canceledAccount;
|
this.promoterCanceledAccount = promoterCanceledAccount;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推荐的买家数量
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Integer getPromoterBuyerCount() {
|
||||||
|
return promoterBuyerCount;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 推荐的买家数量
|
||||||
|
* @param promoterBuyerCount
|
||||||
|
*/
|
||||||
|
public void setPromoterBuyerCount(Integer promoterBuyerCount) {
|
||||||
|
this.promoterBuyerCount = promoterBuyerCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 微信头像
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getAvatar() {
|
||||||
|
return avatar;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 微信头像
|
||||||
|
* @param avatar
|
||||||
|
*/
|
||||||
|
public void setAvatar(String avatar) {
|
||||||
|
this.avatar = avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -362,11 +398,13 @@ private static final long serialVersionUID = 1L;
|
|||||||
",promoterId=" + promoterId +
|
",promoterId=" + promoterId +
|
||||||
",scanCode=" + scanCode +
|
",scanCode=" + scanCode +
|
||||||
",scanCodeAwardCount=" + scanCodeAwardCount +
|
",scanCodeAwardCount=" + scanCodeAwardCount +
|
||||||
",sumAmount=" + sumAmount +
|
",promoterSumAmount=" + promoterSumAmount +
|
||||||
",drawCashAmount=" + drawCashAmount +
|
",promoterDrawCashAmount=" + promoterDrawCashAmount +
|
||||||
",accountMount=" + accountMount +
|
",promoterAccountMount=" + promoterAccountMount +
|
||||||
",notArriveAccount=" + notArriveAccount +
|
",promoterNotArriveAccount=" + promoterNotArriveAccount +
|
||||||
",canceledAccount=" + canceledAccount +
|
",promoterCanceledAccount=" + promoterCanceledAccount +
|
||||||
|
",promoterBuyerCount=" + promoterBuyerCount +
|
||||||
|
",avatar=" + avatar +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -26,9 +26,14 @@ private static final long serialVersionUID = 1L;
|
|||||||
public final static String create_time = CLASS_NAME + "create_time"; // 创建时间
|
public final static String create_time = CLASS_NAME + "create_time"; // 创建时间
|
||||||
public final static String modify_time = CLASS_NAME + "modify_time"; // 修改时间
|
public final static String modify_time = CLASS_NAME + "modify_time"; // 修改时间
|
||||||
public final static String promoter_id = CLASS_NAME + "promoter_id"; // 推广者id,唯一值
|
public final static String promoter_id = CLASS_NAME + "promoter_id"; // 推广者id,唯一值
|
||||||
public final static String buyer_name = CLASS_NAME + "buyer_name"; // 买家名称
|
public final static String promoter_buyer_name = CLASS_NAME + "promoter_buyer_name"; // 买家名称
|
||||||
public final static String buyer_weixin = CLASS_NAME + "buyer_weixin"; // 买家微信
|
public final static String promoter_buyer_weixin = CLASS_NAME + "promoter_buyer_weixin"; // 买家微信
|
||||||
public final static String buyer_phone = CLASS_NAME + "buyer_phone"; // 买家微信
|
public final static String promoter_buyer_phone = CLASS_NAME + "promoter_buyer_phone"; // 买家微信
|
||||||
|
public final static String promoter_buyer_id = CLASS_NAME + "promoter_buyer_id"; // 买家id
|
||||||
|
public final static String was_buyer_name = CLASS_NAME + "was_buyer_name"; // 被推荐买家名称
|
||||||
|
public final static String was_buyer_weixin = CLASS_NAME + "was_buyer_weixin"; // 被推荐买家微信
|
||||||
|
public final static String was_buyer_phone = CLASS_NAME + "was_buyer_phone"; // 被推荐者手机号
|
||||||
|
public final static String was_promoter_buyer_id = CLASS_NAME + "was_promoter_buyer_id"; // 被推荐者买家id
|
||||||
//
|
//
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
@ -41,11 +46,21 @@ private static final long serialVersionUID = 1L;
|
|||||||
//推广者id,唯一值
|
//推广者id,唯一值
|
||||||
private String promoterId;
|
private String promoterId;
|
||||||
//买家名称
|
//买家名称
|
||||||
private String buyerName;
|
private String promoterBuyerName;
|
||||||
//买家微信
|
//买家微信
|
||||||
private String buyerWeixin;
|
private String promoterBuyerWeixin;
|
||||||
//买家微信
|
//买家微信
|
||||||
private String buyerPhone;
|
private String promoterBuyerPhone;
|
||||||
|
//买家id
|
||||||
|
private Long promoterBuyerId;
|
||||||
|
//被推荐买家名称
|
||||||
|
private String wasBuyerName;
|
||||||
|
//被推荐买家微信
|
||||||
|
private String wasBuyerWeixin;
|
||||||
|
//被推荐者手机号
|
||||||
|
private String wasBuyerPhone;
|
||||||
|
//被推荐者买家id
|
||||||
|
private Long wasPromoterBuyerId;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
@ -125,45 +140,120 @@ private static final long serialVersionUID = 1L;
|
|||||||
* 买家名称
|
* 买家名称
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getBuyerName() {
|
public String getPromoterBuyerName() {
|
||||||
return buyerName;
|
return promoterBuyerName;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 买家名称
|
* 买家名称
|
||||||
* @param buyerName
|
* @param promoterBuyerName
|
||||||
*/
|
*/
|
||||||
public void setBuyerName(String buyerName) {
|
public void setPromoterBuyerName(String promoterBuyerName) {
|
||||||
this.buyerName = buyerName;
|
this.promoterBuyerName = promoterBuyerName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 买家微信
|
* 买家微信
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getBuyerWeixin() {
|
public String getPromoterBuyerWeixin() {
|
||||||
return buyerWeixin;
|
return promoterBuyerWeixin;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 买家微信
|
* 买家微信
|
||||||
* @param buyerWeixin
|
* @param promoterBuyerWeixin
|
||||||
*/
|
*/
|
||||||
public void setBuyerWeixin(String buyerWeixin) {
|
public void setPromoterBuyerWeixin(String promoterBuyerWeixin) {
|
||||||
this.buyerWeixin = buyerWeixin;
|
this.promoterBuyerWeixin = promoterBuyerWeixin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 买家微信
|
* 买家微信
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getBuyerPhone() {
|
public String getPromoterBuyerPhone() {
|
||||||
return buyerPhone;
|
return promoterBuyerPhone;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 买家微信
|
* 买家微信
|
||||||
* @param buyerPhone
|
* @param promoterBuyerPhone
|
||||||
*/
|
*/
|
||||||
public void setBuyerPhone(String buyerPhone) {
|
public void setPromoterBuyerPhone(String promoterBuyerPhone) {
|
||||||
this.buyerPhone = buyerPhone;
|
this.promoterBuyerPhone = promoterBuyerPhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 买家id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getPromoterBuyerId() {
|
||||||
|
return promoterBuyerId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 买家id
|
||||||
|
* @param promoterBuyerId
|
||||||
|
*/
|
||||||
|
public void setPromoterBuyerId(Long promoterBuyerId) {
|
||||||
|
this.promoterBuyerId = promoterBuyerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 被推荐买家名称
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getWasBuyerName() {
|
||||||
|
return wasBuyerName;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 被推荐买家名称
|
||||||
|
* @param wasBuyerName
|
||||||
|
*/
|
||||||
|
public void setWasBuyerName(String wasBuyerName) {
|
||||||
|
this.wasBuyerName = wasBuyerName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 被推荐买家微信
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getWasBuyerWeixin() {
|
||||||
|
return wasBuyerWeixin;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 被推荐买家微信
|
||||||
|
* @param wasBuyerWeixin
|
||||||
|
*/
|
||||||
|
public void setWasBuyerWeixin(String wasBuyerWeixin) {
|
||||||
|
this.wasBuyerWeixin = wasBuyerWeixin;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 被推荐者手机号
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getWasBuyerPhone() {
|
||||||
|
return wasBuyerPhone;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 被推荐者手机号
|
||||||
|
* @param wasBuyerPhone
|
||||||
|
*/
|
||||||
|
public void setWasBuyerPhone(String wasBuyerPhone) {
|
||||||
|
this.wasBuyerPhone = wasBuyerPhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 被推荐者买家id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getWasPromoterBuyerId() {
|
||||||
|
return wasPromoterBuyerId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 被推荐者买家id
|
||||||
|
* @param wasPromoterBuyerId
|
||||||
|
*/
|
||||||
|
public void setWasPromoterBuyerId(Long wasPromoterBuyerId) {
|
||||||
|
this.wasPromoterBuyerId = wasPromoterBuyerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -174,9 +264,14 @@ private static final long serialVersionUID = 1L;
|
|||||||
",createTime=" + createTime +
|
",createTime=" + createTime +
|
||||||
",modifyTime=" + modifyTime +
|
",modifyTime=" + modifyTime +
|
||||||
",promoterId=" + promoterId +
|
",promoterId=" + promoterId +
|
||||||
",buyerName=" + buyerName +
|
",promoterBuyerName=" + promoterBuyerName +
|
||||||
",buyerWeixin=" + buyerWeixin +
|
",promoterBuyerWeixin=" + promoterBuyerWeixin +
|
||||||
",buyerPhone=" + buyerPhone +
|
",promoterBuyerPhone=" + promoterBuyerPhone +
|
||||||
|
",promoterBuyerId=" + promoterBuyerId +
|
||||||
|
",wasBuyerName=" + wasBuyerName +
|
||||||
|
",wasBuyerWeixin=" + wasBuyerWeixin +
|
||||||
|
",wasBuyerPhone=" + wasBuyerPhone +
|
||||||
|
",wasPromoterBuyerId=" + wasPromoterBuyerId +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,12 +1,12 @@
|
|||||||
package com.heyu.api.data.entity.vv;
|
package com.heyu.api.data.entity.vv;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import com.lz.mybatis.plugin.annotations.AS;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;import java.util.Date;
|
import java.util.Date;
|
||||||
/**
|
/**
|
||||||
*购物车
|
*购物车
|
||||||
* @author quyixiao
|
* @author quyixiao
|
||||||
@ -69,7 +69,7 @@ private static final long serialVersionUID = 1L;
|
|||||||
//退货数量
|
//退货数量
|
||||||
private Integer refundCount;
|
private Integer refundCount;
|
||||||
//买家id
|
//买家id
|
||||||
private Integer buyerId;
|
private Long buyerId;
|
||||||
//创建时间撮
|
//创建时间撮
|
||||||
private Long createTimestamp;
|
private Long createTimestamp;
|
||||||
//修改时间撮
|
//修改时间撮
|
||||||
@ -263,14 +263,14 @@ private static final long serialVersionUID = 1L;
|
|||||||
* 买家id
|
* 买家id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Integer getBuyerId() {
|
public Long getBuyerId() {
|
||||||
return buyerId;
|
return buyerId;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 买家id
|
* 买家id
|
||||||
* @param buyerId
|
* @param buyerId
|
||||||
*/
|
*/
|
||||||
public void setBuyerId(Integer buyerId) {
|
public void setBuyerId(Long buyerId) {
|
||||||
this.buyerId = buyerId;
|
this.buyerId = buyerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -97,6 +97,9 @@ public class SanUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static <T, R, V> Map<R, List<V>> list2GroupBy(List<V> values, LBiFunction0<T, R> function) {
|
public static <T, R, V> Map<R, List<V>> list2GroupBy(List<V> values, LBiFunction0<T, R> function) {
|
||||||
|
if(CollectionUtils.isEmpty(values)){
|
||||||
|
return new HashMap<>();
|
||||||
|
}
|
||||||
Map<R, List<V>> listmap = new HashMap<>();
|
Map<R, List<V>> listmap = new HashMap<>();
|
||||||
Method method = getMethod(function);
|
Method method = getMethod(function);
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -48,7 +48,7 @@ public class MysqlMain_update {
|
|||||||
}
|
}
|
||||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||||
|
|
||||||
list.add(new TablesBean("vv_buyer"));
|
list.add(new TablesBean("vv_promoter"));
|
||||||
|
|
||||||
|
|
||||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||||
|
|||||||
@ -0,0 +1,14 @@
|
|||||||
|
package com.heyu.api.alibaba.request.mm;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class VVAdminBaseRequest {
|
||||||
|
|
||||||
|
|
||||||
|
private Integer pageNum = 1 ;
|
||||||
|
|
||||||
|
|
||||||
|
private Integer pageSize = 10 ;
|
||||||
|
|
||||||
|
}
|
||||||
@ -3,19 +3,15 @@ package com.heyu.api.alibaba.request.mm;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class VvBuyerRequest {
|
public class VvBuyerRequest extends VVAdminBaseRequest {
|
||||||
|
|
||||||
private Integer pageNum = 1 ;
|
|
||||||
|
|
||||||
|
|
||||||
private Integer pageSize = 10 ;
|
|
||||||
|
|
||||||
|
|
||||||
//创建时间撮
|
//创建时间撮
|
||||||
private Long minCreateTimestamp;
|
private Long minCreateTimestamp;
|
||||||
private Long maxCreateTimestamp;
|
|
||||||
|
|
||||||
|
private Long maxCreateTimestamp;
|
||||||
|
|
||||||
//买家名称
|
//买家名称
|
||||||
private String buyerName;
|
private String buyerName;
|
||||||
@ -23,10 +19,27 @@ public class VvBuyerRequest {
|
|||||||
private String buyerWeixin;
|
private String buyerWeixin;
|
||||||
//买家手机号
|
//买家手机号
|
||||||
private String buyerPhone;
|
private String buyerPhone;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 按创建时间排序,,传 ASC 或 DESC
|
* 按创建时间排序,,传 ASC 或 DESC
|
||||||
*/
|
*/
|
||||||
private String createTimestampSort;
|
private String createTimestampSort;
|
||||||
|
/***
|
||||||
|
* 是否是测试卖家
|
||||||
|
*/
|
||||||
|
private Integer isTest;
|
||||||
|
//推荐者id
|
||||||
|
private String promoterId;
|
||||||
|
|
||||||
|
//是否是扫码关注的用户
|
||||||
|
private Integer scanCode;
|
||||||
|
//是否已经领取,是否已经领取新人福利,1 已领取,0 未领取
|
||||||
|
private Integer scanCodeAwardCount;
|
||||||
|
|
||||||
|
//推荐总金额最小值
|
||||||
|
private BigDecimal minPromoterSumAmount;
|
||||||
|
|
||||||
|
//推荐总金额最大值
|
||||||
|
private BigDecimal maxPromoterSumAmount;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.heyu.api.alibaba.request.mm.order;
|
|||||||
|
|
||||||
import com.heyu.api.data.entity.vv.VvBuyerAddressEntity;
|
import com.heyu.api.data.entity.vv.VvBuyerAddressEntity;
|
||||||
import com.heyu.api.data.entity.vv.VvBuyerEntity;
|
import com.heyu.api.data.entity.vv.VvBuyerEntity;
|
||||||
|
import com.heyu.api.data.entity.vv.VvPromoterEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -10,6 +11,14 @@ import java.util.List;
|
|||||||
public class VvBuyerDTO extends VvBuyerEntity {
|
public class VvBuyerDTO extends VvBuyerEntity {
|
||||||
|
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 地址信息
|
||||||
|
*/
|
||||||
private List<VvBuyerAddressEntity> vvBuyerAddressEntityList;
|
private List<VvBuyerAddressEntity> vvBuyerAddressEntityList;
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 推荐者信息
|
||||||
|
*/
|
||||||
|
private List<VvPromoterEntity> vvPromoterList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,9 +6,13 @@ import com.heyu.api.alibaba.request.mm.VvBuyerRequest;
|
|||||||
import com.heyu.api.alibaba.request.mm.order.VvBuyerDTO;
|
import com.heyu.api.alibaba.request.mm.order.VvBuyerDTO;
|
||||||
import com.heyu.api.data.dao.vv.VvBuyerAddressDao;
|
import com.heyu.api.data.dao.vv.VvBuyerAddressDao;
|
||||||
import com.heyu.api.data.dao.vv.VvBuyerDao;
|
import com.heyu.api.data.dao.vv.VvBuyerDao;
|
||||||
|
import com.heyu.api.data.dao.vv.VvPromoterDao;
|
||||||
import com.heyu.api.data.entity.vv.VvBuyerAddressEntity;
|
import com.heyu.api.data.entity.vv.VvBuyerAddressEntity;
|
||||||
import com.heyu.api.data.entity.vv.VvBuyerEntity;
|
import com.heyu.api.data.entity.vv.VvBuyerEntity;
|
||||||
|
import com.heyu.api.data.entity.vv.VvPromoterEntity;
|
||||||
import com.heyu.api.data.utils.R;
|
import com.heyu.api.data.utils.R;
|
||||||
|
import com.heyu.api.data.utils.SanUtils;
|
||||||
|
import com.heyu.api.data.utils.StringUtils;
|
||||||
import com.heyu.api.utils.ISelect;
|
import com.heyu.api.utils.ISelect;
|
||||||
import com.heyu.api.utils.PPageUtils;
|
import com.heyu.api.utils.PPageUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -19,7 +23,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -35,14 +38,13 @@ public class AdminBuyerController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private VvBuyerAddressDao vvBuyerAddressDao;
|
private VvBuyerAddressDao vvBuyerAddressDao;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private VvPromoterDao vvPromoterDao;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 列表
|
* 列表
|
||||||
* http://localhost:8888/mm/buyer/list
|
* http://localhost:8888/mm/buyer/list
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/list")
|
@RequestMapping("/list")
|
||||||
public R list(@RequestBody VvBuyerRequest vvProductRequest) {
|
public R list(@RequestBody VvBuyerRequest vvProductRequest) {
|
||||||
@ -56,6 +58,12 @@ public class AdminBuyerController {
|
|||||||
vvProductRequest.getBuyerWeixin(),
|
vvProductRequest.getBuyerWeixin(),
|
||||||
vvProductRequest.getMinCreateTimestamp(),
|
vvProductRequest.getMinCreateTimestamp(),
|
||||||
vvProductRequest.getMaxCreateTimestamp(),
|
vvProductRequest.getMaxCreateTimestamp(),
|
||||||
|
vvProductRequest.getIsTest(),
|
||||||
|
vvProductRequest.getPromoterId(),
|
||||||
|
vvProductRequest.getScanCode(),
|
||||||
|
vvProductRequest.getScanCodeAwardCount(),
|
||||||
|
vvProductRequest.getMinPromoterSumAmount(),
|
||||||
|
vvProductRequest.getMaxPromoterSumAmount(),
|
||||||
vvProductRequest.getCreateTimestampSort()
|
vvProductRequest.getCreateTimestampSort()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -65,44 +73,67 @@ public class AdminBuyerController {
|
|||||||
|
|
||||||
List<Long> buyerIds = new ArrayList<>();
|
List<Long> buyerIds = new ArrayList<>();
|
||||||
|
|
||||||
|
List<String> promoterIds = new ArrayList<>();
|
||||||
|
|
||||||
for (VvBuyerEntity buyerEntity : vvBuyerEntities) {
|
for (VvBuyerEntity buyerEntity : vvBuyerEntities) {
|
||||||
buyerIds.add(buyerEntity.getId());
|
buyerIds.add(buyerEntity.getId());
|
||||||
|
if (StringUtils.isNotEmpty(buyerEntity.getPromoterId())) {
|
||||||
|
promoterIds.add(buyerEntity.getPromoterId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
List<VvBuyerAddressEntity> vvBuyerAddressEntities = vvBuyerAddressDao.selectMapByBuyerIds(buyerIds);
|
List<VvBuyerAddressEntity> vvBuyerAddressEntities = vvBuyerAddressDao.selectMapByBuyerIds(buyerIds);
|
||||||
|
Map<Long, List<VvBuyerAddressEntity>> listMap = SanUtils.list2GroupBy(vvBuyerAddressEntities, VvBuyerAddressEntity::getBuyerId);
|
||||||
|
|
||||||
|
List<VvPromoterEntity> vvPromoterEntities = vvPromoterDao.selectVvPromoterByPromoteIds(promoterIds);
|
||||||
Map<Long, List<VvBuyerAddressEntity>> listMap = new HashMap<>();
|
Map<String, List<VvPromoterEntity>> vvPromoterGroupBy = SanUtils.list2GroupBy(vvPromoterEntities, VvPromoterEntity::getPromoterId);
|
||||||
|
|
||||||
for (VvBuyerAddressEntity vvBuyerAddressEntity : vvBuyerAddressEntities) {
|
|
||||||
List<VvBuyerAddressEntity> vvBuyerAddressEntityList = listMap.get(vvBuyerAddressEntity.getBuyerId());
|
|
||||||
|
|
||||||
if (vvBuyerAddressEntityList == null) {
|
|
||||||
vvBuyerAddressEntityList = new ArrayList<>();
|
|
||||||
}
|
|
||||||
|
|
||||||
vvBuyerAddressEntityList.add(vvBuyerAddressEntity);
|
|
||||||
|
|
||||||
|
|
||||||
listMap.put(vvBuyerAddressEntity.getBuyerId(), vvBuyerAddressEntityList);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
List<VvBuyerDTO> buyerDTOs = new ArrayList<>();
|
List<VvBuyerDTO> buyerDTOs = new ArrayList<>();
|
||||||
|
|
||||||
for (VvBuyerEntity vvBuyerAddressEntity : vvBuyerEntities) {
|
for (VvBuyerEntity vvBuyerAddressEntity : vvBuyerEntities) {
|
||||||
VvBuyerDTO vvBuyerDTO = new VvBuyerDTO();
|
VvBuyerDTO vvBuyerDTO = new VvBuyerDTO();
|
||||||
BeanUtils.copyProperties(vvBuyerAddressEntity, vvBuyerDTO);
|
BeanUtils.copyProperties(vvBuyerAddressEntity, vvBuyerDTO);
|
||||||
vvBuyerDTO.setVvBuyerAddressEntityList(listMap.get(vvBuyerDTO.getId()));
|
vvBuyerDTO.setVvBuyerAddressEntityList(listMap.get(vvBuyerDTO.getId()));
|
||||||
|
|
||||||
|
// 获取买家推荐者信息
|
||||||
|
if (StringUtils.isNotEmpty(vvBuyerDTO.getPromoterId())) {
|
||||||
|
vvBuyerDTO.setVvPromoterList(vvPromoterGroupBy.get(vvBuyerDTO.getPromoterId()));
|
||||||
|
}
|
||||||
|
|
||||||
buyerDTOs.add(vvBuyerDTO);
|
buyerDTOs.add(vvBuyerDTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
pageUtils.setRows(buyerDTOs);
|
pageUtils.setRows(buyerDTOs);
|
||||||
return R.ok().setData(pageUtils);
|
return R.ok().setData(pageUtils);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user