# CbCaseStageEvolutionServiceImpl.java

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

    import cloud.wconnect.finance.entity.chargeback.CbCase;
    import cloud.wconnect.finance.entity.chargeback.CbCaseStageEvolution;
    import cloud.wconnect.finance.mapper.chargeback.CbCaseStageEvolutionMapper;
    import cloud.wconnect.finance.service.chargeback.ICbCaseStageEvolutionService;
    import com.baomidou.dynamic.datasource.annotation.DS;
    import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
    import org.springframework.stereotype.Service;

    /**
     * <p>
     * 状态演变记录 服务实现类
     * </p>
     *
     * @author yyt
     * @since 2024-02-19
     */
    @Service
    @DS("finance")
    public class CbCaseStageEvolutionServiceImpl extends ServiceImpl<CbCaseStageEvolutionMapper, CbCaseStageEvolution> implements ICbCaseStageEvolutionService {

        /**
         * 新增 / 保存 状态演变记录
         *
         * @param cs case
         * @author yyt
         * @date 2024/2/19
         **/
        @Override
        public void saveOrUpdateRewrite(CbCase cs) {
            baseMapper.saveOrUpdate(new CbCaseStageEvolution().setPropertyId(cs.getPropertyId()).setCaseId(cs.getId())
                    .setLastStage(cs.getStage()).setLastStatus(cs.getStatus()).setLastLevelId(cs.getLevelId())
                    .setBatchId(cs.getBatchId()).setApproveStatus(cs.getApproveStatus()));
        }

    }