|
|
@@ -117,9 +117,10 @@ public class WashOrderServiceImpl extends MyBaseServiceImpl<WashOrderMapper, Was
|
|
|
// 本次开机最大消费金额
|
|
|
account.getBalance());
|
|
|
// 首次消费:无归属站点的用户自动归属到当前设备所在站点
|
|
|
- var userStationId = StpUtil.getSession().getString("stationId");
|
|
|
+ long userId = StpUtil.getLoginIdAsLong();
|
|
|
+ var user = userService.getById(userId);
|
|
|
+ var userStationId = user != null ? user.getStationId() : null;
|
|
|
if (CommUtil.isEmptyOrNull(userStationId)) {
|
|
|
- long userId = StpUtil.getLoginIdAsLong();
|
|
|
userService.lambdaUpdate()
|
|
|
.set(User::getStationId, params.getStationId())
|
|
|
.eq(User::getId, userId)
|