| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- 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<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 && !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);
- }
- }
|