|
@@ -536,7 +536,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
public Map buyVipGroup(VipGroupBuyParamsDto vipGroupBuyParams) throws Exception {
|
|
|
SysUser user = sysUserFeignService.queryUserInfo();
|
|
|
|
|
|
- StudentPaymentOrder byStudentVipGroup = studentPaymentOrderDao.findByStudentVipGroup(vipGroupBuyParams.getVipGroupId(), user.getId().longValue());
|
|
|
+ StudentPaymentOrder byStudentVipGroup = studentPaymentOrderDao.findByStudentVipGroup(vipGroupBuyParams.getVipGroupId(), user.getId());
|
|
|
|
|
|
if(Objects.nonNull(byStudentVipGroup)){
|
|
|
throw new BizException("订单已存在!");
|
|
@@ -595,7 +595,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
/*
|
|
|
根据回调信息调整订单状态及vip课程状态等相关信息
|
|
|
*/
|
|
|
- Long vipGroupId=1L,userId=1L;
|
|
|
+ Long vipGroupId=1L;
|
|
|
+ Integer userId = 1;
|
|
|
|
|
|
VipGroup vipGroup = vipGroupDao.get(vipGroupId);
|
|
|
|
|
@@ -623,11 +624,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@Override
|
|
|
- public void applyRefund(Long vipGroupId,Long studentId) {
|
|
|
- SysUser sysUser=sysUserFeignService.queryUserInfo();
|
|
|
- if(null==studentId){
|
|
|
- studentId=sysUser.getId().longValue();
|
|
|
- }
|
|
|
+ public void applyRefund(Long vipGroupId,Integer studentId) {
|
|
|
+
|
|
|
StudentApplyRefunds studentApplyRefunds=new StudentApplyRefunds();
|
|
|
StudentPaymentOrder studentPaymentOrder = studentPaymentOrderDao.findByStudentVipGroup(vipGroupId,studentId);
|
|
|
if(null==studentPaymentOrder){
|
|
@@ -773,14 +771,14 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
vipGroupDao.update(vipGroup);
|
|
|
return;
|
|
|
}
|
|
|
- List<Map<Long, BigDecimal>> maps = vipGroupDao.countSurplusCourseFee(vipGroupId);
|
|
|
+ List<Map<Integer, BigDecimal>> maps = vipGroupDao.countSurplusCourseFee(vipGroupId);
|
|
|
if(CollectionUtils.isEmpty(maps)||(maps.size()==1&&Objects.isNull(maps.get(0)))){
|
|
|
vipGroup.setStatus(VipGroupStatusEnum.CANCEL);
|
|
|
vipGroupDao.update(vipGroup);
|
|
|
return;
|
|
|
}
|
|
|
- Map<Long, BigDecimal> studentSurplusClassFees = MapUtil.convertMybatisMap(maps);
|
|
|
- for(Long userId:studentSurplusClassFees.keySet()){
|
|
|
+ Map<Integer, BigDecimal> studentSurplusClassFees = MapUtil.convertMybatisMap(maps);
|
|
|
+ for(Integer userId:studentSurplusClassFees.keySet()){
|
|
|
StudentPaymentOrder studentPaymentOrder = studentPaymentOrderDao.findByStudentVipGroup(vipGroupId,userId);
|
|
|
if(null==studentPaymentOrder){
|
|
|
throw new BizException("未找到相关订单信息!");
|