|
@@ -18,8 +18,10 @@ import com.zhongzheng.modules.goods.vo.GoodsUserVo;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
|
import com.zhongzheng.modules.grade.bo.UserPeriodAddBo;
|
|
|
import com.zhongzheng.modules.grade.bo.UserPeriodStatusAddBo;
|
|
|
+import com.zhongzheng.modules.grade.domain.ClassGradeUser;
|
|
|
import com.zhongzheng.modules.grade.domain.UserPeriod;
|
|
|
import com.zhongzheng.modules.grade.domain.UserPeriodStatus;
|
|
|
+import com.zhongzheng.modules.grade.service.IClassGradeUserService;
|
|
|
import com.zhongzheng.modules.grade.service.IUserPeriodService;
|
|
|
import com.zhongzheng.modules.grade.service.IUserPeriodStatusService;
|
|
|
import com.zhongzheng.modules.grade.vo.UserPeriodStatusVo;
|
|
@@ -82,6 +84,9 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
@Autowired
|
|
|
private IGoodsService iGoodsService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IClassGradeUserService iClassGradeUserService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private com.zhongzheng.modules.alisms.service.IAliSmsService IAliSmsService;
|
|
|
|
|
@@ -190,6 +195,16 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
}
|
|
|
//发送课时完成
|
|
|
if (secLong.equals(studyLong)) {
|
|
|
+
|
|
|
+ LambdaQueryWrapper<ClassGradeUser> classGradeUser = Wrappers.lambdaQuery();
|
|
|
+ classGradeUser.eq(ClassGradeUser::getUserId, bo.getUserId());
|
|
|
+ classGradeUser.eq(ClassGradeUser::getGradeId, bo.getGradeId());
|
|
|
+ ClassGradeUser classGradeUser1 = new ClassGradeUser();
|
|
|
+ classGradeUser1.setPeriodStatus(2);
|
|
|
+ classGradeUser1.setUpdateTime(DateUtils.getNowTime());
|
|
|
+ List<ClassGradeUser> list1 = iClassGradeUserService.list(classGradeUser);
|
|
|
+ iClassGradeUserService.update(classGradeUser1, classGradeUser);
|
|
|
+
|
|
|
InformRemindQueryBo informRemindQueryBo = new InformRemindQueryBo();
|
|
|
informRemindQueryBo.setSort(8L);
|
|
|
List<InformRemindVo> list = iInformRemindService.queryList(informRemindQueryBo);
|
|
@@ -423,12 +438,13 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
|
|
|
@Override
|
|
|
public List<GoodsStudyRecordVo> queryGoods(UserQueryBo bo) {
|
|
|
+ //查询学员拥有商品
|
|
|
List<GoodsStudyRecordVo> list = baseMapper.queryGoods(bo);
|
|
|
|
|
|
for (GoodsStudyRecordVo goodsStudyRecordVo : list) {
|
|
|
Long secLong = 0L;
|
|
|
Long studyLong = 0L;
|
|
|
-
|
|
|
+ //查询学习记录
|
|
|
SubjectStudyRecordQueryBo subjectStudyRecordQueryBo = new SubjectStudyRecordQueryBo();
|
|
|
subjectStudyRecordQueryBo.setGoodsId(goodsStudyRecordVo.getGoodsId());
|
|
|
subjectStudyRecordQueryBo.setUserId(goodsStudyRecordVo.getUserId());
|
|
@@ -437,7 +453,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
String sectionType = "";
|
|
|
secLong = new BigDecimal(secLong.toString()).add(new BigDecimal(subjectStudyRecordVo.getSectionNum().toString())).longValue();
|
|
|
studyLong = new BigDecimal(studyLong.toString()).add(new BigDecimal(subjectStudyRecordVo.getRecordNum().toString())).longValue();
|
|
|
-
|
|
|
+ //节里面有什么类型
|
|
|
if (CollectionUtils.isNotEmpty(baseMapper.sectionType(subjectStudyRecordVo.getCourseId(), 1L))) {
|
|
|
sectionType = sectionType.concat("1,");
|
|
|
}
|