From f52cfc92db48d9a215d7f728ce4000de1cdd6ae2 Mon Sep 17 00:00:00 2001 From: KKSU <15274802129@163.com> Date: Tue, 10 Sep 2024 09:55:31 +0800 Subject: [PATCH] 增加会员升级日志打印 --- src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java | 506 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 478 insertions(+), 28 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 34919c2..84d5b96 100644 --- a/src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java +++ b/src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java @@ -4,19 +4,42 @@ 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.common.enumerates.FlowTypeNewEnum; +import cc.mrbird.febs.common.enumerates.MoneyFlowTypeNewEnum; +import cc.mrbird.febs.common.enumerates.ProductEnum; +import cc.mrbird.febs.common.utils.MallUtils; +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.AppVersion; -import cc.mrbird.febs.mall.entity.MallMember; -import cc.mrbird.febs.mall.entity.MallNewsInfo; +import cc.mrbird.febs.mall.entity.*; +import cc.mrbird.febs.mall.mapper.*; import cc.mrbird.febs.mall.service.IAdminMallMemberService; +import cc.mrbird.febs.mall.service.IApiMallMemberService; +import cc.mrbird.febs.mall.service.IMallMoneyFlowService; 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.*; +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; @@ -28,9 +51,149 @@ public class AdminMallMemberController extends BaseController { private final IAdminMallMemberService mallMemberService; + private final MallMemberWalletMapper mallMemberWalletMapper; + private final MallMemberAmountMapper mallMemberAmountMapper; + private final MallMemberMapper mallMemberMapper; + private final IApiMallMemberService apiMallMemberService; + private final MallMemberChargeMapper mallMemberChargeMapper; + private final IMallMoneyFlowService mallMoneyFlowService; + private final MallMemberWithdrawMapper mallMemberWithdrawMapper; + + + @GetMapping("confirmOrder") + @ControllerEndpoint(operation = "批量充值", exceptionMessage = "操作失败") + public FebsResponse confirmOrder(MemberChargrDto memberChargrDto){ + String orderIds = memberChargrDto.getOrderIds(); + List<String> ids = StrUtil.splitTrim(orderIds, ","); + for(String id : ids){ + long orderId = Long.parseLong(id); + MallMemberCharge mallMemberCharge = mallMemberChargeMapper.selectById(orderId); + if(1 != mallMemberCharge.getState()){ + continue; + } + MallMemberAmount mallMemberAmount = mallMemberAmountMapper.selectByMemberId(mallMemberCharge.getMemberId()); + mallMemberAmount.setFcmCntAva(mallMemberAmount.getFcmCntAva().add(mallMemberCharge.getAmount())); + mallMemberAmountMapper.updateFcmCntAvaById(mallMemberAmount); + + mallMemberCharge.setState(2); + mallMemberChargeMapper.updateById(mallMemberCharge); + + String orderNo = MallUtils.getOrderNum("BF"); + mallMoneyFlowService.addMoneyFlow( + mallMemberCharge.getMemberId(), + mallMemberCharge.getAmount(), + MoneyFlowTypeNewEnum.FCM_INSIDE_IN.getValue(), + orderNo, + mallMemberCharge.getMemberId(), + FlowTypeNewEnum.FCM_COIN.getValue(), + MoneyFlowTypeNewEnum.FCM_INSIDE_IN.getDescrition()); + } + return new FebsResponse().success(); + } + + + @GetMapping("confirmCancel") + @ControllerEndpoint(operation = "批量取消", exceptionMessage = "操作失败") + public FebsResponse confirmCancel(MemberChargrDto memberChargrDto){ + String orderIds = memberChargrDto.getOrderIds(); + List<String> ids = StrUtil.splitTrim(orderIds, ","); + for(String id : ids){ + long orderId = Long.parseLong(id); + MallMemberCharge mallMemberCharge = mallMemberChargeMapper.selectById(orderId); + if(1 != mallMemberCharge.getState()){ + continue; + } + mallMemberCharge.setState(3); + mallMemberChargeMapper.updateById(mallMemberCharge); + } + return new FebsResponse().success(); + } + + @GetMapping("confirmCancelWithdraw") + @ControllerEndpoint(operation = "批量提现取消", exceptionMessage = "操作失败") + public FebsResponse confirmCancelWithdraw(MemberChargrDto memberChargrDto){ + String orderIds = memberChargrDto.getOrderIds(); + List<String> ids = StrUtil.splitTrim(orderIds, ","); + for(String id : ids){ + long orderId = Long.parseLong(id); + MallMemberWithdraw mallMemberWithdraw = mallMemberWithdrawMapper.selectById(orderId); + if(1 != mallMemberWithdraw.getStatus()){ + continue; + } + mallMemberWithdraw.setStatus(3); + mallMemberWithdrawMapper.updateById(mallMemberWithdraw); + + MallMemberAmount mallMemberAmount = mallMemberAmountMapper.selectByMemberId(mallMemberWithdraw.getMemberId()); + mallMemberAmount.setFcmCntAva(mallMemberAmount.getFcmCntAva().subtract(mallMemberWithdraw.getAmount())); + mallMemberAmountMapper.updateFcmCntAvaById(mallMemberAmount); + } + return new FebsResponse().success(); + } + + + @GetMapping("confirmWithdraw") + @ControllerEndpoint(operation = "批量同意", exceptionMessage = "操作失败") + public FebsResponse confirmWithdraw(MemberChargrDto memberChargrDto){ + String orderIds = memberChargrDto.getOrderIds(); + List<String> ids = StrUtil.splitTrim(orderIds, ","); + for(String id : ids){ + long orderId = Long.parseLong(id); + MallMemberWithdraw mallMemberWithdraw = mallMemberWithdrawMapper.selectById(orderId); + if(1 != mallMemberWithdraw.getStatus()){ + continue; + } + mallMemberWithdraw.setStatus(2); + mallMemberWithdrawMapper.updateById(mallMemberWithdraw); + + String orderNo = MallUtils.getOrderNum("BF"); + mallMoneyFlowService.addMoneyFlow( + mallMemberWithdraw.getMemberId(), + mallMemberWithdraw.getAmount(), + MoneyFlowTypeNewEnum.FCM_INSIDE_OUT.getValue(), + orderNo, + mallMemberWithdraw.getId(), + FlowTypeNewEnum.FCM_COIN.getValue(), + MoneyFlowTypeNewEnum.FCM_INSIDE_OUT.getDescrition()); + } + return new FebsResponse().success(); + } + + + /** + * 充值列表 + */ + @GetMapping("memberChargeList") + public FebsResponse memberChargeList(MoneyChargeListDto moneyChargeListDto, QueryRequest request) { + Map<String, Object> data = getDataTable(mallMemberService.memberChargeList(moneyChargeListDto, request)); + return new FebsResponse().success().data(data); + } + + + /** + * 提现列表 + */ + @GetMapping("memberWithDrawList") + public FebsResponse memberWithDrawList(MoneyChargeListDto moneyChargeListDto, QueryRequest request) { + Map<String, Object> data = getDataTable(mallMemberService.memberWithDrawList(moneyChargeListDto, request)); + return new FebsResponse().success().data(data); + } + + /** + * 平台账单 + * + * @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 @@ -41,8 +204,15 @@ 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 */ @@ -54,6 +224,7 @@ /** * 会员列表---开启 + * * @param id * @return */ @@ -64,12 +235,97 @@ } /** + * 会员列表---冻结 + * + * @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; + if (parentId == null) { + ViewMallMemberController.idFromMoneyFlow = 0; } mallMember.setId(ViewMallMemberController.idFromMoneyFlow); Map<String, Object> dataTable = getDataTable(mallMemberService.moneyFlow(request, mallMember)); @@ -86,7 +342,36 @@ } /** + * 会员列表-系统拨付 + */ + @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 @@ -99,6 +384,7 @@ /** * 会员提现-列表 + * * @param moneyChargeListDto * @param request * @return @@ -111,6 +397,7 @@ /** * 会员提现-同意 + * * @param id * @return */ @@ -121,7 +408,41 @@ } /** + * 会员提现-同意 + */ + @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 */ @@ -133,6 +454,7 @@ /** * 代理列表 + * * @param agentDto * @param request * @return @@ -145,6 +467,7 @@ /** * 代理级别-列表 + * * @param agentLevelDto * @param request * @return @@ -169,7 +492,7 @@ */ @GetMapping("getAgentLevelOption/tree") @ControllerEndpoint(exceptionMessage = "获取等级失败") - public List<AdminAgentLevelOptionTreeVo> getAgentLevelOption(){ + public List<AdminAgentLevelOptionTreeVo> getAgentLevelOption() { return mallMemberService.getAgentLevelOption(); } @@ -179,8 +502,8 @@ */ @GetMapping("/agentChild") public FebsResponse agentChild(QueryRequest request, MallMember mallMember, Integer parentId) { - if(parentId==null){ - ViewMallMemberController.idFromAgentAllMember=0; + if (parentId == null) { + ViewMallMemberController.idFromAgentAllMember = 0; } mallMember.setId(ViewMallMemberController.idFromAgentAllMember); Map<String, Object> dataTable = getDataTable(mallMemberService.agentChild(request, mallMember)); @@ -189,6 +512,7 @@ /** * 代理列表---激活 + * * @param id * @return */ @@ -199,7 +523,17 @@ } /** + * 代理列表-设置代理级别 + */ + @PostMapping("agentLevelSetUpdate") + @ControllerEndpoint(operation = "代理列表-设置代理级别", exceptionMessage = "操作失败") + public FebsResponse agentLevelSetUpdate(@Valid AgentLevelSetUpdateDto agentLevelSetUpdateDto) { + return mallMemberService.agentLevelSetUpdate(agentLevelSetUpdateDto); + } + + /** * 奖励设置-列表 + * * @param rankAwardDto * @param request * @return @@ -221,6 +555,7 @@ /** * App版本-列表 + * * @param appVersion * @param request * @return @@ -258,47 +593,162 @@ 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.toSerialNumberCode(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 mallNewsInfo + * 创世释放记录-列表 + * @param roleReleaseDto * @param request * @return */ - @GetMapping("getNewInfoList") - public FebsResponse getNewInfoList(MallNewsInfo mallNewsInfo, QueryRequest request) { - Map<String, Object> data = getDataTable(mallMemberService.getNewInfoList(mallNewsInfo, request)); + @GetMapping("gerRoleRelease") + public FebsResponse gerRoleRelease(AdminRoleReleaseDto roleReleaseDto, QueryRequest request) { + Map<String, Object> data = getDataTable(mallMemberService.gerRoleReleaseList(roleReleaseDto, request)); return new FebsResponse().success().data(data); } /** - * 新闻中心-新增 + * 创世释放记录-全部记录 */ - @PostMapping("addNewsInfo") - @ControllerEndpoint(operation = " 新闻中心-新增", exceptionMessage = "操作失败") - public FebsResponse addNewsInfo(@Valid MallNewsInfoDto mallNewsInfoDto) { - return mallMemberService.addNewsInfo(mallNewsInfoDto); + @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("delNewsInfo/{id}") - @ControllerEndpoint(operation = " 新闻中心-删除", exceptionMessage = "操作失败") - public FebsResponse delNewsInfo(@NotNull(message = "{required}") @PathVariable Long id) { - return mallMemberService.delNewsInfo(id); + @GetMapping("gerAchieveRelease") + public FebsResponse gerAchieveRelease(AdminRoleReleaseDto roleReleaseDto, QueryRequest request) { + Map<String, Object> data = getDataTable(mallMemberService.gerAchieveReleaseList(roleReleaseDto, request)); + return new FebsResponse().success().data(data); } /** - * 新闻中心-更新 + * 业绩释放记录-全部记录 */ - @PostMapping("updateNewsInfo") - @ControllerEndpoint(operation = "新闻中心-更新", exceptionMessage = "操作失败") - public FebsResponse updateNewsInfo(@Valid MallNewsInfoDto mallNewsInfoDto) { - return mallMemberService.updateNewsInfo(mallNewsInfoDto); + @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