From 6380c668e9fa23181e6144fa0350a3fc23bab3fa Mon Sep 17 00:00:00 2001 From: aikai Date: Mon, 17 Mar 2025 09:12:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(crm):=20=E5=A2=9E=E5=8A=A0=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=AD=9B=E9=80=89=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=AE=A2=E6=88=B7=E6=9F=A5=E8=AF=A2-=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=20TimeQueryVO=20=E7=B1=BB=E7=94=A8=E4=BA=8E=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=AD=9B=E9=80=89=20-=20=E5=9C=A8=20RankController=20?= =?UTF-8?q?=E5=92=8C=20RankService=20=E4=B8=AD=E9=9B=86=E6=88=90=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=AD=9B=E9=80=89=E5=8A=9F=E8=83=BD-=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20CrmCustomerMapper=20=E4=B8=AD=E7=9A=84=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=96=B9=E6=B3=95=EF=BC=8C=E6=94=AF=E6=8C=81=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E5=92=8C=E5=A4=9A=E6=9D=A1=E4=BB=B6=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=20-=20=E5=9C=A8=20CrmCustomerDO=20=E4=B8=AD=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=20ownUserName=20=E5=AD=97=E6=AE=B5=20-=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=20XML=20=E6=96=87=E4=BB=B6=E4=BB=A5=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=96=B0=E7=9A=84=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/crmanalysis/RankController.java | 9 ++-- .../admin/crmanalysis/vo/TimeQueryVO.java | 16 ++++++ .../userlivetree/UserLiveTreeController.java | 6 --- .../dataobject/crmcustomer/CrmCustomerDO.java | 4 ++ .../mysql/crmcontract/CrmContractMapper.java | 3 +- .../CrmContractReceivablesMapper.java | 3 +- .../mysql/crmcustomer/CrmCustomerMapper.java | 36 +++++++------ .../job/salesperformance/AutoConfirmJob.java | 2 +- .../crm/service/crmanalysis/RankService.java | 5 +- .../service/crmanalysis/RankServiceImpl.java | 9 ++-- .../crmcustomer/CrmCustomerServiceImpl.java | 7 +-- .../mapper/crmcontract/CrmContractMapper.xml | 8 +++ .../CrmContractReceivablesMapper.xml | 8 +++ .../mapper/crmcustomer/CrmCustomerMapper.xml | 53 +++++++++++++++++++ 14 files changed, 130 insertions(+), 39 deletions(-) create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/crmanalysis/vo/TimeQueryVO.java diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/crmanalysis/RankController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/crmanalysis/RankController.java index ae406190..d81d6eeb 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/crmanalysis/RankController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/crmanalysis/RankController.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.crmanalysis; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.ContractVO; +import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.TimeQueryVO; import cn.iocoder.yudao.module.crm.service.crmanalysis.RankService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -28,14 +29,14 @@ public class RankController { @GetMapping("/contract") @Operation(summary = "获得合同排名") - public CommonResult> getContractRank() { - return success(rankService.getContractRank()); + public CommonResult> getContractRank(TimeQueryVO vo) { + return success(rankService.getContractRank(vo)); } @GetMapping("/receivables") @Operation(summary = "获得回款排名") - public CommonResult> getRecevablesRank() { - return success(rankService.getReceivablesRank()); + public CommonResult> getRecevablesRank(TimeQueryVO vo) { + return success(rankService.getReceivablesRank(vo)); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/crmanalysis/vo/TimeQueryVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/crmanalysis/vo/TimeQueryVO.java new file mode 100644 index 00000000..3835fbe3 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/crmanalysis/vo/TimeQueryVO.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Data +public class TimeQueryVO { + @Schema(description = "时间数组") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] times; +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/userlivetree/UserLiveTreeController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/userlivetree/UserLiveTreeController.java index 3c703db2..a4d942d0 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/userlivetree/UserLiveTreeController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/userlivetree/UserLiveTreeController.java @@ -44,7 +44,6 @@ public class UserLiveTreeController { @PostMapping("/create") @Operation(summary = "创建crm用户结构树") - @PreAuthorize("@ss.hasPermission('crm:user-live-tree:create')") public CommonResult createUserLiveTree(@Valid @RequestBody UserLiveTreeSaveReqVO createReqVO) { return success(userLiveTreeService.createUserLiveTree(createReqVO)); } @@ -58,7 +57,6 @@ public class UserLiveTreeController { @PutMapping("/update") @Operation(summary = "更新crm用户结构树") - @PreAuthorize("@ss.hasPermission('crm:user-live-tree:update')") public CommonResult updateUserLiveTree(@Valid @RequestBody UserLiveTreeSaveReqVO updateReqVO) { userLiveTreeService.updateUserLiveTree(updateReqVO); return success(true); @@ -67,7 +65,6 @@ public class UserLiveTreeController { @DeleteMapping("/delete") @Operation(summary = "删除crm用户结构树") @Parameter(name = "id", description = "编号", required = true) - @PreAuthorize("@ss.hasPermission('crm:user-live-tree:delete')") public CommonResult deleteUserLiveTree(@RequestParam("id") Long id) { userLiveTreeService.deleteUserLiveTree(id); return success(true); @@ -76,7 +73,6 @@ public class UserLiveTreeController { @GetMapping("/get") @Operation(summary = "获得crm用户结构树") @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('crm:user-live-tree:query')") public CommonResult getUserLiveTree(@RequestParam("id") Long id) { UserLiveTreeDO userLiveTree = userLiveTreeService.getUserLiveTree(id); return success(BeanUtils.toBean(userLiveTree, UserLiveTreeRespVO.class)); @@ -93,7 +89,6 @@ public class UserLiveTreeController { @GetMapping("/page") @Operation(summary = "获得crm用户结构树分页") - @PreAuthorize("@ss.hasPermission('crm:user-live-tree:query')") public CommonResult> getUserLiveTreePage(@Valid UserLiveTreePageReqVO pageReqVO) { return success(userLiveTreeService.getUserLiveTreePage(pageReqVO)); @@ -101,7 +96,6 @@ public class UserLiveTreeController { @GetMapping("/export-excel") @Operation(summary = "导出crm用户结构树 Excel") - @PreAuthorize("@ss.hasPermission('crm:user-live-tree:export')") @OperateLog(type = EXPORT) public void exportUserLiveTreeExcel(@Valid UserLiveTreePageReqVO pageReqVO, HttpServletResponse response) throws IOException { diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/crmcustomer/CrmCustomerDO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/crmcustomer/CrmCustomerDO.java index bedb397a..53b7aca3 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/crmcustomer/CrmCustomerDO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/crmcustomer/CrmCustomerDO.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.crm.dal.dataobject.crmcustomer; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; @@ -145,4 +146,7 @@ public class CrmCustomerDO extends BaseDO { */ private Integer followStatus; + @TableField(exist = false) + private String ownUserName; + } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/crmcontract/CrmContractMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/crmcontract/CrmContractMapper.java index 49c629b9..2a952745 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/crmcontract/CrmContractMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/crmcontract/CrmContractMapper.java @@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.ContractVO; +import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.TimeQueryVO; import cn.iocoder.yudao.module.crm.controller.admin.crmcontract.vo.CrmContractPageReqVO; import cn.iocoder.yudao.module.crm.controller.admin.crmcontract.vo.CrmContractRespVO; import cn.iocoder.yudao.module.crm.dal.dataobject.crmcontract.CrmContractDO; @@ -55,7 +56,7 @@ public interface CrmContractMapper extends BaseMapperX { .orderByDesc(CrmContractDO::getId)); } - List selectContractTop(); + List selectContractTop(@Param("vo") TimeQueryVO vo); /** * 获取用户合同产品数量 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/crmcontractreceivables/CrmContractReceivablesMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/crmcontractreceivables/CrmContractReceivablesMapper.java index b7dbb117..694fdc0a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/crmcontractreceivables/CrmContractReceivablesMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/crmcontractreceivables/CrmContractReceivablesMapper.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.ContractVO; +import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.TimeQueryVO; import cn.iocoder.yudao.module.crm.controller.admin.crmcontractreceivables.vo.CrmContractReceivablesPageReqVO; import cn.iocoder.yudao.module.crm.controller.admin.crmcontractreceivables.vo.CrmContractReceivablesRespVO; import cn.iocoder.yudao.module.crm.dal.dataobject.crmcontractreceivables.CrmContractReceivablesDO; @@ -45,5 +46,5 @@ public interface CrmContractReceivablesMapper extends BaseMapperX selectReceivablesTop(); + List selectReceivablesTop(@Param("vo") TimeQueryVO vo); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/crmcustomer/CrmCustomerMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/crmcustomer/CrmCustomerMapper.java index 00e6b7d4..04143cdd 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/crmcustomer/CrmCustomerMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/crmcustomer/CrmCustomerMapper.java @@ -22,24 +22,26 @@ import java.util.List; @Mapper public interface CrmCustomerMapper extends BaseMapperX { - default PageResult selectPage(CrmCustomerPageReqVO reqVO, List ids) { +// default PageResult selectPage(CrmCustomerPageReqVO reqVO, List ids) { +// +// +// return selectPage(reqVO, new LambdaQueryWrapperX() +// //.eq(CustomerTypesEnum.OPEN.getValue().equals(reqVO.getType()),) +// .inIfPresent(CrmCustomerDO::getOwnerUserId, ids) +// .likeIfPresent(CrmCustomerDO::getName, reqVO.getName()) +// .eqIfPresent(CrmCustomerDO::getMobile, reqVO.getMobile()) +// .eqIfPresent(CrmCustomerDO::getTelephone, reqVO.getTelephone()) +// .eqIfPresent(CrmCustomerDO::getDealStatus, reqVO.getDealStatus()) +// .eqIfPresent(CrmCustomerDO::getLevel, reqVO.getLevel()) +// .eqIfPresent(CrmCustomerDO::getIndustry, reqVO.getIndustry()) +// .eqIfPresent(CrmCustomerDO::getSource, reqVO.getSource()) +// .eqIfPresent(CrmCustomerDO::getWeixin, reqVO.getWeixin()) +// .eqIfPresent(CrmCustomerDO::getQq, reqVO.getQq()) +// .eqIfPresent(CrmCustomerDO::getFollowStatus, reqVO.getFollowStatus()) +// .orderByDesc(CrmCustomerDO::getId)); +// } - - return selectPage(reqVO, new LambdaQueryWrapperX() - //.eq(CustomerTypesEnum.OPEN.getValue().equals(reqVO.getType()),) - .inIfPresent(CrmCustomerDO::getOwnerUserId, ids) - .likeIfPresent(CrmCustomerDO::getName, reqVO.getName()) - .eqIfPresent(CrmCustomerDO::getMobile, reqVO.getMobile()) - .eqIfPresent(CrmCustomerDO::getTelephone, reqVO.getTelephone()) - .eqIfPresent(CrmCustomerDO::getDealStatus, reqVO.getDealStatus()) - .eqIfPresent(CrmCustomerDO::getLevel, reqVO.getLevel()) - .eqIfPresent(CrmCustomerDO::getIndustry, reqVO.getIndustry()) - .eqIfPresent(CrmCustomerDO::getSource, reqVO.getSource()) - .eqIfPresent(CrmCustomerDO::getWeixin, reqVO.getWeixin()) - .eqIfPresent(CrmCustomerDO::getQq, reqVO.getQq()) - .eqIfPresent(CrmCustomerDO::getFollowStatus, reqVO.getFollowStatus()) - .orderByDesc(CrmCustomerDO::getId)); - } + IPage selectPage(@Param("page") IPage page, @Param("dto") CrmCustomerPageReqVO pageReqVO, @Param("ids") List ids); IPage selectPageList2(@Param("page") IPage page, @Param("dto") CrmCustomerPageReqVO pageReqVO, @Param("ids") List ids); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/job/salesperformance/AutoConfirmJob.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/job/salesperformance/AutoConfirmJob.java index 3f8accce..857a0a71 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/job/salesperformance/AutoConfirmJob.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/job/salesperformance/AutoConfirmJob.java @@ -13,7 +13,7 @@ import javax.annotation.Resource; @Slf4j public class AutoConfirmJob { - // TODO: 2024/11/04 - 每个月月初03号 未确认的 自动确认上个月的结算记录 + // TODO: 2024/11/04 - 每个月月初04号 0点10分 未确认的 自动确认上个月的结算记录 @Resource private SalesPerformanceSettlementService salesPerformanceSettlementService; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/crmanalysis/RankService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/crmanalysis/RankService.java index 0e821556..b116eb83 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/crmanalysis/RankService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/crmanalysis/RankService.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.crm.service.crmanalysis; import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.ContractVO; +import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.TimeQueryVO; import java.util.List; @@ -13,8 +14,8 @@ import java.util.List; public interface RankService { - List getContractRank(); + List getContractRank(TimeQueryVO vo); - List getReceivablesRank(); + List getReceivablesRank(TimeQueryVO vo); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/crmanalysis/RankServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/crmanalysis/RankServiceImpl.java index d9cabbe7..d91580d4 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/crmanalysis/RankServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/crmanalysis/RankServiceImpl.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.crm.service.crmanalysis; import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.ContractVO; +import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.TimeQueryVO; import cn.iocoder.yudao.module.crm.dal.mysql.crmcontract.CrmContractMapper; import cn.iocoder.yudao.module.crm.dal.mysql.crmcontractreceivables.CrmContractReceivablesMapper; import org.springframework.stereotype.Service; @@ -25,12 +26,12 @@ public class RankServiceImpl implements RankService { @Override - public List getContractRank() { - return contractMapper.selectContractTop(); + public List getContractRank(TimeQueryVO vo) { + return contractMapper.selectContractTop(vo); } @Override - public List getReceivablesRank() { - return contractReceivablesMapper.selectReceivablesTop(); + public List getReceivablesRank(TimeQueryVO vo) { + return contractReceivablesMapper.selectReceivablesTop(vo); } } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/crmcustomer/CrmCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/crmcustomer/CrmCustomerServiceImpl.java index a4b742af..2edefc9a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/crmcustomer/CrmCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/crmcustomer/CrmCustomerServiceImpl.java @@ -126,7 +126,8 @@ public class CrmCustomerServiceImpl implements CrmCustomerService { && CollUtil.isNotEmpty(repeatOwnerUserNameList) && updateReqVO.getRepeatConfirmationFlag() == 0) { List items = repeatOwnerUserNameList.stream().distinct().collect(Collectors.toList()); - throw exception(new ErrorCode(200012, "该客户已被:" + String.join(",", items) + "添加过,是否继续添加?")); } + throw exception(new ErrorCode(200012, "该客户已被:" + String.join(",", items) + "添加过,是否继续添加?")); + } // 更新 CrmCustomerDO updateObj = BeanUtils.toBean(updateReqVO, CrmCustomerDO.class); @@ -260,10 +261,10 @@ public class CrmCustomerServiceImpl implements CrmCustomerService { return PageResult.empty(); } IPage pageResult; + IPage mpPage = MyBatisUtils.buildPage(pageReqVO); if (pageReqVO.getDistinctFlag() == 0) { - return customerMapper.selectPage(pageReqVO, ids); + pageResult = customerMapper.selectPage(mpPage, pageReqVO, ids); } else { - IPage mpPage = MyBatisUtils.buildPage(pageReqVO); pageResult = customerMapper.selectPageList(mpPage, pageReqVO, ids); } return new PageResult<>(pageResult.getRecords(), pageResult.getTotal()); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/crmcontract/CrmContractMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/crmcontract/CrmContractMapper.xml index 32036891..f71187ec 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/crmcontract/CrmContractMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/crmcontract/CrmContractMapper.xml @@ -75,6 +75,14 @@ t.deleted = 0 AND t.result = 2 AND t.contract_type = 1 + + + and t.signing_date >= #{vo.times[0]} + + + and t.signing_date <= #{vo.times[1]} + + GROUP BY t.user_id ORDER BY diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/crmcontractreceivables/CrmContractReceivablesMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/crmcontractreceivables/CrmContractReceivablesMapper.xml index 2653a1a8..e6ec467a 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/crmcontractreceivables/CrmContractReceivablesMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/crmcontractreceivables/CrmContractReceivablesMapper.xml @@ -69,6 +69,14 @@ WHERE t.deleted = 0 AND t.result = 2 + + + and t.return_time >= #{vo.times[0]} + + + and t.return_time <= #{vo.times[1]} + + GROUP BY t.user_id ORDER BY diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/crmcustomer/CrmCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/crmcustomer/CrmCustomerMapper.xml index d017ec19..90bf8c75 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/crmcustomer/CrmCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/crmcustomer/CrmCustomerMapper.xml @@ -135,4 +135,57 @@ and t1.deleted = 0 and a.name = #{name} +