|
@@ -144,19 +144,17 @@ public class OrderServiceImpl extends BaseServiceImpl<Integer, Order> implements
|
|
|
String returnUrl = this.returnHost + "/#/payment?userId=" + order.getUserId();//支付后返回页面
|
|
|
|
|
|
if (school != null) {
|
|
|
- returnUrl = this.returnHost + "/#/login?schoolId=" + school.getSchoolId() + "&cityId=" + school.getCityId();//支付后返回页面
|
|
|
+ returnUrl = this.returnHost + "/#/login?schoolId=" + school.getSchoolId() + "&cityId=" + school.getCityId();//支付后返回页面
|
|
|
}
|
|
|
String payUrl = "https://qyfapi.95epay.com/api/api/hPay/toPayHtml";//支付跳转页
|
|
|
String payChannels = "{\"weChatPay\":true,\"weChatPayMobile\":false,\"aliPay\":true,\"fastpayXy\":true,\"aliPayMobile\":false,\"balancePay\":false}";//支付方式配置
|
|
|
|
|
|
List<Map> tempRoutingList = new ArrayList();
|
|
|
- if (routingAccount.getBranchId().equals(0)) {
|
|
|
- Map<String, Object> routingList = new HashMap<>();
|
|
|
- routingList.put("routingMerNo", routingAccount.getSellerNo());//分佣账户
|
|
|
-// routingList.put("routingFee", order.getAmount()); //分佣金额
|
|
|
- routingList.put("routingFee", order.getAmount().subtract((order.getAmount().multiply(new BigDecimal(0.28)).divide(new BigDecimal(100))).setScale(2, BigDecimal.ROUND_HALF_UP))); //分佣金额
|
|
|
- tempRoutingList.add(routingList);
|
|
|
- }
|
|
|
+ Map<String, Object> routingList = new HashMap<>();
|
|
|
+ routingList.put("routingMerNo", routingAccount.getSellerNo());//分佣账户
|
|
|
+// routingList.put("routingFee", order.getAmount()); //分佣金额
|
|
|
+ routingList.put("routingFee", order.getAmount().subtract((order.getAmount().multiply(new BigDecimal(0.28)).divide(new BigDecimal(100))).setScale(2, BigDecimal.ROUND_HALF_UP))); //分佣金额
|
|
|
+ tempRoutingList.add(routingList);
|
|
|
|
|
|
/*订单信息*/
|
|
|
String orderBody = "大雅乐盟培训课程";
|
|
@@ -173,17 +171,15 @@ public class OrderServiceImpl extends BaseServiceImpl<Integer, Order> implements
|
|
|
resultMap.put("merMerOrderNo", order.getOrderNo()); //商户订单号
|
|
|
resultMap.put("orderSubject", orderSubject); //订单标题
|
|
|
resultMap.put("returnUrl", returnUrl); //前台页面地址
|
|
|
- if (routingAccount.getBranchId().equals(0)) {
|
|
|
- resultMap.put("tempRoutingList", JSON.toJSONString(tempRoutingList));//分账设置
|
|
|
- }
|
|
|
+ resultMap.put("tempRoutingList", JSON.toJSONString(tempRoutingList));//分账设置
|
|
|
Map rqMap = new YqPayUtil(notifyUrl, resultMap).getRequestMap();
|
|
|
rqMap.put("host", payUrl);
|
|
|
return rqMap;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<Order> getOrderByClassId(Integer classId, Integer type,String voicyPart) {
|
|
|
- return orderDao.getOrderByClassId(classId, type,voicyPart);
|
|
|
+ public List<Order> getOrderByClassId(Integer classId, Integer type, String voicyPart) {
|
|
|
+ return orderDao.getOrderByClassId(classId, type, voicyPart);
|
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|
|
@@ -214,8 +210,8 @@ public class OrderServiceImpl extends BaseServiceImpl<Integer, Order> implements
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Order findRegOrderByStatus(Integer userId, Integer status){
|
|
|
- return orderDao.findRegOrderByStatus(userId,status);
|
|
|
+ public Order findRegOrderByStatus(Integer userId, Integer status) {
|
|
|
+ return orderDao.findRegOrderByStatus(userId, status);
|
|
|
}
|
|
|
|
|
|
|