| | |
| | | |
| | | 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_salesMan_view')" ) |
| | | public R getSalesManPage(@ParameterObject Page page, @ParameterObject SalesMan salesMan) { |
| | | LambdaQueryWrapper<SalesMan> wrapper = Wrappers.lambdaQuery(); |
| | | wrapper.eq(salesMan.getCustomerId()!=null,SalesMan::getCustomerId,salesMan.getCustomerId()); |
| | | wrapper.like(StrUtil.isNotEmpty(salesMan.getSalesName()),SalesMan::getSalesName,salesMan.getSalesName()); |
| | | return R.ok(salesManService.page(page, wrapper)); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param salesMan 销售人员 |
| | | * @return |
| | | */ |
| | | @Operation(summary = "分页查询" , description = "分页查询" ) |
| | | @GetMapping("/list" ) |
| | | @PreAuthorize("@pms.hasPermission('business_salesMan_view')" ) |
| | | public R getSalesManList(@ParameterObject SalesMan salesMan) { |
| | | LambdaQueryWrapper<SalesMan> wrapper = Wrappers.lambdaQuery(); |
| | | return R.ok(salesManService.list(wrapper)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 通过id查询销售人员 |