From 4aadcef501578dfac75ea046a92197fc06ad9303 Mon Sep 17 00:00:00 2001 From: perry <292303709@qq.com> Date: Sun, 28 May 2023 11:36:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/promoter/PromoterController.java | 5 ++--- .../admin/promoter/vo/PromoterExcelVO.java | 13 ++++++------ .../promoter/vo/PromoterExportReqVO.java | 16 +++++++++++++-- .../dal/mysql/promoter/PromoterMapper.java | 4 +++- .../service/promoter/PromoterService.java | 2 +- .../service/promoter/PromoterServiceImpl.java | 4 ++-- .../mapper/promoter/PromoterMapper.xml | 20 +++++++++++++++++++ .../src/views/member/promoter/index.vue | 8 ++++---- 8 files changed, 53 insertions(+), 19 deletions(-) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/promoter/PromoterController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/promoter/PromoterController.java index 362deaefc..07abbc93a 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/promoter/PromoterController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/promoter/PromoterController.java @@ -98,10 +98,9 @@ public class PromoterController { @OperateLog(type = EXPORT) public void exportPromoterExcel(@Valid PromoterExportReqVO exportReqVO, HttpServletResponse response) throws IOException { - List list = promoterService.getPromoterList(exportReqVO); + List list = promoterService.getPromoterList(exportReqVO); // 导出 Excel - List datas = PromoterConvert.INSTANCE.convertList02(list); - ExcelUtils.write(response, "推广员.xls", "数据", PromoterExcelVO.class, datas); + ExcelUtils.write(response, "推广员.xls", "数据", PromoterExcelVO.class, list); } @GetMapping("/get-import-template") @Operation(summary = "获得导入推广员模板") diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/promoter/vo/PromoterExcelVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/promoter/vo/PromoterExcelVO.java index a837dbe7f..641a446ae 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/promoter/vo/PromoterExcelVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/promoter/vo/PromoterExcelVO.java @@ -14,13 +14,14 @@ import com.alibaba.excel.annotation.ExcelProperty; @Data public class PromoterExcelVO { - @ExcelProperty("编号") - private Long id; - @ExcelProperty("组织id") - private String deptId; + @ExcelProperty("组织") + private String orgName; - @ExcelProperty("会员id") - private Long userId; + @ExcelProperty("推广员名称") + private String nickname; + + @ExcelProperty("电话") + private String mobile; } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/promoter/vo/PromoterExportReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/promoter/vo/PromoterExportReqVO.java index 823d2c52c..04e6801eb 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/promoter/vo/PromoterExportReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/promoter/vo/PromoterExportReqVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.member.controller.admin.promoter.vo; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import lombok.*; import java.util.*; import io.swagger.v3.oas.annotations.media.Schema; @@ -12,7 +13,18 @@ public class PromoterExportReqVO { @Schema(description = "组织id", example = "18443") private String deptId; - @Schema(description = "会员id", example = "5841") - private Long userId; + @Schema(description = "推广员名称", example = "5841") + private String nickname; + + @Schema(description = "推广员手机号", example = "15601691300") + private String mobile; + + /** + * 帐号状态 + *

+ * 枚举 {@link CommonStatusEnum} + */ + @Schema(description = "帐号状态") + private Integer status; } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/promoter/PromoterMapper.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/promoter/PromoterMapper.java index c440161cf..782975d9d 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/promoter/PromoterMapper.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/promoter/PromoterMapper.java @@ -26,12 +26,14 @@ public interface PromoterMapper extends BaseMapperX { } IPage findListPage(IPage page, @Param("data") PromoterPageReqVO data); + + List findList(@Param("data") PromoterExportReqVO data); + PromoterRespVO getPromoterInfo(@Param("userId") Long userId); default List selectList(PromoterExportReqVO reqVO) { return selectList(new LambdaQueryWrapperX() .eqIfPresent(PromoterDO::getDeptId, reqVO.getDeptId()) - .eqIfPresent(PromoterDO::getUserId, reqVO.getUserId()) .orderByDesc(PromoterDO::getId)); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/promoter/PromoterService.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/promoter/PromoterService.java index 298117795..843bcfb62 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/promoter/PromoterService.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/promoter/PromoterService.java @@ -75,7 +75,7 @@ public interface PromoterService { * @param exportReqVO 查询条件 * @return 推广员列表 */ - List getPromoterList(PromoterExportReqVO exportReqVO); + List getPromoterList(PromoterExportReqVO exportReqVO); PromoterRespVO getPromoterInfo(Long userId); diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/promoter/PromoterServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/promoter/PromoterServiceImpl.java index ba044b319..3ca6f47ee 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/promoter/PromoterServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/promoter/PromoterServiceImpl.java @@ -158,8 +158,8 @@ public class PromoterServiceImpl implements PromoterService { } @Override - public List getPromoterList(PromoterExportReqVO exportReqVO) { - return promoterMapper.selectList(exportReqVO); + public List getPromoterList(PromoterExportReqVO exportReqVO) { + return promoterMapper.findList(exportReqVO); } @Override diff --git a/yudao-module-member/yudao-module-member-biz/src/main/resources/mapper/promoter/PromoterMapper.xml b/yudao-module-member/yudao-module-member-biz/src/main/resources/mapper/promoter/PromoterMapper.xml index 1c0cf75cc..4f188cc66 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/resources/mapper/promoter/PromoterMapper.xml +++ b/yudao-module-member/yudao-module-member-biz/src/main/resources/mapper/promoter/PromoterMapper.xml @@ -30,6 +30,26 @@ + +