|
@@ -18,6 +18,10 @@ import com.zhongzheng.modules.grade.service.IClassGradeGoodsService;
|
|
import com.zhongzheng.modules.grade.service.IClassGradeSysService;
|
|
import com.zhongzheng.modules.grade.service.IClassGradeSysService;
|
|
import com.zhongzheng.modules.grade.service.IClassGradeUserService;
|
|
import com.zhongzheng.modules.grade.service.IClassGradeUserService;
|
|
import com.zhongzheng.modules.grade.vo.ClassGradeStudentVo;
|
|
import com.zhongzheng.modules.grade.vo.ClassGradeStudentVo;
|
|
|
|
+import com.zhongzheng.modules.inform.bo.InformRemindBusinessAddBo;
|
|
|
|
+import com.zhongzheng.modules.inform.domain.InformRemindBusiness;
|
|
|
|
+import com.zhongzheng.modules.inform.service.IInformRemindBusinessService;
|
|
|
|
+import com.zhongzheng.modules.inform.vo.InformRemindBusinessVo;
|
|
import com.zhongzheng.modules.user.service.IUserStudyRecordService;
|
|
import com.zhongzheng.modules.user.service.IUserStudyRecordService;
|
|
import com.zhongzheng.modules.user.service.IUserUpdateService;
|
|
import com.zhongzheng.modules.user.service.IUserUpdateService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -76,6 +80,9 @@ public class InformRemindServiceImpl extends ServiceImpl<InformRemindMapper, Inf
|
|
@Autowired
|
|
@Autowired
|
|
private IUserUpdateService iUserUpdateService;
|
|
private IUserUpdateService iUserUpdateService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IInformRemindBusinessService iInformRemindBusinessService;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public InformRemindVo queryById(Long id){
|
|
public InformRemindVo queryById(Long id){
|
|
InformRemind db = this.baseMapper.selectById(id);
|
|
InformRemind db = this.baseMapper.selectById(id);
|
|
@@ -90,7 +97,12 @@ public class InformRemindServiceImpl extends ServiceImpl<InformRemindMapper, Inf
|
|
lqw.eq(StrUtil.isNotBlank(bo.getLogic()), InformRemind::getLogic, bo.getLogic());
|
|
lqw.eq(StrUtil.isNotBlank(bo.getLogic()), InformRemind::getLogic, bo.getLogic());
|
|
lqw.eq(bo.getNoteStatus() != null, InformRemind::getNoteStatus, bo.getNoteStatus());
|
|
lqw.eq(bo.getNoteStatus() != null, InformRemind::getNoteStatus, bo.getNoteStatus());
|
|
lqw.eq(bo.getWayStatus() != null, InformRemind::getWayStatus, bo.getWayStatus());
|
|
lqw.eq(bo.getWayStatus() != null, InformRemind::getWayStatus, bo.getWayStatus());
|
|
- return entity2Vo(this.list(lqw));
|
|
|
|
|
|
+ List<InformRemindVo> informRemindVos = entity2Vo(this.list(lqw));
|
|
|
|
+ for (InformRemindVo informRemindVo : informRemindVos) {
|
|
|
|
+ List<InformRemindBusinessVo> informRemindBusinessVos = iInformRemindBusinessService.selectBusiness(informRemindVo.getId());
|
|
|
|
+ informRemindVo.setInformRemindBusiness(informRemindBusinessVos);
|
|
|
|
+ }
|
|
|
|
+ return informRemindVos;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -127,6 +139,17 @@ public class InformRemindServiceImpl extends ServiceImpl<InformRemindMapper, Inf
|
|
InformRemind update = BeanUtil.toBean(bo, InformRemind.class);
|
|
InformRemind update = BeanUtil.toBean(bo, InformRemind.class);
|
|
validEntityBeforeSave(update);
|
|
validEntityBeforeSave(update);
|
|
update.setUpdateTime(DateUtils.getNowTime());
|
|
update.setUpdateTime(DateUtils.getNowTime());
|
|
|
|
+ LambdaQueryWrapper<InformRemindBusiness> lqw = Wrappers.lambdaQuery();
|
|
|
|
+ lqw.eq( InformRemindBusiness::getRemindId, bo.getId());
|
|
|
|
+ iInformRemindBusinessService.remove(lqw);
|
|
|
|
+ for (Long aLong : bo.getBusinessId()) {
|
|
|
|
+ InformRemindBusinessAddBo informRemindBusinessAddBo = new InformRemindBusinessAddBo();
|
|
|
|
+ informRemindBusinessAddBo.setRemindId(bo.getId());
|
|
|
|
+ informRemindBusinessAddBo.setBusinessId(aLong);
|
|
|
|
+ informRemindBusinessAddBo.setCreateTime(DateUtils.getNowTime());
|
|
|
|
+ informRemindBusinessAddBo.setUpdateTime(DateUtils.getNowTime());
|
|
|
|
+ iInformRemindBusinessService.insertByAddBo(informRemindBusinessAddBo);
|
|
|
|
+ }
|
|
return this.updateById(update);
|
|
return this.updateById(update);
|
|
}
|
|
}
|
|
|
|
|