提交代码

dev-discount
胡锐 3 years ago
parent b40d5dd007
commit 1ade26ce72
  1. 12
      hai-cweb/src/main/java/com/cweb/controller/pay/TuanYouController.java
  2. 38
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java
  3. 10
      hai-service/src/main/resources/dev/commonConfig.properties

@ -19,6 +19,7 @@ import com.hai.entity.HighOrder;
import com.hai.model.OrderRefundModel;
import com.hai.model.ResponseData;
import com.hai.service.HighOrderService;
import com.hai.service.HighUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
@ -49,6 +50,9 @@ public class TuanYouController {
@Resource
private HighGasOrderRefundMapper highGasOrderRefundMapper;
@Resource
private HighUserService highUserService;
@RequestMapping(value = "/orderPaymentNotify", method = RequestMethod.POST)
@ApiOperation(value = "订单支付回调")
@ -94,6 +98,14 @@ public class TuanYouController {
order.setRefundPrice(order.getPayRealPrice());
highOrderService.updateOrderDetail(order);
}
} else if (order.getPayType() == 3){
// 积分退款
highUserService.goldHandle(order.getMemId(), order.getPayGold(),1, 2, order.getId());
order.setOrderStatus(4);
order.setRefundTime(new Date());
order.setRefundPrice(order.getPayRealPrice());
highOrderService.updateOrderDetail(order);
} else if (order.getPayType() == 4) {
String refundOrderNo = String.valueOf(System.currentTimeMillis());
JSONObject refund = HuiLianTongUnionCardConfig.refund(refundOrderNo, order.getPaySerialNo());

@ -339,6 +339,44 @@ public class HighOrderServiceImpl implements HighOrderService {
}
}
if (highChildOrder.getGoodsType() == 3) {
highChildOrder.setChildOrdeStatus(3);
HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreById(highChildOrder.getGoodsId());
// 推送团油订单
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("gasId", store.getStoreKey());
paramMap.put("oilNo", highChildOrder.getGasOilNo());
paramMap.put("gunNo", highChildOrder.getGasGunNo());
BigDecimal priceGun = highChildOrder.getGasPriceGun();
BigDecimal priceVip = highChildOrder.getGasPriceVip();
paramMap.put("priceGun", priceGun); // 枪单价
paramMap.put("priceVip", priceVip); // 优惠价
paramMap.put("driverPhone", highOrder.getMemPhone());
paramMap.put("thirdSerialNo", highOrder.getOrderNo());
paramMap.put("refuelingAmount", highChildOrder.getTotalPrice());
// 油品类型 1:汽油:2:柴油;3:天然气
if (highChildOrder.getGasOilType() == 1) {
paramMap.put("accountNo", CommonSysConst.getSysConfig().getTuanYouGasolineAccount());
} else if (highChildOrder.getGasOilType() == 2) {
paramMap.put("accountNo", CommonSysConst.getSysConfig().getTuanYouDieselAccount());
}
JSONObject orderPushObject = TuanYouConfig.refuelingOrderPush(paramMap);
// 推送团油订单记录
HighGasOrderPush highGasOrderPush = new HighGasOrderPush();
highGasOrderPush.setType(OrderPushType.type1.getType());
highGasOrderPush.setOrderNo(highOrder.getOrderNo());
highGasOrderPush.setCreateTime(new Date());
highGasOrderPush.setCode(orderPushObject.getString("code"));
highGasOrderPush.setRequestContent(JSONObject.toJSONString(paramMap));
highGasOrderPush.setReturnContent(orderPushObject.toJSONString());
highGasOrderPushMapper.insert(highGasOrderPush);
if (orderPushObject != null && orderPushObject.getString("code").equals("200")) {
highChildOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo"));
}
}
if (highChildOrder.getGoodsType() == 7) {
HighDiscountPackageActual actual = discountPackageActualService.getDetailByChildOrderId(highChildOrder.getId());
if (actual != null) {

@ -1,9 +1,9 @@
# ????
tuanYouUrl=https://test02-motorcade-hcs.czb365.com
tuanYouAppKey=208241666939552
tuanYouAppSecret=adecc3cff077834cb8632c8ab3bec0e6
tuanYouDieselAccount=9b115eao4400
tuanYouGasolineAccount=9b115e5g4400
tuanYouUrl=https://test05-motorcade-hcs.czb365.com
tuanYouAppKey=231599775566496
tuanYouAppSecret=cbfab3c550d6142a779c5196c9416342
tuanYouDieselAccount=c009bidg4400
tuanYouGasolineAccount=c009bic04400
# ????
qinzhuUrl=https://live-test.qianzhu8.com

Loading…
Cancel
Save