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.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 implements InvChannelAccountService { @Override public IPage selectAccountsList(QueryInvChannelAccount invChannelAccount) { PageRequest pageRequest = new PageRequest(); pageRequest.setPageNum(invChannelAccount.getPageNum()); pageRequest.setPageSize(invChannelAccount.getPageSize()); Page page = PageRequest.buildPageRequest(pageRequest); LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); if(invChannelAccount.getEmployeeId() != null && !invChannelAccount.getEmployeeId().equals("")) { wrapper.eq(InvChannelAccount::getEmployeeId, invChannelAccount.getEmployeeId()); } if(invChannelAccount.getAccount() != null && !invChannelAccount.getAccount().equals("")) { wrapper.eq(InvChannelAccount::getAccount, invChannelAccount.getAccount()); } if(invChannelAccount.getMember() != null && !invChannelAccount.getMember().equals("")) { wrapper.eq(InvChannelAccount::getMember, invChannelAccount.getMember()); } if(invChannelAccount.getPayee() != null && !invChannelAccount.getPayee().equals("")){ wrapper.eq(InvChannelAccount::getProvince, invChannelAccount.getProvince()); } if(invChannelAccount.getChannelName() != null && !invChannelAccount.getChannelName().equals("")){ wrapper.like(InvChannelAccount::getChannelName, invChannelAccount.getChannelName()); } return baseMapper.selectPage(page, wrapper); } }