|
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.zanxiang.game.module.base.pojo.dto.H5GameConfigDTO;
|
|
|
import com.zanxiang.game.module.base.pojo.enums.HttpStatusEnum;
|
|
|
+import com.zanxiang.game.module.base.pojo.enums.PayDeviceEnum;
|
|
|
+import com.zanxiang.game.module.base.pojo.enums.PayWayEnum;
|
|
|
import com.zanxiang.game.module.mybatis.entity.Game;
|
|
|
import com.zanxiang.game.module.mybatis.entity.GameApplet;
|
|
|
import com.zanxiang.game.module.mybatis.entity.GameExt;
|
|
@@ -110,10 +112,12 @@ public class GameAppletServiceImpl extends ServiceImpl<GameAppletMapper, GameApp
|
|
|
UserDTO userDTO = userService.getUserByOpenId(gameAppletDTO.getGameId(), appletMsgDTO.getFromUserName());
|
|
|
//客服支付
|
|
|
if (Objects.equals(appletMsgDTO.getMsgType(), "text") && Objects.equals(appletMsgDTO.getContent(), "2")) {
|
|
|
- //查询用户最新订单
|
|
|
+ //查询用户最新客服支付订单
|
|
|
Order order = orderService.getOne(new LambdaQueryWrapper<Order>()
|
|
|
.eq(Order::getUserId, userDTO.getId())
|
|
|
.eq(Order::getStatus, OrderStateEnum.READY_PAY.getCode())
|
|
|
+ .eq(Order::getPayWayId, PayWayEnum.WX_PAY.getPayWayId())
|
|
|
+ .eq(Order::getPayDeviceId, PayDeviceEnum.CUSTOM_PAY.getPayDeviceId())
|
|
|
.orderByDesc(Order::getCreateTime)
|
|
|
.last("limit 1"));
|
|
|
if (order != null) {
|
|
@@ -121,14 +125,15 @@ public class GameAppletServiceImpl extends ServiceImpl<GameAppletMapper, GameApp
|
|
|
return this.sendCustomMessage(gameAppletDTO, userDTO.getOpenId(), order);
|
|
|
}
|
|
|
}
|
|
|
- //非客服支付, 回复通用消息
|
|
|
- GameExt gameExt = gameExtService.getByGameId(userDTO.getGameId());
|
|
|
- String text = "尊敬的玩家您好,请您用QQ添加:" + gameExt.getCustomerQq()
|
|
|
- + ",联系官方客服哦,客服目前排队比较多,请您耐心等待,请您备注好区服角色,方便客服第一时间为您处理问题";
|
|
|
- //客服消息参数构造
|
|
|
- Map<String, Object> textMap = new HashMap<>(1);
|
|
|
- textMap.put("content", text);
|
|
|
- return this.sendCustomMessageApi(gameAppletDTO, userDTO.getOpenId(), "text", textMap);
|
|
|
+ return result;
|
|
|
+// //非客服支付, 回复通用消息
|
|
|
+// GameExt gameExt = gameExtService.getByGameId(userDTO.getGameId());
|
|
|
+// String text = "尊敬的玩家您好,请您用QQ添加:" + gameExt.getCustomerQq()
|
|
|
+// + ",联系官方客服哦,客服目前排队比较多,请您耐心等待,请您备注好区服角色,方便客服第一时间为您处理问题";
|
|
|
+// //客服消息参数构造
|
|
|
+// Map<String, Object> textMap = new HashMap<>(1);
|
|
|
+// textMap.put("content", text);
|
|
|
+// return this.sendCustomMessageApi(gameAppletDTO, userDTO.getOpenId(), "text", textMap);
|
|
|
}
|
|
|
|
|
|
private String sendCustomMessage(GameAppletDTO gameAppletDTO, String openId, Order order) {
|