| 
														
															@@ -1,17 +1,16 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 package com.ym.mec.web.controller; 
														 | 
														
														 | 
														
															 package com.ym.mec.web.controller; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-import com.ym.mec.biz.dal.dto.PaymentParam; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.ym.mec.biz.dal.dto.StudentVipGroupShowListDto; 
														 | 
														
														 | 
														
															 import com.ym.mec.biz.dal.dto.StudentVipGroupShowListDto; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-import com.ym.mec.biz.dal.entity.StudentPaymentOrder; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.ym.mec.biz.dal.entity.*; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.ym.mec.biz.dal.page.StudentVipGroupQueryInfo; 
														 | 
														
														 | 
														
															 import com.ym.mec.biz.dal.page.StudentVipGroupQueryInfo; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.ym.mec.biz.service.*; 
														 | 
														
														 | 
														
															 import com.ym.mec.biz.service.*; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.ym.mec.common.entity.HttpResponseResult; 
														 | 
														
														 | 
														
															 import com.ym.mec.common.entity.HttpResponseResult; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.ym.mec.common.entity.MallCreateOrderModel; 
														 | 
														
														 | 
														
															 import com.ym.mec.common.entity.MallCreateOrderModel; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.ym.mec.common.entity.OrderCancelModel; 
														 | 
														
														 | 
														
															 import com.ym.mec.common.entity.OrderCancelModel; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.ym.mec.thirdparty.adapay.Payment; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.ym.mec.thirdparty.adapay.entity.BaseResult; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import io.swagger.annotations.Api; 
														 | 
														
														 | 
														
															 import io.swagger.annotations.Api; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-import io.swagger.annotations.ApiImplicitParam; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-import io.swagger.annotations.ApiImplicitParams; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import io.swagger.annotations.ApiOperation; 
														 | 
														
														 | 
														
															 import io.swagger.annotations.ApiOperation; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import org.apache.commons.lang3.StringUtils; 
														 | 
														
														 | 
														
															 import org.apache.commons.lang3.StringUtils; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import org.springframework.beans.factory.annotation.Autowired; 
														 | 
														
														 | 
														
															 import org.springframework.beans.factory.annotation.Autowired; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -23,12 +22,8 @@ import com.ym.mec.auth.api.entity.SysUser; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.ym.mec.biz.dal.dao.EmployeeDao; 
														 | 
														
														 | 
														
															 import com.ym.mec.biz.dal.dao.EmployeeDao; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.ym.mec.biz.dal.dao.SysUserCashAccountDao; 
														 | 
														
														 | 
														
															 import com.ym.mec.biz.dal.dao.SysUserCashAccountDao; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.ym.mec.biz.dal.dao.TeacherDao; 
														 | 
														
														 | 
														
															 import com.ym.mec.biz.dal.dao.TeacherDao; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-import com.ym.mec.biz.dal.entity.Employee; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-import com.ym.mec.biz.dal.entity.SysUserCashAccount; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-import com.ym.mec.biz.dal.entity.Teacher; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.ym.mec.common.controller.BaseController; 
														 | 
														
														 | 
														
															 import com.ym.mec.common.controller.BaseController; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-import java.util.Date; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import java.util.HashMap; 
														 | 
														
														 | 
														
															 import java.util.HashMap; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import java.util.List; 
														 | 
														
														 | 
														
															 import java.util.List; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import java.util.Map; 
														 | 
														
														 | 
														
															 import java.util.Map; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -61,6 +56,9 @@ public class APIController extends BaseController { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	private VipGroupService vipGroupService; 
														 | 
														
														 | 
														
															 	private VipGroupService vipGroupService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	@Autowired 
														 | 
														
														 | 
														
															 	@Autowired 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	private SysConfigService sysConfigService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	@Autowired 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	private StudentPaymentOrderService studentPaymentOrderService; 
														 | 
														
														 | 
														
															 	private StudentPaymentOrderService studentPaymentOrderService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	@GetMapping("/createCashAccount") 
														 | 
														
														 | 
														
															 	@GetMapping("/createCashAccount") 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -135,6 +133,7 @@ public class APIController extends BaseController { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	// 商城创建订单 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	@PostMapping("/mallCreateOrder") 
														 | 
														
														 | 
														
															 	@PostMapping("/mallCreateOrder") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	public HttpResponseResult<Map> mallCreateOrder(@RequestBody MallCreateOrderModel model) { 
														 | 
														
														 | 
														
															 	public HttpResponseResult<Map> mallCreateOrder(@RequestBody MallCreateOrderModel model) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		try { 
														 | 
														
														 | 
														
															 		try { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -146,6 +145,7 @@ public class APIController extends BaseController { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	} 
														 | 
														
														 | 
														
															 	} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	// 商城保存订单详情数据 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	@PostMapping("/mallSaveOrderInfo") 
														 | 
														
														 | 
														
															 	@PostMapping("/mallSaveOrderInfo") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	public HttpResponseResult<Map> mallSaveOrderInfo(@RequestBody MallCreateOrderModel model) { 
														 | 
														
														 | 
														
															 	public HttpResponseResult<Map> mallSaveOrderInfo(@RequestBody MallCreateOrderModel model) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		try { 
														 | 
														
														 | 
														
															 		try { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -157,23 +157,7 @@ public class APIController extends BaseController { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		} 
														 | 
														
														 | 
														
															 		} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	} 
														 | 
														
														 | 
														
															 	} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	@ApiOperation(value = "台牌支付") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	@PostMapping("/executePayment") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	@ApiImplicitParams({ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			@ApiImplicitParam(name = "amount", value = "支付金额", required = true, dataType = "BigDecimal"), 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			@ApiImplicitParam(name = "orderNo", value = "订单号", required = true, dataType = "String"), 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			@ApiImplicitParam(name = "payChannel", value = "支付方式(alipay-支付宝app支付)", required = true, dataType = "String"), 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	}) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	public Object executePayment(@RequestBody PaymentParam paymentParam) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		try { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			Map<String, Object> payment = orderPayOpsService.executePayment(paymentParam); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			return succeed(payment); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		} catch (Exception e) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			return failed(e.getMessage()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	// 商城支付成功/失败修改订单状态 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	@PostMapping("/updateOrder") 
														 | 
														
														 | 
														
															 	@PostMapping("/updateOrder") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	public HttpResponseResult updateOrder(@RequestBody Map map) { 
														 | 
														
														 | 
														
															 	public HttpResponseResult updateOrder(@RequestBody Map map) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -188,10 +172,8 @@ public class APIController extends BaseController { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	/** 
														 | 
														
														 | 
														
															 	/** 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	 * 取消订单接口 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	 * 商城取消订单接口 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	 * 
														 | 
														
														 | 
														
															 	 * 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	 * @param orderNo 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	 * @return 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	 */ 
														 | 
														
														 | 
														
															 	 */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	@PostMapping("/cancelOrder") 
														 | 
														
														 | 
														
															 	@PostMapping("/cancelOrder") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	public HttpResponseResult<OrderCancelModel> cancelOrder(@RequestParam String orderNo) { 
														 | 
														
														 | 
														
															 	public HttpResponseResult<OrderCancelModel> cancelOrder(@RequestParam String orderNo) { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -212,4 +194,38 @@ public class APIController extends BaseController { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		} 
														 | 
														
														 | 
														
															 		} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	} 
														 | 
														
														 | 
														
															 	} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	// 商城获取 退款数据 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	@GetMapping("/getRefundInfo") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	public HttpResponseResult<Map<String,String>> getBaseUrl(@RequestParam String orderNo) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		try { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			SysConfig baseApiUrl = sysConfigService.findByParamName("base_api_url"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			StudentPaymentOrder orderByOrderNo = studentPaymentOrderService.findOrderByOrderNo(orderNo); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			Map<String,String> result = new HashMap<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			result.put("transNo",orderByOrderNo.getTransNo()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			result.put("baseUrl",baseApiUrl.getParanValue()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			return succeed(result); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		} catch (Exception e) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			e.printStackTrace(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			return failed(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	// 商城获取 退款数据 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	@GetMapping("/refund") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	public HttpResponseResult<BaseResult<Map<String, Object>>> refund(@RequestParam Map<String,Object> refundInfo) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		try { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			BaseResult<Map<String, Object>> mapBaseResult = Payment.refundPayment(refundInfo); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			return succeed(mapBaseResult); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		} catch (Exception e) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			e.printStackTrace(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			return failed(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 |