| 
					
				 | 
			
			
				@@ -107,9 +107,9 @@ public class MusicGroupController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         StudentRegistration studentRegistration = studentRegistrationService.queryByUserIdAndMusicGroupId(userId, musicGroupId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (studentRegistration == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return failed(HttpStatus.CONTINUE,"乐团报名信息不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return failed(HttpStatus.CONTINUE, "乐团报名信息不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (!musicGroup.getStatus().equals(MusicGroupStatusEnum.PAY) && (studentRegistration.getPaymentStatus()==null || !studentRegistration.getPaymentStatus().equals(PaymentStatusEnum.OPEN))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!musicGroup.getStatus().equals(MusicGroupStatusEnum.PAY) && (studentRegistration.getPaymentStatus() == null || !studentRegistration.getPaymentStatus().equals(PaymentStatusEnum.OPEN))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return failed("乐团还未开启缴费,请等待通知"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return succeed(studentRegistration); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -118,57 +118,57 @@ public class MusicGroupController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation(value = "查询续费信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/queryRenewInfo") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团id", required = true, dataType = "String")}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	public HttpResponseResult queryRenewInfo(String musicGroupId) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		SysUser sysUser = sysUserFeignService.queryUserInfo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Integer userId = sysUser.getId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		MusicGroup musicGroup = musicGroupService.get(musicGroupId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		if (musicGroup == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			return failed("乐团不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		MusicGroupStudentFee musicGroupStudentFee = musicGroupStudentFeeDao.findByUser(userId, musicGroupId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		if (musicGroupStudentFee == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			throw new BizException("个人信息不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		if (musicGroupStudentFee.getPaymentStatus() != PaymentStatus.NON_PAYMENT) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			throw new BizException("已缴费"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		BigDecimal amount = musicGroupStudentFee.getTemporaryCourseFee(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		if (amount == null || amount.doubleValue() == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			amount = musicGroupStudentFee.getCourseFee(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		StudentRegistration studentRegistration = studentRegistrationService.queryByUserIdAndMusicGroupId(userId, musicGroupId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		if (studentRegistration == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			return failed("乐团报名信息找不到"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		MusicGroupSubjectPlan musicGroupSubjectPlan = musicGroupSubjectPlanService.getMusicOneSubjectClassPlan(musicGroupId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				studentRegistration.getActualSubjectId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		ModelMap model = new ModelMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		model.put("musicGroup", musicGroup); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		model.put("amount", amount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		model.put("musicGroupSubjectPlan", musicGroupSubjectPlan); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		return succeed(model); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public HttpResponseResult queryRenewInfo(String musicGroupId) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SysUser sysUser = sysUserFeignService.queryUserInfo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Integer userId = sysUser.getId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        MusicGroup musicGroup = musicGroupService.get(musicGroupId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (musicGroup == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return failed("乐团不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        MusicGroupStudentFee musicGroupStudentFee = musicGroupStudentFeeDao.findByUser(userId, musicGroupId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (musicGroupStudentFee == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new BizException("个人信息不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (musicGroupStudentFee.getPaymentStatus() != PaymentStatus.NON_PAYMENT) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new BizException("已缴费"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        BigDecimal amount = musicGroupStudentFee.getTemporaryCourseFee(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (amount == null || amount.doubleValue() == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            amount = musicGroupStudentFee.getCourseFee(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        StudentRegistration studentRegistration = studentRegistrationService.queryByUserIdAndMusicGroupId(userId, musicGroupId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (studentRegistration == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return failed("乐团报名信息找不到"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        MusicGroupSubjectPlan musicGroupSubjectPlan = musicGroupSubjectPlanService.getMusicOneSubjectClassPlan(musicGroupId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                studentRegistration.getActualSubjectId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ModelMap model = new ModelMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        model.put("musicGroup", musicGroup); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        model.put("amount", amount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        model.put("musicGroupSubjectPlan", musicGroupSubjectPlan); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return succeed(model); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation(value = "续费") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/renew") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团id", required = true, dataType = "String")}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	public HttpResponseResult renew(String musicGroupId) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		SysUser sysUser = sysUserFeignService.queryUserInfo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Integer userId = sysUser.getId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		return succeed(musicGroupService.renew(musicGroupId, userId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public HttpResponseResult renew(String musicGroupId) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SysUser sysUser = sysUserFeignService.queryUserInfo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Integer userId = sysUser.getId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return succeed(musicGroupService.renew(musicGroupId, userId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation(value = "退团") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PostMapping("/quitMusicGroup") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团id", required = true, dataType = "String")}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	public HttpResponseResult quitMusicGroup(String musicGroupId) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		SysUser sysUser = sysUserFeignService.queryUserInfo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		return succeed(musicGroupService.applyQuitMusicGroup(musicGroupId, sysUser)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public HttpResponseResult quitMusicGroup(String musicGroupId) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SysUser sysUser = sysUserFeignService.queryUserInfo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return succeed(musicGroupService.applyQuitMusicGroup(musicGroupId, sysUser)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation(value = "乐团报名支付") 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -238,13 +238,13 @@ public class MusicGroupController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String orderNo = idGeneratorService.generatorId("payment")+""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String orderNo = idGeneratorService.generatorId("payment") + ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map payMap = payService.getPayMap( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 orderAmount, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 orderNo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 "http://mstudev.dayaedu.com/api-student/studentOrder/notify", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                "http://mstudev.dayaedu.com/#/paymentresult?orderNo="+orderNo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                "http://mstudev.dayaedu.com/#/paymentresult?orderNo=" + orderNo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 "测试订单", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 "测试订单"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -318,11 +318,11 @@ public class MusicGroupController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return failed("商品价格不符"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String orderNo = idGeneratorService.generatorId("payment")+""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String orderNo = idGeneratorService.generatorId("payment") + ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map payMap = payService.getPayMap(orderAmount, orderNo, "http://47.99.212.176:8000/studentOrder/notify", "http://dev.dayaedu.com", "测试订单", "测试订单"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        studentRegistrationService.reAddOrder(userId, amount, orderNo, "双乾", courseFee, goodsGroups, goodsList, otherGoodsList, studentRegistration.getMusicGroupId(),ApplyOrder); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        studentRegistrationService.reAddOrder(userId, amount, orderNo, (String) payMap.get("type"), courseFee, goodsGroups, goodsList, otherGoodsList, studentRegistration.getMusicGroupId(), ApplyOrder); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return succeed(payMap); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -336,11 +336,11 @@ public class MusicGroupController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //        System.out.println(query); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String orderNo = idGeneratorService.generatorId("payment")+""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String orderNo = idGeneratorService.generatorId("payment") + ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BigDecimal amount = new BigDecimal("0.01"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String payChannel = PayChannelEnum.ALIPAY_QR.getCode(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map map = payService.getPayMap(amount, orderNo, "http://47.99.212.176:8000/studentOrder/notify", "https://baodiu.com", "测试订单", "测试订单"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-       return succeed(map); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return succeed(map); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation(value = "订单状态查询") 
			 |