package io.renren.modules.loan.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.loan.dao.TCustRelationshipDao;
import io.renren.modules.loan.dto.TCustRelationshipDTO;
import io.renren.modules.loan.entity.TCustRelationshipEntity;
import io.renren.modules.loan.service.TCustRelationshipService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 借款关系人
 *
 * @author lsy 
 * @since 1.0.0 2022-10-30
 */
@Service
public class TCustRelationshipServiceImpl extends CrudServiceImpl<TCustRelationshipDao, TCustRelationshipEntity, TCustRelationshipDTO> implements TCustRelationshipService {

    @Override
    public QueryWrapper<TCustRelationshipEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<TCustRelationshipEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}