用户列表导出接口
This commit is contained in:
@@ -28,5 +28,4 @@ public class ShopUserDTO extends ShopUser {
|
||||
private String nextMemberLevelName;
|
||||
private Long nextExperience;
|
||||
private Long pointBalance;
|
||||
private boolean isNew;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.czg.account.dto.shopuser;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author yjjie
|
||||
* @date 2026/1/28 11:30
|
||||
*/
|
||||
@Data
|
||||
public class ShopUserExportDTO {
|
||||
|
||||
@ExcelProperty("手机号")
|
||||
private String phone;
|
||||
|
||||
@ExcelProperty("会员生日")
|
||||
private String birthDay;
|
||||
|
||||
@ExcelProperty("用户昵称")
|
||||
private String nickName;
|
||||
|
||||
@ExcelIgnore
|
||||
private Integer status;
|
||||
@ExcelProperty("会员状态")
|
||||
private String statusRemark;
|
||||
|
||||
@ExcelIgnore
|
||||
private Integer isVip;
|
||||
@ExcelProperty("是否会员")
|
||||
private String vipRemark;
|
||||
|
||||
@ExcelProperty("会员编号")
|
||||
private String code;
|
||||
|
||||
@ExcelProperty("余额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ExcelProperty("充值次数")
|
||||
private Integer rechargeCount;
|
||||
|
||||
@ExcelProperty("消费累计")
|
||||
private BigDecimal consumeAmount;
|
||||
|
||||
@ExcelProperty("消费次数")
|
||||
private Integer consumeCount;
|
||||
|
||||
@ExcelProperty("经验值")
|
||||
private Long experience;
|
||||
|
||||
@ExcelIgnore
|
||||
private String distributionShops;
|
||||
@ExcelProperty("是否分销员")
|
||||
private String distributionShopsRemark;
|
||||
|
||||
@ExcelProperty("优惠券数量")
|
||||
private Long couponNum;
|
||||
|
||||
@ExcelProperty("订单数量")
|
||||
private Long orderNumber;
|
||||
|
||||
@ExcelProperty("充值金额")
|
||||
private BigDecimal rechargeAmount;
|
||||
|
||||
@ExcelProperty("会员等级")
|
||||
private String memberLevelName;
|
||||
|
||||
@ExcelProperty("下一级会员等级")
|
||||
private String nextMemberLevelName;
|
||||
|
||||
@ExcelProperty("升级所需经验值")
|
||||
private Long nextExperience;
|
||||
|
||||
@ExcelProperty("积分余额")
|
||||
private Long pointBalance;
|
||||
|
||||
@ExcelProperty("加入会员时间")
|
||||
private LocalDateTime joinTime;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
public String getVipRemark() {
|
||||
if (isVip == null || isVip == 0) {
|
||||
return "否";
|
||||
}
|
||||
return "是";
|
||||
}
|
||||
|
||||
public String getStatusRemark() {
|
||||
if (status == null || status == 0) {
|
||||
return "禁用";
|
||||
}
|
||||
return "正常";
|
||||
}
|
||||
|
||||
public String getDistributionShopsRemark() {
|
||||
if (StrUtil.isBlank(distributionShops) || !distributionShops.contains("_")) {
|
||||
return "否";
|
||||
}
|
||||
|
||||
String[] split = distributionShops.split("_");
|
||||
if (split.length < 2) {
|
||||
return "否";
|
||||
}
|
||||
if ("0".equals(split[1])) {
|
||||
return "否";
|
||||
}
|
||||
|
||||
return "是";
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import com.czg.account.dto.shopuser.*;
|
||||
import com.czg.account.entity.ShopUser;
|
||||
import com.czg.market.entity.SmsPushEventUser;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
@@ -22,6 +23,8 @@ public interface AShopUserService {
|
||||
Page<ShopUser> getPushEventUser(SmsPushEventUser smsPushEventUser);
|
||||
Page<ShopUser> getAcPushEventUser(SmsPushEventUser smsPushEventUser);
|
||||
|
||||
void exportUserList(String key, Integer isVip, HttpServletResponse response);
|
||||
|
||||
|
||||
Boolean add(Long shopId, ShopUserAddDTO shopUserAddDTO);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user