gaoluyang
5 小时以前 7a923e32e55e9c34830690341469cc170f65092e
yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/bidbond/CrmBidBondMapper.java
@@ -7,6 +7,7 @@
import cn.iocoder.yudao.module.crm.dal.dataobject.bidbond.CrmBidBondDO;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.Collection;
import java.util.List;
@@ -20,6 +21,7 @@
                .eqIfPresent(CrmBidBondDO::getCustomerId, reqVO.getCustomerId())
                .likeIfPresent(CrmBidBondDO::getProjectName, reqVO.getProjectName())
                .likeIfPresent(CrmBidBondDO::getTenderNo, reqVO.getTenderNo())
                .likeIfPresent(CrmBidBondDO::getQuotationNo, reqVO.getQuotationNo())
                .likeIfPresent(CrmBidBondDO::getSaleOrderNo, reqVO.getSaleOrderNo())
                .eqIfPresent(CrmBidBondDO::getBidResult, reqVO.getBidResult())
                .eqIfPresent(CrmBidBondDO::getRefundStatus, reqVO.getRefundStatus())
@@ -28,12 +30,19 @@
                .orderByDesc(CrmBidBondDO::getId));
    }
    @Select("SELECT * FROM crm_bid_bond WHERE id = #{id} AND deleted = 0 FOR UPDATE")
    CrmBidBondDO selectByIdForUpdate(Long id);
    default CrmBidBondDO selectByNo(String no) {
        return selectOne(CrmBidBondDO::getNo, no);
    }
    default List<CrmBidBondDO> selectListByCustomerId(Long customerId) {
        return selectList(CrmBidBondDO::getCustomerId, customerId);
    }
    default CrmBidBondDO selectByQuotationId(Long quotationId) {
        return selectOne(CrmBidBondDO::getQuotationId, quotationId);
    }
    default List<CrmBidBondDO> selectListBySaleOrderIds(Collection<Long> saleOrderIds) {
@@ -52,6 +61,9 @@
                .eq(CrmBidBondDO::getId, updateObj.getId())
                .set(CrmBidBondDO::getSaleOrderId, updateObj.getSaleOrderId())
                .set(CrmBidBondDO::getSaleOrderNo, updateObj.getSaleOrderNo())
                .set(CrmBidBondDO::getQuotationId, updateObj.getQuotationId())
                .set(CrmBidBondDO::getQuotationNo, updateObj.getQuotationNo())
                .set(CrmBidBondDO::getQuotationRound, updateObj.getQuotationRound())
                .set(CrmBidBondDO::getRefundAmount, updateObj.getRefundAmount())
                .set(CrmBidBondDO::getRefundDate, updateObj.getRefundDate()));
    }