package com.limap.core.basic.service.impl;

import java.util.List;
import com.limap.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.limap.common.utils.StringUtils;
import com.limap.core.basic.mapper.BasicProfitSharingMapper;
import com.limap.core.basic.domain.BasicProfitSharing;
import com.limap.core.basic.service.IBasicProfitSharingService;

/**
 * 基础分润信息Service业务层处理
 * 
 * @author jjb
 * @date 2025-04-11
 */
@Service
public class BasicProfitSharingServiceImpl extends ServiceImpl<BasicProfitSharingMapper, BasicProfitSharing> implements IBasicProfitSharingService {
    @Autowired
    private BasicProfitSharingMapper basicProfitSharingMapper;
    
    /**
     * 查询基础分润信息列表
     * 
     * @param basicProfitSharing 基础分润信息
     * @return 基础分润信息
     */
    @Override
    public List<BasicProfitSharing> selectBasicProfitSharingList(BasicProfitSharing basicProfitSharing) {
    	LambdaQueryWrapper<BasicProfitSharing> queryWrapper = Wrappers.lambdaQuery();
        if (StringUtils.isNotEmpty(basicProfitSharing.getName())) {
			queryWrapper.like(BasicProfitSharing::getName, basicProfitSharing.getName());
		}
        queryWrapper.orderByDesc(BasicProfitSharing::getCreateTime);
        return basicProfitSharingMapper.selectList(queryWrapper);
    }
}
