| | |
| | | |
| | | 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)); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param businessCustomer 客商信息 |
| | | * @return |
| | | */ |
| | | @Operation(summary = "分页查询" , description = "分页查询" ) |
| | | @GetMapping("/list" ) |
| | | @PreAuthorize("@pms.hasPermission('business_businessCustomer_view')" ) |
| | | public R getBusinessCustomerList(@ParameterObject BusinessCustomer businessCustomer) { |
| | | LambdaQueryWrapper<BusinessCustomer> wrapper = Wrappers.lambdaQuery(); |
| | | return R.ok(businessCustomerService.list(wrapper)); |
| | | } |
| | | |
| | | /** |
| | | * 通过id查询客商信息 |