|  | @@ -341,100 +341,4 @@ public class StudentOrderController extends BaseController {
 | 
	
		
			
				|  |  |          luckStatisDto.setTotalMoney(totalMoney);
 | 
	
		
			
				|  |  |          return succeed(luckStatisDto);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @GetMapping("/fixOrder")
 | 
	
		
			
				|  |  | -    private void fixOrder() throws Exception {
 | 
	
		
			
				|  |  | -        List<StudentPaymentOrder> payingOrders = studentPaymentOrderDao.findFixOrder();
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        if (payingOrders.size() == 0) {
 | 
	
		
			
				|  |  | -            return;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        String merOrderNos = payingOrders.stream().map(StudentPaymentOrder::getOrderNo).collect(Collectors.joining(","));
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        String notifyUrl = ""; //回调地址
 | 
	
		
			
				|  |  | -        Map<String, Object> resultMap = new LinkedHashMap<>();
 | 
	
		
			
				|  |  | -        resultMap.put("merOrderNoList", merOrderNos);
 | 
	
		
			
				|  |  | -        Map<String, Object> requestMap = YqPayUtil.getRequestMap(notifyUrl, resultMap);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        RsqMsg rsqMsg = new RsqMsg(requestMap);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        Msg queryRs = yqPayFeignService.orderQuery(rsqMsg);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        if (queryRs.getCode().equals("88")) {
 | 
	
		
			
				|  |  | -            String responseParameters = queryRs.getResponseParameters();
 | 
	
		
			
				|  |  | -            List<Map<String, Object>> responseList = JSON.parseObject(responseParameters, List.class);
 | 
	
		
			
				|  |  | -            for (Map<String, Object> response : responseList) {
 | 
	
		
			
				|  |  | -                String type = "per";
 | 
	
		
			
				|  |  | -                String orderNo = (String) response.get("merOrderNo");
 | 
	
		
			
				|  |  | -                String tempRoutingResultList = response.get("tempRoutingResultList").toString();
 | 
	
		
			
				|  |  | -                System.out.println(tempRoutingResultList);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -                if (tempRoutingResultList.contains("武汉大雅乐盟教育咨询有限公司")) {
 | 
	
		
			
				|  |  | -                    type = "com";
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                fixUpdateOrder(orderNo, type);
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    void fixUpdateOrder(String orderNo, String type) {
 | 
	
		
			
				|  |  | -        StudentPaymentOrder order = studentPaymentOrderService.findOrderByOrderNo(orderNo);
 | 
	
		
			
				|  |  | -        if (type.equals("com")) {
 | 
	
		
			
				|  |  | -            order.setComAmount(order.getActualAmount());
 | 
	
		
			
				|  |  | -            order.setPerAmount(BigDecimal.ZERO);
 | 
	
		
			
				|  |  | -            order.setMerNos("0023115");
 | 
	
		
			
				|  |  | -        } else {
 | 
	
		
			
				|  |  | -            order.setComAmount(BigDecimal.ZERO);
 | 
	
		
			
				|  |  | -            order.setPerAmount(order.getActualAmount());
 | 
	
		
			
				|  |  | -            order.setMerNos("0031215");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        studentPaymentOrderService.update(order);
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @GetMapping("/teacherCourseStatistic")
 | 
	
		
			
				|  |  | -    public HttpResponseResult teacherCourseStatistic() {
 | 
	
		
			
				|  |  | -        Date nextMonthDate = DateUtil.addMonths(new Date(), 1);
 | 
	
		
			
				|  |  | -        Date startDate = DateUtil.getFirstDayOfMonth(nextMonthDate);
 | 
	
		
			
				|  |  | -        Date endDate = DateUtil.getLastDayOfMonth(nextMonthDate);
 | 
	
		
			
				|  |  | -        BigDecimal salary = new BigDecimal("4000");
 | 
	
		
			
				|  |  | -        List<TeacherCourseStatistics> teacherCourseStatisticsList = teacherCourseStatisticsDao.findUserByWarringSalary(startDate, endDate, salary);
 | 
	
		
			
				|  |  | -        if(teacherCourseStatisticsList.size() ==0){
 | 
	
		
			
				|  |  | -            return failed("没有做");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        List<Integer> userIds = teacherCourseStatisticsList.stream().map(TeacherCourseStatistics::getUserId).collect(Collectors.toList());
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        List<TeacherCourseStatistics> teCourseSalaryStatisAndTypes = teacherCourseStatisticsDao.findUserCourseSalaryByUserIds(userIds,startDate,endDate);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        for (TeacherCourseStatistics teacherCourseStatistics : teacherCourseStatisticsList) {
 | 
	
		
			
				|  |  | -            int vipCourseNum = 0;
 | 
	
		
			
				|  |  | -            int musicCourseNum =0;
 | 
	
		
			
				|  |  | -            BigDecimal expectVipCourseSalary = BigDecimal.ZERO;
 | 
	
		
			
				|  |  | -            BigDecimal expectMusicCourseSalary = BigDecimal.ZERO;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            for (TeacherCourseStatistics teCourseSalaryStatisAndType : teCourseSalaryStatisAndTypes) {
 | 
	
		
			
				|  |  | -                if(!teacherCourseStatistics.getUserId().equals(teCourseSalaryStatisAndType.getUserId())) continue;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -                if(teCourseSalaryStatisAndType.getGroupType().equals("VIP")){
 | 
	
		
			
				|  |  | -                    expectVipCourseSalary = teCourseSalaryStatisAndType.getExpectTotalSalary();
 | 
	
		
			
				|  |  | -                    vipCourseNum = teCourseSalaryStatisAndType.getMusicCourseNum();
 | 
	
		
			
				|  |  | -                }else if(teCourseSalaryStatisAndType.getGroupType().equals("MUSIC")){
 | 
	
		
			
				|  |  | -                    expectMusicCourseSalary = teCourseSalaryStatisAndType.getExpectTotalSalary();
 | 
	
		
			
				|  |  | -                    musicCourseNum = teCourseSalaryStatisAndType.getMusicCourseNum();
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            teacherCourseStatistics.setExpectVipCourseSalary(expectVipCourseSalary);
 | 
	
		
			
				|  |  | -            teacherCourseStatistics.setExpectMusicCourseSalary(expectMusicCourseSalary);
 | 
	
		
			
				|  |  | -            teacherCourseStatistics.setVipCourseNum(vipCourseNum);
 | 
	
		
			
				|  |  | -            teacherCourseStatistics.setMusicCourseNum(musicCourseNum);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            if(teacherCourseStatistics.getSubjectIdList()==null){
 | 
	
		
			
				|  |  | -                teacherCourseStatistics.setSubjectIdList("");
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            teacherCourseStatistics.setMonth(startDate);
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        teacherCourseStatisticsDao.batchAdd(teacherCourseStatisticsList);
 | 
	
		
			
				|  |  | -        return succeed(teacherCourseStatisticsList);
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  |  }
 |