From 930658f087df885f01cefbba30856303e0528c58 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Sun, 04 Feb 2024 18:06:49 +0800
Subject: [PATCH] 确认收货更新用户的会员信息

---
 src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java |  603 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 597 insertions(+), 6 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java b/src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java
index 155f5d9..a5f9238 100644
--- a/src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java
+++ b/src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java
@@ -1,17 +1,43 @@
 package cc.mrbird.febs.mall.controller;
 
+import cc.mrbird.febs.common.annotation.ControllerEndpoint;
 import cc.mrbird.febs.common.controller.BaseController;
 import cc.mrbird.febs.common.entity.FebsResponse;
 import cc.mrbird.febs.common.entity.QueryRequest;
-import cc.mrbird.febs.mall.entity.MallMember;
-import cc.mrbird.febs.mall.service.IMallMemberService;
+import cc.mrbird.febs.common.enumerates.ProductEnum;
+import cc.mrbird.febs.common.utils.ShareCodeUtil;
+import cc.mrbird.febs.common.utils.excl.ExcelSheetPO;
+import cc.mrbird.febs.common.utils.excl.ExcelUtil;
+import cc.mrbird.febs.common.utils.excl.ExcelVersion;
+import cc.mrbird.febs.common.utils.excl.ResponseHeadUtil;
+import cc.mrbird.febs.mall.dto.*;
+import cc.mrbird.febs.mall.entity.*;
+import cc.mrbird.febs.mall.mapper.MallMemberMapper;
+import cc.mrbird.febs.mall.mapper.MallMemberWalletMapper;
+import cc.mrbird.febs.mall.service.IAdminMallMemberService;
+import cc.mrbird.febs.mall.service.IApiMallMemberService;
+import cc.mrbird.febs.mall.vo.AdminAgentLevelOptionTreeVo;
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.ibatis.annotations.Param;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.URLEncoder;
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
 import java.util.Map;
 
 @Slf4j
@@ -21,10 +47,27 @@
 @RequestMapping(value = "/admin/mallMember")
 public class AdminMallMemberController extends BaseController {
 
-    private final IMallMemberService mallMemberService;
+    private final IAdminMallMemberService mallMemberService;
+    private final MallMemberWalletMapper mallMemberWalletMapper;
+    private final MallMemberMapper mallMemberMapper;
+    private final IApiMallMemberService apiMallMemberService;
+
+    /**
+     * 平台账单
+     *
+     * @param mallMember
+     * @param request
+     * @return
+     */
+    @GetMapping("getMallDataList")
+    public FebsResponse getMallDataList(MallMember mallMember, QueryRequest request) {
+        Map<String, Object> data = getDataTable(mallMemberService.getMallDataList(mallMember, request));
+        return new FebsResponse().success().data(data);
+    }
 
     /**
      * 会员列表
+     *
      * @param mallMember
      * @param request
      * @return
@@ -34,4 +77,552 @@
         Map<String, Object> data = getDataTable(mallMemberService.getMallMemberList(mallMember, request));
         return new FebsResponse().success().data(data);
     }
+
+    @GetMapping("getFcmMallMemberList")
+    public FebsResponse getFcmMallMemberList(MallMember mallMember, QueryRequest request) {
+        Map<String, Object> data = getDataTable(mallMemberService.getFcmMallMemberList(mallMember, request));
+        return new FebsResponse().success().data(data);
+    }
+
+    /**
+     * 会员列表---禁止
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("closeAccount/{id}")
+    @ControllerEndpoint(operation = "会员列表---禁止", exceptionMessage = "禁止失败")
+    public FebsResponse closeAccount(@NotNull(message = "{required}") @PathVariable Long id) {
+        return mallMemberService.closeAccount(id);
+    }
+
+    /**
+     * 会员列表---开启
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("openAccount/{id}")
+    @ControllerEndpoint(operation = "会员列表---开启", exceptionMessage = "开启失败")
+    public FebsResponse openAccount(@NotNull(message = "{required}") @PathVariable Long id) {
+        return mallMemberService.openAccount(id);
+    }
+
+    /**
+     * 会员列表---冻结
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("frozenWithYes/{id}")
+    @ControllerEndpoint(operation = "冻结", exceptionMessage = "禁止失败")
+    public FebsResponse frozenWithYes(@NotNull(message = "{required}") @PathVariable Long id) {
+        return mallMemberService.frozenWith(id, ProductEnum.MEMBER_FROZEN.getValue());
+    }
+
+    /**
+     * 会员列表---解冻
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("frozenWithNo/{id}")
+    @ControllerEndpoint(operation = "解冻", exceptionMessage = "开启失败")
+    public FebsResponse frozenWithNo(@NotNull(message = "{required}") @PathVariable Long id) {
+        return mallMemberService.frozenWith(id,ProductEnum.MEMBER_UNFROZEN.getValue());
+    }
+
+    /**
+     * 会员列表---禁止
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("outsideWithYes/{id}")
+    @ControllerEndpoint(operation = "会员列表---禁止", exceptionMessage = "禁止失败")
+    public FebsResponse outsideWithYes(@NotNull(message = "{required}") @PathVariable Long id) {
+        return mallMemberService.outsideWithType(id,1);
+    }
+
+    /**
+     * 会员列表---开启
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("outsideWithNo/{id}")
+    @ControllerEndpoint(operation = "会员列表---开启", exceptionMessage = "开启失败")
+    public FebsResponse outsideWithNo(@NotNull(message = "{required}") @PathVariable Long id) {
+        return mallMemberService.outsideWithType(id,2);
+    }
+
+    /**
+     * 会员列表---禁止
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("insideWithYes/{id}")
+    @ControllerEndpoint(operation = "会员列表---禁止", exceptionMessage = "禁止失败")
+    public FebsResponse insideWithYes(@NotNull(message = "{required}") @PathVariable Long id) {
+        return mallMemberService.insideWithType(id,1);
+    }
+
+    /**
+     * 会员列表---开启
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("insideWithNo/{id}")
+    @ControllerEndpoint(operation = "会员列表---开启", exceptionMessage = "开启失败")
+    public FebsResponse insideWithNo(@NotNull(message = "{required}") @PathVariable Long id) {
+        return mallMemberService.insideWithType(id,2);
+    }
+
+    @GetMapping("changeIdentityYes/{type}/{id}")
+    public FebsResponse changeIdentityYes(@PathVariable("type") Integer type, @PathVariable("id") Long id) {
+        mallMemberService.changeIdentity(type, id, 1);
+        return new FebsResponse().success();
+    }
+
+    @GetMapping("changeIdentityNo/{type}/{id}")
+    public FebsResponse changeIdentityNo(@PathVariable("type") Integer type, @PathVariable("id") Long id) {
+        mallMemberService.changeIdentity(type, id, 2);
+        return new FebsResponse().success();
+    }
+
+    /**
+     * 会员列表-资金流水
+     */
+    @GetMapping("/moneyFlow")
+    @RequiresPermissions("moneyFlow:update")
+    public FebsResponse moneyFlow(QueryRequest request, MallMember mallMember, Integer parentId) {
+        if (parentId == null) {
+            ViewMallMemberController.idFromMoneyFlow = 0;
+        }
+        mallMember.setId(ViewMallMemberController.idFromMoneyFlow);
+        Map<String, Object> dataTable = getDataTable(mallMemberService.moneyFlow(request, mallMember));
+        return new FebsResponse().success().data(dataTable);
+    }
+
+    /**
+     * 会员列表-系统拨付
+     */
+    @PostMapping("updateSystemPay")
+    @ControllerEndpoint(operation = "会员列表-系统拨付", exceptionMessage = "操作失败")
+    public FebsResponse updateSystemPay(@Valid MallSystemPayDto mallSystemPayDto) {
+        return mallMemberService.updateSystemPay(mallSystemPayDto);
+    }
+
+    /**
+     * 会员列表-系统拨付
+     */
+    @PostMapping("updateSystemPayInfo")
+    @ControllerEndpoint(operation = "会员列表-系统拨付", exceptionMessage = "操作失败")
+    public FebsResponse updateSystemPayInfo(@Valid MallSystemPayDto mallSystemPayDto) {
+        return mallMemberService.updateSystemPayInfo(mallSystemPayDto);
+    }
+
+    /**
+     * 会员列表-系统拨付绿色凭证
+     */
+    @PostMapping("updateVoucher")
+    @ControllerEndpoint(operation = "会员列表-系统拨付绿色凭证", exceptionMessage = "操作失败")
+    public FebsResponse updateVoucher(@Valid MallSystemPayDto mallSystemPayDto) {
+//        return mallMemberService.updateSystemPay(mallSystemPayDto);
+        return mallMemberService.updateVoucher(mallSystemPayDto);
+    }
+
+    /**
+     * 会员列表-详情更新
+     */
+    @PostMapping("updateMemberInfo")
+    @ControllerEndpoint(operation = "会员列表-详情更新", exceptionMessage = "操作失败")
+    public FebsResponse updateMemberInfo(@Valid MallUpdateMemberInfoDto mallUpdateMemberInfoDto) {
+        return mallMemberService.updateMemberInfo(mallUpdateMemberInfoDto);
+    }
+
+    /**
+     * 资金流水-列表
+     *
+     * @param moneyFlowListDto
+     * @param request
+     * @return
+     */
+    @GetMapping("getMoneyFlowList")
+    public FebsResponse getMoneyFlowList(MoneyFlowListDto moneyFlowListDto, QueryRequest request) {
+        Map<String, Object> data = getDataTable(mallMemberService.getMoneyFlowListInPage(moneyFlowListDto, request));
+        return new FebsResponse().success().data(data);
+    }
+
+    /**
+     * 会员提现-列表
+     *
+     * @param moneyChargeListDto
+     * @param request
+     * @return
+     */
+    @GetMapping("getMoneyChargeList")
+    public FebsResponse getMoneyChargeList(MoneyChargeListDto moneyChargeListDto, QueryRequest request) {
+        Map<String, Object> data = getDataTable(mallMemberService.getMoneyChargeListInPage(moneyChargeListDto, request));
+        return new FebsResponse().success().data(data);
+    }
+
+    /**
+     * 会员提现-同意
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("chargeAgree/{id}")
+    @ControllerEndpoint(operation = "会员提现-同意", exceptionMessage = "操作失败")
+    public FebsResponse chargeAgree(@NotNull(message = "{required}") @PathVariable Long id) {
+        return mallMemberService.chargeAgree(id);
+    }
+
+    /**
+     * 会员提现-同意
+     */
+    @PostMapping("chargeAgreeWithType")
+    @ControllerEndpoint(operation = " 会员提现-同意", exceptionMessage = "操作失败")
+    public FebsResponse chargeAgreeWithType(@Valid MallMemberWithdraw mallMemberWithdraw) {
+        return mallMemberService.chargeAgreeWithType(mallMemberWithdraw);
+    }
+
+    /**
+     * 会员提现-查看结果
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("searchInfo/{id}")
+    @ControllerEndpoint(operation = "会员提现-查看结果", exceptionMessage = "操作失败")
+    public FebsResponse searchInfo(@NotNull(message = "{required}") @PathVariable Long id) {
+        return mallMemberService.searchInfo(id);
+    }
+
+    /**
+     * 会员提现-账户余额
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("accountInfo/{id}")
+    @ControllerEndpoint(operation = "会员提现-账户余额", exceptionMessage = "操作失败")
+    public FebsResponse accountInfo(@NotNull(message = "{required}") @PathVariable Long id) {
+        return mallMemberService.accountInfo(id);
+    }
+
+    /**
+     * 会员提现-拒绝
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("chargeDisagree/{id}")
+    @ControllerEndpoint(operation = "会员提现-拒绝", exceptionMessage = "操作失败")
+    public FebsResponse chargeDisagree(@NotNull(message = "{required}") @PathVariable Long id) {
+        return mallMemberService.chargeDisagree(id);
+    }
+
+    /**
+     * 代理列表
+     *
+     * @param agentDto
+     * @param request
+     * @return
+     */
+    @GetMapping("getAgentList")
+    public FebsResponse getAgentList(AgentDto agentDto, QueryRequest request) {
+        Map<String, Object> data = getDataTable(mallMemberService.getAgentList(agentDto, request));
+        return new FebsResponse().success().data(data);
+    }
+
+    /**
+     * 代理级别-列表
+     *
+     * @param agentLevelDto
+     * @param request
+     * @return
+     */
+    @GetMapping("getAgentLevelList")
+    public FebsResponse getAgentLevelList(AgentLevelDto agentLevelDto, QueryRequest request) {
+        Map<String, Object> data = getDataTable(mallMemberService.getAgentLevelList(agentLevelDto, request));
+        return new FebsResponse().success().data(data);
+    }
+
+    /**
+     * 代理级别-更新
+     */
+    @PostMapping("agentLevelUpdate")
+    @ControllerEndpoint(operation = "商家支付方式-更新", exceptionMessage = "操作失败")
+    public FebsResponse agentLevelUpdate(@Valid AgentLevelUpdateDto agentLevelUpdateDto) {
+        return mallMemberService.agentLevelUpdate(agentLevelUpdateDto);
+    }
+
+    /**
+     * 代理-等级选择Option
+     */
+    @GetMapping("getAgentLevelOption/tree")
+    @ControllerEndpoint(exceptionMessage = "获取等级失败")
+    public List<AdminAgentLevelOptionTreeVo> getAgentLevelOption() {
+        return mallMemberService.getAgentLevelOption();
+    }
+
+
+    /**
+     * 代理列表-全部成员
+     */
+    @GetMapping("/agentChild")
+    public FebsResponse agentChild(QueryRequest request, MallMember mallMember, Integer parentId) {
+        if (parentId == null) {
+            ViewMallMemberController.idFromAgentAllMember = 0;
+        }
+        mallMember.setId(ViewMallMemberController.idFromAgentAllMember);
+        Map<String, Object> dataTable = getDataTable(mallMemberService.agentChild(request, mallMember));
+        return new FebsResponse().success().data(dataTable);
+    }
+
+    /**
+     * 代理列表---激活
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("activateAccount/{id}")
+    @ControllerEndpoint(operation = "代理列表---激活", exceptionMessage = "操作失败")
+    public FebsResponse activateAccount(@NotNull(message = "{required}") @PathVariable Long id) {
+        return mallMemberService.activateAccount(id);
+    }
+
+    /**
+     * 代理列表-设置代理级别
+     */
+    @PostMapping("agentLevelSetUpdate")
+    @ControllerEndpoint(operation = "代理列表-设置代理级别", exceptionMessage = "操作失败")
+    public FebsResponse agentLevelSetUpdate(@Valid AgentLevelSetUpdateDto agentLevelSetUpdateDto) {
+        return mallMemberService.agentLevelSetUpdate(agentLevelSetUpdateDto);
+    }
+
+    /**
+     * 奖励设置-列表
+     *
+     * @param rankAwardDto
+     * @param request
+     * @return
+     */
+    @GetMapping("getRankAwardList")
+    public FebsResponse getRankAwardList(RankAwardDto rankAwardDto, QueryRequest request) {
+        Map<String, Object> data = getDataTable(mallMemberService.getRankAwardList(rankAwardDto, request));
+        return new FebsResponse().success().data(data);
+    }
+
+    /**
+     * 奖励设置-更新
+     */
+    @PostMapping("rankAwardUpdate")
+    @ControllerEndpoint(operation = "奖励设置-更新", exceptionMessage = "操作失败")
+    public FebsResponse rankAwardUpdate(@Valid RankAwardUpdateDto rankAwardUpdateDto) {
+        return mallMemberService.rankAwardUpdate(rankAwardUpdateDto);
+    }
+
+    /**
+     * App版本-列表
+     *
+     * @param appVersion
+     * @param request
+     * @return
+     */
+    @GetMapping("getAppVersionList")
+    public FebsResponse getAppVersionList(AppVersion appVersion, QueryRequest request) {
+        Map<String, Object> data = getDataTable(mallMemberService.getAppVersionList(appVersion, request));
+        return new FebsResponse().success().data(data);
+    }
+
+    /**
+     * App版本-删除
+     */
+    @GetMapping("delAppVersion/{id}")
+    @ControllerEndpoint(operation = " App版本-删除", exceptionMessage = "操作失败")
+    public FebsResponse delAppVersion(@NotNull(message = "{required}") @PathVariable Long id) {
+        return mallMemberService.delCategary(id);
+    }
+
+    /**
+     * App版本-新增
+     */
+    @PostMapping("addAppVersion")
+    @ControllerEndpoint(operation = " App版本-新增", exceptionMessage = "操作失败")
+    public FebsResponse addAppVersion(@Valid AppVersion appVersion) {
+        return mallMemberService.addAppVersion(appVersion);
+    }
+
+    /**
+     * App版本-更新
+     */
+    @PostMapping("updateAppVersion")
+    @ControllerEndpoint(operation = "App版本-更新", exceptionMessage = "操作失败")
+    public FebsResponse updateAppVersion(@Valid AppVersion appVersion) {
+        return mallMemberService.updateAppVersion(appVersion);
+    }
+
+
+    @PostMapping("resetPwd/{id}")
+    @ControllerEndpoint(operation = "会员列表---重置密码", exceptionMessage = "重置密码失败")
+    public FebsResponse resetPwd(@PathVariable("id") Long id) {
+        return mallMemberService.resetPwd(id);
+    }
+
+    @PostMapping(value = "resetPwdNew/{type}/{ids}")
+    @ControllerEndpoint(operation = "重置密码", exceptionMessage = "重置密码失败")
+    public FebsResponse resetPwd(@PathVariable("ids") String ids, @PathVariable("type") Integer type) {
+        mallMemberService.resetPwd(ids, type);
+        return new FebsResponse().success().message("重置成功");
+    }
+
+    @GetMapping("shopApplyList")
+    @ControllerEndpoint(operation = "申请通道列表", exceptionMessage = "获取失败")
+    public FebsResponse shopApplyList(MallShopApply mallShopApply, QueryRequest request) {
+        return new FebsResponse().success().data(getDataTable(mallMemberService.findShopApplyListInPage(mallShopApply, request)));
+    }
+
+    @PostMapping("applyCheckAgree/{id}")
+    public FebsResponse applyCheckAgree(@PathVariable Long id) {
+        mallMemberService.applyCheckAgree(id);
+        return new FebsResponse().success().message("操作成功");
+    }
+
+    @PostMapping(value = "applyCheckDisAgree/{id}")
+    public FebsResponse applyCheckDisAgree(@PathVariable Long id) {
+        mallMemberService.applyCheckDisAgree(id);
+        return new FebsResponse().success().message("操作成功");
+    }
+
+    @PostMapping("updateShopApply")
+    @ControllerEndpoint(operation = "商户申请编辑", exceptionMessage = "操作失败")
+    public FebsResponse updateShopApply(@Valid MallShopApply apply) {
+        mallMemberService.updateShopApply(apply);
+        return new FebsResponse().success();
+    }
+
+    @PostMapping("/refererIdUpdate")
+    @ControllerEndpoint(operation = "修改推荐人", exceptionMessage = "修改失败")
+    public FebsResponse refererIdUpdate(MallMember member) {
+        mallMemberService.modifyReferer(member);
+        return new FebsResponse().success();
+    }
+
+    @PostMapping("/memberAdd")
+    public FebsResponse memberAdd(MallMember member) {
+        RegisterDto registerDto = new RegisterDto();
+        Integer selectCount = mallMemberMapper.selectCount(null);
+        String account = new StringBuilder().append("bbsz").append(ShareCodeUtil.toSerialNumberCode(selectCount)).toString();
+        String key = ShareCodeUtil.toSerialCode(selectCount);
+        registerDto.setAccountLogin(account);
+        registerDto.setUserKey(key);
+        registerDto.setPassword("a123456");
+        registerDto.setTradePassword("123456");
+        registerDto.setInviteId(member.getInviteId());
+        apiMallMemberService.register(registerDto);
+        return new FebsResponse().success();
+    }
+
+    /**
+     * 创世释放记录-列表
+     * @param roleReleaseDto
+     * @param request
+     * @return
+     */
+    @GetMapping("gerRoleRelease")
+    public FebsResponse gerRoleRelease(AdminRoleReleaseDto roleReleaseDto, QueryRequest request) {
+        Map<String, Object> data = getDataTable(mallMemberService.gerRoleReleaseList(roleReleaseDto, request));
+        return new FebsResponse().success().data(data);
+    }
+
+    /**
+     * 创世释放记录-全部记录
+     */
+    @GetMapping("/roleReleaseChild")
+    public FebsResponse roleReleaseChild(QueryRequest request, MallScoreRecord mallScoreRecord, Integer parentId) {
+        if (parentId == null) {
+            ViewMallMemberController.idFromScoreRoleRelease = 0;
+        }
+        mallScoreRecord.setId(ViewMallMemberController.idFromScoreRoleRelease);
+        Map<String, Object> dataTable = getDataTable(mallMemberService.roleReleaseChild(request, mallScoreRecord));
+        return new FebsResponse().success().data(dataTable);
+    }
+
+    /**
+     * 业绩释放记录-列表
+     * @param roleReleaseDto
+     * @param request
+     * @return
+     */
+    @GetMapping("gerAchieveRelease")
+    public FebsResponse gerAchieveRelease(AdminRoleReleaseDto roleReleaseDto, QueryRequest request) {
+        Map<String, Object> data = getDataTable(mallMemberService.gerAchieveReleaseList(roleReleaseDto, request));
+        return new FebsResponse().success().data(data);
+    }
+
+    /**
+     * 业绩释放记录-全部记录
+     */
+    @GetMapping("/achieveReleaseChild")
+    public FebsResponse achieveReleaseChild(QueryRequest request, MallScoreAchieveRelease mallScoreAchieveRelease, Integer parentId) {
+        if (parentId == null) {
+            ViewMallMemberController.idFromScoreAchieveRelease = 0;
+        }
+        mallScoreAchieveRelease.setId(ViewMallMemberController.idFromScoreAchieveRelease);
+        Map<String, Object> dataTable = getDataTable(mallMemberService.achieveReleaseChild(request, mallScoreAchieveRelease));
+        return new FebsResponse().success().data(dataTable);
+    }
+
+    @GetMapping("exportMember")
+    @ControllerEndpoint(operation = "会员列表", exceptionMessage = "导出失败")
+    public FebsResponse exportMemberList(MallMember mallMember, HttpServletResponse response) throws IOException {
+
+        List<ExcelSheetPO> res = new ArrayList<>();
+        ExcelSheetPO orderSheet = new ExcelSheetPO();
+        String title = "会员列表";
+        orderSheet.setSheetName(title);
+        orderSheet.setTitle(title);
+        String[] header = {"登录账户", "手机号码", "名称", "余额", "现金积分", "贡献点", "补贴额度", "凭证", "凭证现金"};
+        orderSheet.setHeaders(header);
+
+        QueryRequest request = new QueryRequest();
+        request.setPageNum(1);
+        request.setPageSize(9999);
+        List<MallMember> dataList = mallMemberMapper.selectList(null);
+        List<List<Object>> list = new ArrayList<>();
+        if (dataList.size() > 0) {
+            for (MallMember item : dataList) {
+                List<Object> temp = new ArrayList<>();
+                temp.add(item.getAccountLogin());
+                temp.add(item.getPhone());
+                temp.add(item.getName());
+
+                Long memberId = item.getId();
+                MallMemberWallet mallMemberWallet = mallMemberWalletMapper.selectWalletByMemberId(memberId);
+                if(ObjectUtil.isNotNull(mallMemberWallet)){
+                    temp.add(mallMemberWallet.getBalance());
+                    temp.add(mallMemberWallet.getPrizeScore());
+                    temp.add(mallMemberWallet.getStar());
+                    temp.add(mallMemberWallet.getTotalScore());
+                    temp.add(mallMemberWallet.getVoucherCnt());
+                    temp.add(mallMemberWallet.getVoucherAmount());
+                }
+                list.add(temp);
+            }
+        }
+        orderSheet.setDataList(list);
+        res.add(orderSheet);
+        response = ResponseHeadUtil.setExcelHead(response);
+        response.setHeader("Content-Disposition",
+                "attachment;filename=" + URLEncoder.encode(title + DateUtil.format(new Date(), "yyyyMMDDHHmmss") + ".xlsx".trim(), "UTF-8"));
+        OutputStream os = response.getOutputStream();
+        ExcelUtil.createWorkbookAtOutStream(ExcelVersion.V2007, res, os, true);
+        return null;
+    }
+
 }

--
Gitblit v1.9.1