|
@@ -3,6 +3,7 @@ package com.zhongzheng.modules.financial.service.impl;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.lang.Validator;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.zhongzheng.common.exception.CustomException;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.modules.course.bo.CourseChapterBusinessAddBo;
|
|
@@ -15,6 +16,7 @@ import com.zhongzheng.modules.financial.service.ITopCostTpItemService;
|
|
|
import com.zhongzheng.modules.financial.service.ITopCostTpService;
|
|
|
import com.zhongzheng.modules.financial.vo.TopCostTpItemVo;
|
|
|
import com.zhongzheng.modules.financial.vo.TopCostTpVo;
|
|
|
+import com.zhongzheng.modules.grade.domain.ClassGradeUser;
|
|
|
import com.zhongzheng.modules.sdk.domain.TopNuoMplatformLog;
|
|
|
import com.zhongzheng.modules.sdk.service.NuonuoService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -142,4 +144,24 @@ public class TopCostTpServiceImpl extends ServiceImpl<TopCostTpMapper, TopCostTp
|
|
|
}
|
|
|
return this.removeByIds(ids);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public Boolean updateDefaultStatus(TopCostTpEditBo bo) {
|
|
|
+ TopCostTp update = new TopCostTp();
|
|
|
+ update.setTpId(bo.getTpId());
|
|
|
+ if(bo.getDefaultStatus()==1){
|
|
|
+ LambdaUpdateWrapper<TopCostTp> objectLambdaUpdateWrapper = Wrappers.lambdaUpdate();
|
|
|
+ objectLambdaUpdateWrapper.eq(TopCostTp::getTpId, bo.getTpId());
|
|
|
+ objectLambdaUpdateWrapper.set(TopCostTp::getDefaultStatus, 0);
|
|
|
+ objectLambdaUpdateWrapper.set(TopCostTp::getUpdateTime, DateUtils.getNowTime());
|
|
|
+ update(null, objectLambdaUpdateWrapper);
|
|
|
+ update.setDefaultStatus(1);
|
|
|
+ }
|
|
|
+ if(bo.getDefaultStatus()==0){
|
|
|
+ update.setDefaultStatus(0);
|
|
|
+ }
|
|
|
+ update.setUpdateTime(DateUtils.getNowTime());
|
|
|
+ return this.updateById(update);
|
|
|
+ }
|
|
|
}
|