Merge branch '2.0-master' into 2.0-dev

* 2.0-master:
  提交代码
  提交2。0代码
  提交2。0代码
  提交代码
  提交代码
  提交2。0代码
dev-discount
袁野 2 years ago
commit 5fd4191de9
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  2. 43
      hai-bweb/src/main/resources/prod/logback.xml
  3. 5
      hai-order/src/main/java/com/web/controller/business/OrderCouponController.java
  4. 31
      hai-order/src/main/java/com/web/controller/business/OrderTelChargeCallbackController.java
  5. 48
      hai-order/src/main/java/com/web/controller/notify/MobileRechargeNotifyController.java
  6. 30
      hai-order/src/main/java/com/web/rocketmq/consumer/OrderRefundSuccessConsumer.java
  7. 9
      hai-schedule/src/main/java/com/hai/schedule/HighRechargeOrderSchedule.java
  8. 4
      hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java
  9. 2
      hai-service/src/main/java/com/hai/dao/HighMerchantAccountMapperExt.java
  10. 2
      hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java
  11. 4
      hai-service/src/main/java/com/hai/dao/order/OrderMapperExt.java
  12. 4
      hai-service/src/main/java/com/hai/order/model/OrderCouponModel.java
  13. 2
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  14. 1
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java
  15. 17
      hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java

File diff suppressed because one or more lines are too long

@ -74,6 +74,40 @@
<charset>UTF-8</charset> <!-- 此处设置字符集 --> <charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder> </encoder>
</appender> </appender>
<appender name="RechargeLog"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/RechargeLog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/RechargeLog/RechargeLog.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<appender name="HltCardLog"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/HltCardLog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/hlt/hltcard.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<root level="DEBUG"> <root level="DEBUG">
<appender-ref ref="STDOUT" /> <appender-ref ref="STDOUT" />
@ -91,4 +125,13 @@
<logger name="com.hai.config.WxOrderConfig" level="INFO"> <logger name="com.hai.config.WxOrderConfig" level="INFO">
<appender-ref ref="wechatPayLog" /> <appender-ref ref="wechatPayLog" />
</logger> </logger>
<logger name="com.hai.config.HuiLianTongUnionCardConfig" level="INFO">
<appender-ref ref="HltCardLog" />
</logger>
<logger name="com.hai.config.RechargeConfig" level="INFO">
<appender-ref ref="RechargeLog" />
</logger>
<logger name="com.hai.service.impl.OutRechargeOrderServiceImpl" level="INFO">
<appender-ref ref="RechargeLog" />
</logger>
</configuration> </configuration>

@ -75,6 +75,7 @@ public class OrderCouponController {
@RequestParam(name = "payTimeE", required = false) Long payTimeE, @RequestParam(name = "payTimeE", required = false) Long payTimeE,
@RequestParam(name = "finishTimeS", required = false) Long finishTimeS, @RequestParam(name = "finishTimeS", required = false) Long finishTimeS,
@RequestParam(name = "finishTimeE", required = false) Long finishTimeE, @RequestParam(name = "finishTimeE", required = false) Long finishTimeE,
@RequestParam(name = "exceptionStatus", required = false) Boolean exceptionStatus,
@RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize, @RequestParam(name = "pageSize", required = true) Integer pageSize,
HttpServletRequest request) { HttpServletRequest request) {
@ -109,6 +110,7 @@ public class OrderCouponController {
map.put("payTimeE", payTimeE); map.put("payTimeE", payTimeE);
map.put("finishTimeS", finishTimeS); map.put("finishTimeS", finishTimeS);
map.put("finishTimeE", finishTimeE); map.put("finishTimeE", finishTimeE);
map.put("exceptionStatus", exceptionStatus);
PageHelper.startPage(pageNum,pageSize); PageHelper.startPage(pageNum,pageSize);
return ResponseMsgUtil.success(new PageInfo<>(orderServiceExt.getOrderCouponList(map))); return ResponseMsgUtil.success(new PageInfo<>(orderServiceExt.getOrderCouponList(map)));
@ -120,7 +122,6 @@ public class OrderCouponController {
} }
@RequestMapping(value = "/exportOrderCouponExcel", method = RequestMethod.GET) @RequestMapping(value = "/exportOrderCouponExcel", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "导出卡券订单") @ApiOperation(value = "导出卡券订单")
@ -138,6 +139,7 @@ public class OrderCouponController {
@RequestParam(name = "payTimeE", required = false) Long payTimeE, @RequestParam(name = "payTimeE", required = false) Long payTimeE,
@RequestParam(name = "finishTimeS", required = false) Long finishTimeS, @RequestParam(name = "finishTimeS", required = false) Long finishTimeS,
@RequestParam(name = "finishTimeE", required = false) Long finishTimeE, @RequestParam(name = "finishTimeE", required = false) Long finishTimeE,
@RequestParam(name = "exceptionStatus", required = false) Integer exceptionStatus,
HttpServletRequest request) { HttpServletRequest request) {
try { try {
@ -169,6 +171,7 @@ public class OrderCouponController {
map.put("payTimeE", payTimeE); map.put("payTimeE", payTimeE);
map.put("finishTimeS", finishTimeS); map.put("finishTimeS", finishTimeS);
map.put("finishTimeE", finishTimeE); map.put("finishTimeE", finishTimeE);
map.put("exceptionStatus", exceptionStatus);
List<OrderCouponModel> list = orderServiceExt.getOrderCouponList(map); List<OrderCouponModel> list = orderServiceExt.getOrderCouponList(map);

@ -93,13 +93,7 @@ public class OrderTelChargeCallbackController {
}).start(); }).start();
} }
childOrder.setStatus(101); outRechargeOrderService.completeOrder(rechargeOrder , childOrder);
rechargeOrder.setRechargeStatus(202);
rechargeOrder.setPayStatus(100);
outRechargeOrderService.updateOrder(rechargeOrder);
outRechargeChildOrderService.updateOrder(childOrder);
orderFinish(rechargeOrder);
// api商户订单 // api商户订单
if (rechargeOrder.getPayType() == 6) { if (rechargeOrder.getPayType() == 6) {
@ -156,14 +150,7 @@ public class OrderTelChargeCallbackController {
highUser.getOpenId()); highUser.getOpenId());
}).start(); }).start();
} }
childOrder.setStatus(101); outRechargeOrderService.completeOrder(rechargeOrder , childOrder);
rechargeOrder.setRechargeStatus(202);
rechargeOrder.setPayStatus(100);
rechargeOrder.setFinishTime(new Date());
outRechargeOrderService.updateOrder(rechargeOrder);
outRechargeChildOrderService.updateOrder(childOrder);
orderFinish(rechargeOrder);
// todo 代理商话费回调 // todo 代理商话费回调
// if (rechargeOrder.getPayType() == 6) { // if (rechargeOrder.getPayType() == 6) {
// apiOrderRecord(rechargeOrder); // apiOrderRecord(rechargeOrder);
@ -221,20 +208,6 @@ public class OrderTelChargeCallbackController {
} }
// 订单完成操作
private void orderFinish(OutRechargeOrder rechargeOrder) {
HighOrder highOrder = highOrderService.getOrderByOrderNo(rechargeOrder.getOrderNo());
if (highOrder != null) {
highOrder.setOrderStatus(OrderStatusEnum.type3.getType());
highOrder.setFinishTime(new Date());
for (HighChildOrder highChildOrder : highOrder.getHighChildOrderList()) {
highChildOrder.setChildOrderStatus(OrderChildStatus.STATUS3.getNumber());
highChildOrder.setFinishTime(new Date());
}
orderService.updateOrderData(highOrder);
}
}
private void apiOrderRecord(OutRechargeOrder rechargeOrder) { private void apiOrderRecord(OutRechargeOrder rechargeOrder) {
Map<String, Object> orderMap = new HashMap<>(); Map<String, Object> orderMap = new HashMap<>();

@ -86,18 +86,7 @@ public class MobileRechargeNotifyController {
}).start(); }).start();
} }
childOrder.setStatus(101); outRechargeOrderService.completeOrder(rechargeOrder , childOrder);
rechargeOrder.setRechargeStatus(202);
rechargeOrder.setPayStatus(100);
outRechargeOrderService.updateOrder(rechargeOrder);
outRechargeChildOrderService.updateOrder(childOrder);
orderFinish(rechargeOrder);
// api商户订单
if (rechargeOrder.getPayType() == 6) {
apiOrderRecord(rechargeOrder);
}
} else { } else {
// 充值失败操作 // 充值失败操作
@ -149,17 +138,7 @@ public class MobileRechargeNotifyController {
highUser.getOpenId()); highUser.getOpenId());
}).start(); }).start();
} }
childOrder.setStatus(101); outRechargeOrderService.completeOrder(rechargeOrder , childOrder);
rechargeOrder.setRechargeStatus(202);
rechargeOrder.setPayStatus(100);
rechargeOrder.setFinishTime(new Date());
outRechargeOrderService.updateOrder(rechargeOrder);
outRechargeChildOrderService.updateOrder(childOrder);
orderFinish(rechargeOrder);
if (rechargeOrder.getPayType() == 6) {
apiOrderRecord(rechargeOrder);
}
} else { } else {
callbackResult(childOrder , rechargeOrder); callbackResult(childOrder , rechargeOrder);
} }
@ -234,13 +213,7 @@ public class MobileRechargeNotifyController {
}).start(); }).start();
} }
childOrder.setStatus(101); outRechargeOrderService.completeOrder(rechargeOrder , childOrder);
rechargeOrder.setRechargeStatus(202);
rechargeOrder.setPayStatus(100);
outRechargeOrderService.updateOrder(rechargeOrder);
outRechargeChildOrderService.updateOrder(childOrder);
orderFinish(rechargeOrder);
// api商户订单 // api商户订单
// if (rechargeOrder.getPayType() == 6) { // if (rechargeOrder.getPayType() == 6) {
@ -302,21 +275,6 @@ public class MobileRechargeNotifyController {
} }
// 订单完成操作
private void orderFinish(OutRechargeOrder rechargeOrder) {
HighOrder highOrder = highOrderService.getOrderByOrderNo(rechargeOrder.getOrderNo());
if (highOrder != null) {
highOrder.setOrderStatus(OrderStatusEnum.type3.getType());
highOrder.setFinishTime(new Date());
for (HighChildOrder highChildOrder : highOrder.getHighChildOrderList()) {
highChildOrder.setChildOrderStatus(OrderChildStatus.STATUS3.getNumber());
highChildOrder.setFinishTime(new Date());
}
orderService.updateOrderData(highOrder);
}
}
private void apiOrderRecord(OutRechargeOrder rechargeOrder) { private void apiOrderRecord(OutRechargeOrder rechargeOrder) {
Map<String, Object> orderMap = new HashMap<>(); Map<String, Object> orderMap = new HashMap<>();
orderMap.put("orderId" , rechargeOrder.getId()); orderMap.put("orderId" , rechargeOrder.getId());

@ -1,5 +1,7 @@
package com.web.rocketmq.consumer; package com.web.rocketmq.consumer;
import com.hai.entity.HighDiscountAgentCode;
import com.hai.entity.HighDiscountUserRel;
import com.hai.entity.HighOrder; import com.hai.entity.HighOrder;
import com.hai.entity.HighOrderRefund; import com.hai.entity.HighOrderRefund;
import com.hai.order.service.OrderRefundHandleService; import com.hai.order.service.OrderRefundHandleService;
@ -9,12 +11,15 @@ import com.hai.order.type.OrderChildGoodsType;
import com.hai.order.type.OrderProductType; import com.hai.order.type.OrderProductType;
import com.hai.order.type.OrderStatus; import com.hai.order.type.OrderStatus;
import com.hai.service.BsMsgService; import com.hai.service.BsMsgService;
import com.hai.service.HighDiscountAgentCodeService;
import com.hai.service.HighDiscountUserRelService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener; import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener; import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal;
@Component @Component
@Slf4j @Slf4j
@ -26,15 +31,36 @@ public class OrderRefundSuccessConsumer implements RocketMQListener<HighOrderRef
@Resource @Resource
private OrderRefundService orderRefundService; private OrderRefundService orderRefundService;
@Resource @Resource
private OrderRefundHandleService refundHandleService; private OrderRefundHandleService refundHandleService;
@Resource
private HighDiscountUserRelService discountUserRelService;
@Resource
private HighDiscountAgentCodeService discountAgentCodeService;
@Resource @Resource
private BsMsgService bsMsgService; private BsMsgService bsMsgService;
@Override @Override
public void onMessage(HighOrderRefund orderRefund){ public void onMessage(HighOrderRefund orderRefund) {
// 交易订单
HighOrder order = orderService.getOrderDetailByNo(orderRefund.getOrderNo());
if (order != null && order.getMemDiscountId() != null) {
// 交易订单可退金额为0,才会退还优惠券
if (order.getSurplusRefundIntegral() == 0 && order.getSurplusRefundPrice().compareTo(new BigDecimal("0")) == 0) {
HighDiscountUserRel rel = discountUserRelService.getRelById(order.getMemDiscountId());
if (rel != null) {
rel.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用
rel.setUseTime(null);
discountUserRelService.updateDiscountUserRel(rel);
HighDiscountAgentCode code = discountAgentCodeService.getCodeById(rel.getDiscountAgentCodeId());
code.setStatus(2);
discountAgentCodeService.updateCode(code);
}
}
}
if (orderRefund.getGoodsType().equals(OrderChildGoodsType.TYPE1.getNumber())) { if (orderRefund.getGoodsType().equals(OrderChildGoodsType.TYPE1.getNumber())) {
refundHandleService.couponHandle(orderRefund); refundHandleService.couponHandle(orderRefund);

@ -69,7 +69,6 @@ public class HighRechargeOrderSchedule {
List<OutRechargeChildOrder> childOrderList = rechargeChildOrderService.getListRechargeChildOrder(childOrderMap); List<OutRechargeChildOrder> childOrderList = rechargeChildOrderService.getListRechargeChildOrder(childOrderMap);
System.out.println("话费定时任务 -> 判断是否存在已支付订单:订单id:" + order.getId());
if (childOrderList.size() == 0) { if (childOrderList.size() == 0) {
Date rechargeTime = order.getCreateTimed(); Date rechargeTime = order.getCreateTimed();
Date currentTime = new Date(); Date currentTime = new Date();
@ -77,11 +76,9 @@ public class HighRechargeOrderSchedule {
// 充值时间小于72 // 充值时间小于72
if (hours < 72) { if (hours < 72) {
System.out.println("话费定时任务 -> 请求慢充:订单id:" + order.getId());
outRechargeOrderService.pollRequest(order); outRechargeOrderService.pollRequest(order);
continue; continue;
} }
System.out.println("话费定时任务 -> 退款任务" + order.getId());
outRechargeOrderService.refundOrder(order.getId() , childOrderList.get(0)); outRechargeOrderService.refundOrder(order.getId() , childOrderList.get(0));
} }
@ -139,7 +136,7 @@ public class HighRechargeOrderSchedule {
outRechargeOrderService.refundOrder(outRechargeOrder.getId() , childOrder); outRechargeOrderService.refundOrder(outRechargeOrder.getId() , childOrder);
} else { } else {
// -1取消,0充值中 ,1充值成功,2充值失败,3部分成功 // -1取消,0充值中 ,1充值成功,2充值失败,3部分成功
if (objectData.getInteger("state") == 2) { if (objectData.getInteger("state") == 2 || objectData.getInteger("state") == -1) {
outRechargeOrderService.refundOrder(outRechargeOrder.getId() , childOrder); outRechargeOrderService.refundOrder(outRechargeOrder.getId() , childOrder);
} else if (objectData.getInteger("state") == 1) { } else if (objectData.getInteger("state") == 1) {
outRechargeOrderService.completeOrder(outRechargeOrder , childOrder); outRechargeOrderService.completeOrder(outRechargeOrder , childOrder);
@ -159,8 +156,8 @@ public class HighRechargeOrderSchedule {
JSONObject objectData; JSONObject objectData;
for (Object objects : objectJSONArray) { for (Object objects : objectJSONArray) {
objectData = (JSONObject) objects; objectData = (JSONObject) objects;
// -1取消,0充值中 ,1充值成功,2充值失败,3部分成功 // 充值中1成功2失败3已取消4部分充值5缓存订单
if (objectData.getInteger("status") == 2) { if (objectData.getInteger("status") == 2 || objectData.getInteger("status") == 3) {
outRechargeOrderService.refundOrder(outRechargeOrder.getId() , childOrder); outRechargeOrderService.refundOrder(outRechargeOrder.getId() , childOrder);
} else if (objectData.getInteger("status") == 1) { } else if (objectData.getInteger("status") == 1) {
outRechargeOrderService.completeOrder(outRechargeOrder , childOrder); outRechargeOrderService.completeOrder(outRechargeOrder , childOrder);

@ -217,11 +217,11 @@ public class HuiLianTongUnionCardConfig {
log.info("============请求任务Start============="); log.info("============请求任务Start=============");
log.info("汇联通充值-请求参数: " + JSON.toJSONString(dataMap)); log.info("汇联通退款-请求参数: " + JSON.toJSONString(dataMap));
JSONObject returnObject = request("qtk/refund", dataMap); JSONObject returnObject = request("qtk/refund", dataMap);
log.info("汇联通充值-响应参数: " + returnObject.toJSONString()); log.info("汇联通退款-响应参数: " + returnObject.toJSONString());
log.info("============请求任务End=============="); log.info("============请求任务End==============");
return returnObject; return returnObject;
} }

@ -14,7 +14,7 @@ public interface HighMerchantAccountMapperExt {
@Select({"select " + @Select({"select " +
" case when sum(gas_price_cost) is not null then sum(gas_price_cost) ELSE 0 end " + " case when sum(gas_refuel_price) is not null then sum(gas_refuel_price) ELSE 0 end " +
" from high_gas_order " + " from high_gas_order " +
" where store_id in (SELECT id from high_merchant_store where merchant_id = #{merId}) and `status` in (2,5,6)"}) " where store_id in (SELECT id from high_merchant_store where merchant_id = #{merId}) and `status` in (2,5,6)"})
BigDecimal countMerGasOilAmount(@Param("merId") Long merId); BigDecimal countMerGasOilAmount(@Param("merId") Long merId);

@ -1224,7 +1224,7 @@ public interface HighOrderMapperExt {
List<ApiThirdOrderModel> getApiThirdOrderByList(@Param("map") Map<String,Object> map); List<ApiThirdOrderModel> getApiThirdOrderByList(@Param("map") Map<String,Object> map);
@Select("SELECT * FROM high_order WHERE create_time < NOW()-INTERVAL 3 day and product_type = 9 and order_status = 2 and pay_type = 4;") @Select("SELECT * FROM high_order WHERE create_time < NOW()-INTERVAL 3 day and product_type = 9 and order_status = 2 and pay_type = 4 group by create_time asc;")
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),

@ -60,7 +60,8 @@ public interface OrderMapperExt {
" ELSE '未知' END orderStatus," + " ELSE '未知' END orderStatus," +
" b.create_time createTime," + " b.create_time createTime," +
" b.pay_time payTime," + " b.pay_time payTime," +
" b.finish_time finishTime" + " b.finish_time finishTime," +
" case b.exception_status when 1 then '异常' when 0 then '正常' else '未知' end exceptionStatus" +
" from high_child_order a" + " from high_child_order a" +
" LEFT JOIN high_order b on b.id = a.order_id" + " LEFT JOIN high_order b on b.id = a.order_id" +
" LEFT JOIN high_coupon d on d.id = a.goods_id" + " LEFT JOIN high_coupon d on d.id = a.goods_id" +
@ -80,6 +81,7 @@ public interface OrderMapperExt {
" <if test='param.payTimeE != null'> <![CDATA[ and b.pay_time <= #{param.payTimeE} ]]> </if>" + " <if test='param.payTimeE != null'> <![CDATA[ and b.pay_time <= #{param.payTimeE} ]]> </if>" +
" <if test='param.finishTimeS != null'> <![CDATA[ and b.finish_time >= #{param.finishTimeS} ]]> </if>" + " <if test='param.finishTimeS != null'> <![CDATA[ and b.finish_time >= #{param.finishTimeS} ]]> </if>" +
" <if test='param.finishTimeE != null'> <![CDATA[ and b.finish_time <= #{param.finishTimeE} ]]> </if>" + " <if test='param.finishTimeE != null'> <![CDATA[ and b.finish_time <= #{param.finishTimeE} ]]> </if>" +
" <if test='param.exceptionStatus != null'> and b.exception_status = #{param.exceptionStatus} </if>" +
" ORDER BY b.create_time desc" + " ORDER BY b.create_time desc" +
"</script>"}) "</script>"})
List<OrderCouponModel> queryOrderCoupon(@Param("param") Map<String, Object> param); List<OrderCouponModel> queryOrderCoupon(@Param("param") Map<String, Object> param);

@ -95,4 +95,8 @@ public class OrderCouponModel {
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty(value = "完成时间") @ExcelProperty(value = "完成时间")
private Date finishTime; private Date finishTime;
@ColumnWidth(10)
@ExcelProperty(value = "异常状态")
private String exceptionStatus;
} }

@ -865,7 +865,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
childOrder.setChildOrderNo(OrderUtil.generateChildOrderNo()); childOrder.setChildOrderNo(OrderUtil.generateChildOrderNo());
childOrder.setGoodsType(OrderChildGoodsType.TYPE6.getNumber()); childOrder.setGoodsType(OrderChildGoodsType.TYPE6.getNumber());
childOrder.setGoodsId(goodsId); childOrder.setGoodsId(goodsId);
childOrder.setGoodsName(OperatorEnum.getNameByType(outRechargePrice.getOperatorType()) + "话费充值" + outRechargePrice.getRechargePrice() + "元"); childOrder.setGoodsName(rechargeContent + OperatorEnum.getNameByType(outRechargePrice.getOperatorType()) + "话费充值" + outRechargePrice.getRechargePrice() + "元");
childOrder.setGoodsSpecName(outRechargePrice.getRechargePrice() + "元"); childOrder.setGoodsSpecName(outRechargePrice.getRechargePrice() + "元");
childOrder.setGoodsPrice(outRechargePrice.getRechargePrice()); childOrder.setGoodsPrice(outRechargePrice.getRechargePrice());
childOrder.setGoodsActualPrice(outRechargePrice.getPayPrice()); childOrder.setGoodsActualPrice(outRechargePrice.getPayPrice());

@ -581,7 +581,6 @@ public class OrderServiceImpl implements OrderService {
rocketMQTemplate.syncSend(OrderTopic.ORDER_TOPIC_REFUND_SUCCESS.getTopic(), orderRefund); rocketMQTemplate.syncSend(OrderTopic.ORDER_TOPIC_REFUND_SUCCESS.getTopic(), orderRefund);
} }
return updateOrderData(order); return updateOrderData(order);
} }

@ -17,12 +17,10 @@ import com.hai.dao.HighOrderMapper;
import com.hai.dao.OutRechargeOrderMapper; import com.hai.dao.OutRechargeOrderMapper;
import com.hai.dao.OutRechargeOrderMapperExt; import com.hai.dao.OutRechargeOrderMapperExt;
import com.hai.entity.*; import com.hai.entity.*;
import com.hai.enum_type.DiscountUseScope; import com.hai.enum_type.*;
import com.hai.enum_type.OperatorEnum;
import com.hai.enum_type.OrderPushType;
import com.hai.enum_type.RechargePayType;
import com.hai.model.*; import com.hai.model.*;
import com.hai.order.service.OrderService; import com.hai.order.service.OrderService;
import com.hai.order.type.OrderChildStatus;
import com.hai.order.type.OrderRefundOpUserType; import com.hai.order.type.OrderRefundOpUserType;
import com.hai.service.*; import com.hai.service.*;
import com.hai.service.pay.impl.GoodsOrderServiceImpl; import com.hai.service.pay.impl.GoodsOrderServiceImpl;
@ -1044,6 +1042,17 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
order.setPayStatus(100); order.setPayStatus(100);
order.setFinishTime(new Date()); order.setFinishTime(new Date());
HighOrder highOrder = highOrderService.getOrderByOrderNo(order.getOrderNo());
if (highOrder != null) {
highOrder.setOrderStatus(OrderStatusEnum.type3.getType());
highOrder.setFinishTime(new Date());
for (HighChildOrder highChildOrder : highOrder.getHighChildOrderList()) {
highChildOrder.setChildOrderStatus(OrderChildStatus.STATUS3.getNumber());
highChildOrder.setFinishTime(new Date());
}
orderService.updateOrderData(highOrder);
}
outRechargeOrderService.updateOrder(order); outRechargeOrderService.updateOrder(order);
outRechargeChildOrderService.updateOrder(childOrder); outRechargeChildOrderService.updateOrder(childOrder);
} }

Loading…
Cancel
Save