|
@@ -3,6 +3,7 @@ package com.ylx.web.controller.massage;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.ylx.common.annotation.Log;
|
|
|
import com.ylx.common.core.controller.BaseController;
|
|
@@ -49,8 +50,11 @@ public class BusinessDevelopmentController extends BaseController {
|
|
|
public R selectAll(Page<BusinessDevelopment> page, BusinessDevelopment businessDevelopment) {
|
|
|
|
|
|
LambdaQueryWrapper<BusinessDevelopment> businessDevelopmentLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
- businessDevelopmentLambdaQueryWrapper.like(BusinessDevelopment::getCity, businessDevelopment.getCity());
|
|
|
- return R.ok(this.businessDevelopmentService.page(page, new QueryWrapper<>(businessDevelopment)));
|
|
|
+ businessDevelopmentLambdaQueryWrapper.like(StringUtils.isNotBlank(businessDevelopment.getCity()),BusinessDevelopment::getCity, businessDevelopment.getCity())
|
|
|
+ .like(StringUtils.isNotBlank(businessDevelopment.getName()),BusinessDevelopment::getName, businessDevelopment.getName())
|
|
|
+ .like(StringUtils.isNotBlank(businessDevelopment.getCompany()),BusinessDevelopment::getCompany, businessDevelopment.getCompany())
|
|
|
+ .eq(StringUtils.isNotBlank(businessDevelopment.getPhoneNum()),BusinessDevelopment::getPhoneNum, businessDevelopment.getPhoneNum());
|
|
|
+ return R.ok(this.businessDevelopmentService.page(page, businessDevelopmentLambdaQueryWrapper));
|
|
|
}
|
|
|
|
|
|
/**
|