提交代码

new-dev
胡锐 1 year ago
parent 8bbce56b0f
commit a266b18dda
  1. 1
      hai-order/src/main/java/com/web/config/AuthConfig.java
  2. 10
      hai-order/src/main/java/com/web/controller/notify/HuiPayNotifyController.java
  3. 27
      hai-service/src/main/java/com/hai/dao/HighGasClassGroupTaskMapperExt.java
  4. 12
      hai-service/src/main/java/com/hai/order/service/impl/OrderPayBeforeServiceImpl.java

@ -91,6 +91,7 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/**/swagger-ui.html") .excludePathPatterns("/**/swagger-ui.html")
.excludePathPatterns("/login/*") .excludePathPatterns("/login/*")
.excludePathPatterns("/createNL") .excludePathPatterns("/createNL")
.excludePathPatterns("/getDetailByOrderNo")
.excludePathPatterns("/cqNotify/*") .excludePathPatterns("/cqNotify/*")
.excludePathPatterns("/mobileRechargeNotify/*") .excludePathPatterns("/mobileRechargeNotify/*")
.excludePathPatterns("/payNotify/*") .excludePathPatterns("/payNotify/*")

@ -49,9 +49,17 @@ public class HuiPayNotifyController {
// 查询交易订单 // 查询交易订单
HighOrder order = orderService.getOrderDetailByNo(dataObject.getString("outTradeNo")); HighOrder order = orderService.getOrderDetailByNo(dataObject.getString("outTradeNo"));
if (order != null && order.getOrderStatus().equals(OrderStatus.STATUS1.getNumber())) { if (order != null && order.getOrderStatus().equals(OrderStatus.STATUS1.getNumber())) {
OrderPayType orderPayType = null;
if (dataObject.getString("payMode").equals("WECHAT")) {
orderPayType = OrderPayType.PAY_TYPE2;
} else if (dataObject.getString("payMode").equals("ALIPAY")) {
orderPayType = OrderPayType.PAY_TYPE1;
} else if (dataObject.getString("payMode").equals("UQRCODEPAY")) {
orderPayType = OrderPayType.PAY_TYPE5;
}
// 处理订单业务 // 处理订单业务
paySuccessService.orderPaySuccessHandle(dataObject.getString("outTradeNo"), paySuccessService.orderPaySuccessHandle(dataObject.getString("outTradeNo"),
OrderPayType.PAY_TYPE2, orderPayType,
dataObject.getString("accTradeNo"), dataObject.getString("accTradeNo"),
dataObject.getBigDecimal("tradeAmount"), dataObject.getBigDecimal("tradeAmount"),
null); null);

@ -13,27 +13,23 @@ public interface HighGasClassGroupTaskMapperExt {
@Select("<script>" + @Select("<script>" +
" select " + " select " +
" case when SUM(a.total_price) is not null then SUM(a.total_price) else 0 end refuelPrice," + " case when SUM(a.gas_refuel_price) is not null then SUM(a.gas_refuel_price) else 0 end refuelPrice," +
" COUNT(1) refuelNum," + " COUNT(1) refuelNum," +
" case when SUM(a.gas_oil_liters) is not null then SUM(a.gas_oil_liters) else 0 end refuelLiters" + " case when SUM(a.gas_oil_liters) is not null then SUM(a.gas_oil_liters) else 0 end refuelLiters" +
" from high_child_order a" + " from high_gas_order a" +
" LEFT JOIN high_order b on b.id = a.order_id" + " where a.gas_class_group_task_id = #{gasClassGroupTaskId} " +
" where a.goods_type = 3 " + " and a.status in (2)" +
" and a.gas_class_group_task_id = #{gasClassGroupTaskId} " +
" and b.order_status in (2,3)" +
"</script>") "</script>")
Map<String, Object> countRefuelData(@Param("gasClassGroupTaskId") Long gasClassGroupTaskId); Map<String, Object> countRefuelData(@Param("gasClassGroupTaskId") Long gasClassGroupTaskId);
@Select("<script>" + @Select("<script>" +
" select" + " select" +
" case when SUM(a.total_price) is not null then SUM(a.total_price) else 0 end refundPrice," + " case when SUM(a.gas_refuel_price) is not null then SUM(a.gas_refuel_price) else 0 end refundPrice," +
" COUNT(1) refundNum," + " COUNT(1) refundNum," +
" case when SUM(a.gas_oil_liters) is not null then SUM(a.gas_oil_liters) else 0 end refundLiters" + " case when SUM(a.gas_oil_liters) is not null then SUM(a.gas_oil_liters) else 0 end refundLiters" +
" from high_child_order a" + " from high_gas_order a" +
" LEFT JOIN high_order b on b.id = a.order_id" + " where a.gas_class_group_task_id = #{gasClassGroupTaskId}" +
" where a.goods_type = 3 " + " and a.status in (4)" +
" and a.gas_class_group_task_id = #{gasClassGroupTaskId}" +
" and b.order_status in (4)" +
"</script>") "</script>")
Map<String, Object> countRefundData(@Param("gasClassGroupTaskId") Long gasClassGroupTaskId); Map<String, Object> countRefundData(@Param("gasClassGroupTaskId") Long gasClassGroupTaskId);
@ -46,12 +42,11 @@ public interface HighGasClassGroupTaskMapperExt {
" FROM" + " FROM" +
" high_gas_oil_price a " + " high_gas_oil_price a " +
" LEFT JOIN (select gas_oil_no," + " LEFT JOIN (select gas_oil_no," +
" case when SUM(a.total_price) is not null then SUM(a.total_price) else 0 end refuelPrice," + " case when SUM(a.gas_refuel_price) is not null then SUM(a.gas_refuel_price) else 0 end refuelPrice," +
" COUNT(1) refuelNum," + " COUNT(1) refuelNum," +
" case when SUM(a.gas_oil_liters) is not null then SUM(a.gas_oil_liters) else 0 end refuelLiters" + " case when SUM(a.gas_oil_liters) is not null then SUM(a.gas_oil_liters) else 0 end refuelLiters" +
" from high_child_order a" + " from high_gas_order a" +
" LEFT JOIN high_order b on b.id = a.order_id" + " where a.gas_class_group_task_id = #{gasClassGroupTaskId} and a.status in (4)" +
" where a.gas_class_group_task_id = #{gasClassGroupTaskId} and a.goods_type = 3 and b.order_status in (2,3)" +
" GROUP BY a.gas_oil_no) b on b.gas_oil_no = a.oil_no" + " GROUP BY a.gas_oil_no) b on b.gas_oil_no = a.oil_no" +
" WHERE a.merchant_store_id = #{gasId} and <![CDATA[ `status` <> 0 ]]> " + " WHERE a.merchant_store_id = #{gasId} and <![CDATA[ `status` <> 0 ]]> " +
"</script>") "</script>")

@ -51,41 +51,41 @@ public class OrderPayBeforeServiceImpl implements OrderPayBeforeService {
if (store.getSourceType().equals(MerchantStoreSourceType.type1.getNumber())) { if (store.getSourceType().equals(MerchantStoreSourceType.type1.getNumber())) {
// 查询支付配置 // 查询支付配置
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type1, GasChannelPayPlatformType.type1 ); HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type1);
if (gasChannelConfig == null) { if (gasChannelConfig == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!");
} }
} else if (store.getSourceType().equals(MerchantStoreSourceType.type2.getNumber())) { } else if (store.getSourceType().equals(MerchantStoreSourceType.type2.getNumber())) {
// 查询支付配置 // 查询支付配置
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type2,GasChannelPayPlatformType.type1 ); HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type2);
if (gasChannelConfig == null) { if (gasChannelConfig == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!");
} }
} else if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) { } else if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) {
// 查询支付配置 // 查询支付配置
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type3,GasChannelPayPlatformType.type1 ); HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type3);
if (gasChannelConfig == null) { if (gasChannelConfig == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!");
} }
} else if (store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber())) { } else if (store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber())) {
// 查询支付配置 // 查询支付配置
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type4,GasChannelPayPlatformType.type1 ); HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type4);
if (gasChannelConfig == null) { if (gasChannelConfig == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!");
} }
} else if (store.getSourceType().equals(MerchantStoreSourceType.type5.getNumber())) { } else if (store.getSourceType().equals(MerchantStoreSourceType.type5.getNumber())) {
// 查询支付配置 // 查询支付配置
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type5,GasChannelPayPlatformType.type1 ); HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type5);
if (gasChannelConfig == null) { if (gasChannelConfig == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!");
} }
} else if (store.getSourceType().equals(MerchantStoreSourceType.type6.getNumber())) { } else if (store.getSourceType().equals(MerchantStoreSourceType.type6.getNumber())) {
// 查询支付配置 // 查询支付配置
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type6,GasChannelPayPlatformType.type1 ); HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type6);
if (gasChannelConfig == null) { if (gasChannelConfig == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!");
} }

Loading…
Cancel
Save