| | |
| | | |
| | | import cn.hutool.core.util.ArrayUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | @PreAuthorize("@pms.hasPermission('business_businessCustomer_view')" ) |
| | | public R getBusinessCustomerPage(@ParameterObject Page page, @ParameterObject BusinessCustomer businessCustomer) { |
| | | LambdaQueryWrapper<BusinessCustomer> wrapper = Wrappers.lambdaQuery(); |
| | | wrapper.eq(businessCustomer.getIndustryId()!=null,BusinessCustomer::getIndustryId,businessCustomer.getIndustryId()); |
| | | wrapper.eq(businessCustomer.getAreaId()!=null,BusinessCustomer::getAreaId,businessCustomer.getAreaId()); |
| | | wrapper.like(StrUtil.isNotEmpty(businessCustomer.getCompanyName()),BusinessCustomer::getCompanyName,businessCustomer.getCompanyName()); |
| | | return R.ok(businessCustomerService.page(page, wrapper)); |
| | | } |
| | | |