|
@@ -5309,4 +5309,22 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
public Integer countTeacherPracticeGroups(Integer teacherId) {
|
|
public Integer countTeacherPracticeGroups(Integer teacherId) {
|
|
|
return practiceGroupDao.countTeacherPracticeGroups(teacherId);
|
|
return practiceGroupDao.countTeacherPracticeGroups(teacherId);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Object getPracticeGroupPayInfo(Long practiceGroupId, Integer userId) {
|
|
|
|
|
+ PracticeGroup practiceGroup = practiceGroupDao.get(practiceGroupId);
|
|
|
|
|
+ if(Objects.isNull(practiceGroup)){
|
|
|
|
|
+ throw new BizException("未找到此课程");
|
|
|
|
|
+ }
|
|
|
|
|
+ VipGroupPayInfoDto vipGroupPayInfo = new VipGroupPayInfoDto();
|
|
|
|
|
+ vipGroupPayInfo.setVipGroupId(practiceGroupId.intValue());
|
|
|
|
|
+ vipGroupPayInfo.setViipGroupName(practiceGroup.getName());
|
|
|
|
|
+ vipGroupPayInfo.setPrice(practiceGroup.getTotalPrice());
|
|
|
|
|
+ SysUserCashAccount sysUserCashAccount = sysUserCashAccountService.get(userId);
|
|
|
|
|
+ if(Objects.isNull(sysUserCashAccount)){
|
|
|
|
|
+ throw new BizException("当前用户没有现金账户");
|
|
|
|
|
+ }
|
|
|
|
|
+ vipGroupPayInfo.setBalance(sysUserCashAccount.getBalance());
|
|
|
|
|
+ return vipGroupPayInfo;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|