| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- package com.ydtech.modules.inv.service.impl;
- import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
- import com.baomidou.mybatisplus.core.metadata.IPage;
- import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
- import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
- import com.ydtech.core.page.PageRequest;
- import com.ydtech.modules.inv.dao.InvChannelAccountMapper;
- import com.ydtech.modules.inv.model.InvAccount;
- import com.ydtech.modules.inv.model.po.InvChannelAccount;
- import com.ydtech.modules.inv.model.po.QueryInvChannelAccount;
- import com.ydtech.modules.inv.service.InvChannelAccountService;
- import org.springframework.stereotype.Service;
- /**
- * @author Administrator
- * @description 针对表【inv_channel_account(渠道账户表)】的数据库操作Service实现
- * @createDate 2024-01-20 10:29:30
- */
- @Service
- public class InvChannelAccountServiceImpl extends ServiceImpl<InvChannelAccountMapper, InvChannelAccount>
- implements InvChannelAccountService {
- @Override
- public IPage<InvChannelAccount> selectAccountsList(QueryInvChannelAccount invChannelAccount) {
- PageRequest pageRequest = new PageRequest();
- pageRequest.setPageNum(invChannelAccount.getPageNum());
- pageRequest.setPageSize(invChannelAccount.getPageSize());
- Page page = PageRequest.buildPageRequest(pageRequest);
- LambdaQueryWrapper<InvChannelAccount> wrapper = new LambdaQueryWrapper<>();
- if(invChannelAccount.getEmployeeId() != null) {
- wrapper.eq(InvChannelAccount::getEmployeeId, invChannelAccount.getEmployeeId());
- }
- if(invChannelAccount.getAccount() != null) {
- wrapper.eq(InvChannelAccount::getAccount, invChannelAccount.getAccount());
- }
- if(invChannelAccount.getMember() != null){
- wrapper.eq(InvChannelAccount::getMember, invChannelAccount.getMember());
- }
- if(invChannelAccount.getPayee() != null){
- wrapper.eq(InvChannelAccount::getProvince, invChannelAccount.getProvince());
- }
- return baseMapper.selectPage(page, wrapper);
- }
- }
|