diff --git a/admin/src/main/java/com/baiye/modules/distribute/controller/CustomController.java b/admin/src/main/java/com/baiye/modules/distribute/controller/CustomController.java index a192895..d0eb424 100644 --- a/admin/src/main/java/com/baiye/modules/distribute/controller/CustomController.java +++ b/admin/src/main/java/com/baiye/modules/distribute/controller/CustomController.java @@ -42,10 +42,15 @@ public class CustomController { (SecurityUtils.getCurrentUserId()))) { qo.setCompanyId(SecurityUtils.getWhichUserId()); } - if (ObjectUtil.isNotNull(qo.getSalesmanType()) && qo.getSalesmanType() == 1) { - // 查询当前用户自己的 - qo.setSalesmanType(null); - qo.setCreateBy(SecurityUtils.getCurrentUserId()); + if (ObjectUtil.isNotNull(qo.getSalesmanType())) { + if (qo.getSalesmanType() == 1) { + // 查询当前用户自己的 + qo.setSalesmanType(null); + qo.setCreateBy(SecurityUtils.getCurrentUserId()); + } + if (qo.getSalesmanType() > 1) { + qo.setEnrollStatus(0); + } } return R.ok(customService.queryPage(pageParam, qo)); } diff --git a/admin/src/main/java/com/baiye/modules/distribute/mapper/CustomMapper.java b/admin/src/main/java/com/baiye/modules/distribute/mapper/CustomMapper.java index 2452474..ce95d53 100644 --- a/admin/src/main/java/com/baiye/modules/distribute/mapper/CustomMapper.java +++ b/admin/src/main/java/com/baiye/modules/distribute/mapper/CustomMapper.java @@ -22,8 +22,9 @@ public interface CustomMapper extends ExtendMapper { wrapperX.eqIfPresent(CustomEntity::getCreateBy, qo.getCreateBy()) .likeIfPresent(CustomEntity::getCustomName, qo.getCustomName()) .likeIfPresent(CustomEntity::getBatchNo, qo.getBatchNo()) - .eqIfPresent(CustomEntity::getCompanyId,qo.getCompanyId()) - .eqIfPresent(CustomEntity::getType,qo.getSalesmanType()) + .gtIfPresent(CustomEntity::getEnrollStatus, qo.getEnrollStatus()) + .eqIfPresent(CustomEntity::getCompanyId, qo.getCompanyId()) + .eqIfPresent(CustomEntity::getType, qo.getSalesmanType()) .eqIfPresent(CustomEntity::getCustomNid, qo.getCustomNid()) .eqIfPresent(CustomEntity::getEnrollStatus, qo.getEnrollStatus()); if (StringUtils.isNotBlank(qo.getDistributeStartTime()) && StringUtils.isNotBlank(qo.getDistributeEndTime())) {