|
@@ -63,8 +63,18 @@ public interface EnterpriseMapper extends BaseMapperX<EnterpriseDO> {
|
|
|
query.leftJoin(EnterpriseBusinessDO.class, EnterpriseBusinessDO::getEnterpriseId, EnterpriseDO::getId);
|
|
|
query.eqIfPresent(EnterpriseDO::getParentId, reqVO.getParentId());
|
|
|
query.eqIfPresent(EnterpriseDO::getStatus, reqVO.getStatus());
|
|
|
- query.likeIfPresent(EnterpriseDO::getName, reqVO.getName());
|
|
|
- query.likeIfPresent(EnterpriseDO::getAnotherName, reqVO.getAnotherName());
|
|
|
+// query.likeIfPresent(EnterpriseDO::getName, reqVO.getName());
|
|
|
+
|
|
|
+ if(StringUtils.hasText(reqVO.getName())) {
|
|
|
+ query.and(i -> i.like(EnterpriseDO::getName, reqVO.getName())
|
|
|
+ .or().like(EnterpriseDO::getAnotherName, reqVO.getName()));
|
|
|
+
|
|
|
+ }
|
|
|
+ if(StringUtils.hasText(reqVO.getAnotherName())) {
|
|
|
+ query.and(i -> i.like(EnterpriseDO::getName, reqVO.getAnotherName())
|
|
|
+ .or().like(EnterpriseDO::getAnotherName, reqVO.getAnotherName()));
|
|
|
+ }
|
|
|
+// query.likeIfPresent(EnterpriseDO::getAnotherName, reqVO.getAnotherName());
|
|
|
query.likeIfPresent(EnterpriseDO::getContact, reqVO.getContact());
|
|
|
query.likeIfPresent(EnterpriseDO::getPhone, reqVO.getPhone());
|
|
|
query.eqIfPresent(EnterpriseDO::getIndustryId, reqVO.getIndustryId());
|