|
@@ -16,6 +16,7 @@ import com.zanxiang.module.util.bean.BeanUtil;
|
|
|
import com.zanxiang.module.util.exception.BaseException;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.RandomStringUtils;
|
|
|
+import org.apache.logging.log4j.util.Strings;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -90,7 +91,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
|
|
|
private Order transform(UserData userData, String orderNum, ProductPayParam payParam, User user, GameUser gameUser,
|
|
|
Game game, GameUserRole gameUserRole, GamePayWayDTO gamePayWayDTO) {
|
|
|
- return Order.builder()
|
|
|
+ Order order = Order.builder()
|
|
|
.orderId(orderNum)
|
|
|
.cpOrderId(payParam.getOrderId())
|
|
|
.agentId(user.getAgentId())
|
|
@@ -117,6 +118,14 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
.createTime(LocalDateTime.now())
|
|
|
.updateTime(LocalDateTime.now())
|
|
|
.build();
|
|
|
+ //蜀山天下, sdk前端存在bug, cp订单id参数修正
|
|
|
+ if (game.getId() == 29 && !order.getCpOrderId().contains("NZW")) {
|
|
|
+ //ext中记录了正确的cp订单id, 修正订单数据
|
|
|
+ if (Strings.isNotBlank(order.getExt()) && order.getExt().contains("NZW")) {
|
|
|
+ order.setCpOrderId(order.getExt());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return order;
|
|
|
}
|
|
|
|
|
|
@Override
|