# CbCaseOverTimeDayServiceImpl.java

    package cloud.wconnect.finance.service.chargeback.impl;

    import cloud.wconnect.finance.entity.chargeback.CbCaseOverTimeDay;
    import cloud.wconnect.finance.mapper.chargeback.CbCaseOverTimeDayMapper;
    import cloud.wconnect.finance.service.chargeback.ICbCaseOverTimeDayService;
    import com.baomidou.dynamic.datasource.annotation.DS;
    import com.baomidou.mybatisplus.core.conditions.Wrapper;
    import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
    import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
    import org.springframework.stereotype.Service;

    /**
     * <p>
     * 几天后超期设置，用于列表检索超期数据 服务实现类
     * </p>
     *
     * @author yyt
     * @since 2023-08-22
     */
    @Service
    @DS("finance")
    public class CbCaseOverTimeDayServiceImpl extends ServiceImpl<CbCaseOverTimeDayMapper, CbCaseOverTimeDay> implements ICbCaseOverTimeDayService {

        /**
         * 获取超期天数
         *
         * @param propertyId 资产 id
         * @return 超期天数
         * @author yyt
         * @date 2023/8/23
         */
        @Override
        public CbCaseOverTimeDay getOverTimeDay(Integer propertyId) {
            return getOne(new QueryWrapper<CbCaseOverTimeDay>().lambda().eq(CbCaseOverTimeDay::getPropertyId, propertyId));
        }

        /**
         * 保存超期天数
         *
         * @param overTimeDay 超期天数
         * @author yyt
         * @date 2023/8/24
         */
        public void saveOrUpdateRewrite(CbCaseOverTimeDay overTimeDay){
            baseMapper.saveOrUpdateRewrite(overTimeDay);
        }
    }