| | |
| | | import com.xiaopeng.common.log.enums.AdminOperationType; |
| | | import com.xiaopeng.common.redis.service.RedisService; |
| | | import com.xiaopeng.common.security.service.TokenService; |
| | | import com.xiaopeng.order.config.BluetoothDebugConfig; |
| | | import com.xiaopeng.order.dto.OrderNavigationDto; |
| | | import com.xiaopeng.api.model.order.OrderTrajectory; |
| | | import com.xiaopeng.order.model.dto.XpOrderCommentDto; |
| | |
| | | |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | @Autowired |
| | | private BluetoothDebugConfig bluetoothDebugConfig; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @GetMapping("/api/v1/mini-program/bluetooth/getUnlocktToken/{orderId}") |
| | | @XpClientCheck(checkToken = false, checkOtpToken = true) |
| | | public R<BluetoothTokenVo> getBluetoothToken(@PathVariable("orderId") Long orderId, HttpServletRequest request) { |
| | | |
| | | // ========== 联调临时逻辑:通过 Nacos 配置返回固定蓝牙信息(bluetooth-debug.enabled=true 时生效) ========== |
| | | if (bluetoothDebugConfig.isEnabled()) { |
| | | BluetoothTokenVo vo = new BluetoothTokenVo(); |
| | | vo.setToken(bluetoothDebugConfig.getToken()); |
| | | vo.setMacAddress(bluetoothDebugConfig.getMacAddress()); |
| | | vo.setSlaveMacList(bluetoothDebugConfig.getSlaveMacList()); |
| | | return R.ok(vo); |
| | | } |
| | | // ========== 联调临时逻辑结束 ========== |
| | | |
| | | // 原逻辑 |
| | | String uid = request.getHeader("XP-Uid"); |
| | | XpOrder xpOrder = xpOrderService.getById(orderId); |
| | | if (!Objects.equals(xpOrder.getAppUserId(), Long.valueOf(uid))) { |