| | |
| | | @Override |
| | | public ResultUtil addStuOfAppUser(StuDetailsReq stu, Integer appUserId) throws Exception { |
| | | TStudent student = new TStudent(); |
| | | if (ToolUtil.isNotEmpty(stu.getName()) && ToolUtil.isNotEmpty(stu.getIdCard())) { |
| | | Boolean aBoolean = JuHeUtil.idcardAuthentication(stu.getIdCard(), stu.getName()); |
| | | if (!aBoolean) { |
| | | return ResultUtil.error("身份证和姓名不匹配"); |
| | | } |
| | | if(ToolUtil.isEmpty(stu.getIdCard())){ |
| | | return ResultUtil.error("请填写身份证号"); |
| | | } |
| | | Boolean aBoolean = JuHeUtil.idcardAuthentication(stu.getIdCard(), stu.getName()); |
| | | if (!aBoolean) { |
| | | return ResultUtil.error("身份证和姓名不匹配"); |
| | | } |
| | | student.setAppUserId(appUserId); |
| | | student.setName(stu.getName()); |
| | |
| | | packagePayment.setStatus(1); |
| | | packagePayment.setState(1); |
| | | packagePayment.setInsertTime(new Date()); |
| | | couPayClient.savePaymentCoursePackage(packagePayment); |
| | | // couPayClient.savePaymentCoursePackage(packagePayment); |
| | | |
| | | Integer hour = couPayClient.getClassHour(request.getCourseConfigId()); |
| | | |
| | |
| | | Map<String, String> data1 = resultUtil.getData(); |
| | | String s = data1.get("trade_state"); |
| | | String transaction_id = data1.get("transaction_id"); |
| | | if ("REFUND".equals(s) || "NOTPAY".equals(s) || "CLOSED".equals(s) || "REVOKED".equals(s) || "PAYERROR".equals(s) || num == 10) { |
| | | if ("REFUND".equals(s) || "CLOSED".equals(s) || "REVOKED".equals(s) || "PAYERROR".equals(s) || num == 10) { |
| | | coursePackagePayment.setState(3); |
| | | couPayClient.delPaymentCoursePackage(coursePackagePayment.getId()); |
| | | break; |
| | |
| | | couPayClient.updatePaymentCoursePackage(coursePackagePayment); |
| | | break; |
| | | } |
| | | if ("USERPAYING".equals(s)) { |
| | | if ("USERPAYING".equals(s) || "NOTPAY".equals(s)) { |
| | | num++; |
| | | } |
| | | } |
| | |
| | | citycodeResp.setLatitude(longitude); |
| | | List<StoreDetailList> queryStoreList = storeClient.getQueryStoreList(citycodeResp); |
| | | if (queryStoreList.size() > 0) { |
| | | |
| | | if (ToolUtil.isEmpty(space) || space ==1) { |
| | | queryStoreList = queryStoreList.stream().sorted(Comparator.comparing(o -> o.getStoreDistance())).collect(Collectors.toList()); |
| | | |
| | | |
| | | } else { |
| | | queryStoreList = queryStoreList.stream() |
| | | .sorted(Comparator.comparing(StoreDetailList::getStoreDistance).reversed()) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | |
| | | |
| | | // if (ToolUtil.isEmpty(space) || space == 2) { |
| | | // queryStoreList = queryStoreList.stream() |
| | | // .sorted(Comparator.comparing(StoreDetailList::getStoreDistance).reversed()) |
| | | // .collect(Collectors.toList()); |
| | | // |
| | | // } else { |
| | | // queryStoreList = queryStoreList.stream().sorted(Comparator.comparing(o -> o.getStoreDistance())).collect(Collectors.toList()); |
| | | // } |
| | | if (ToolUtil.isNotEmpty(search)) { |
| | | queryStoreList = queryStoreList.stream().filter(o -> o.getStoreName().contains(search)).collect(Collectors.toList()); |
| | | } |
| | | |
| | | } |
| | | return queryStoreList; |
| | | } |