交班bug修复

This commit is contained in:
谭凯凯
2024-11-06 16:15:01 +08:00
committed by Tankaikai
parent 090e5d320e
commit 920219f978
3 changed files with 10 additions and 1 deletions

View File

@@ -188,6 +188,10 @@ public class TbPlaceController {
List<TbToken> onlineUserList = tbTokenRepository.findListByAccountIdAndStaffId(accountId, staffId);
if (CollUtil.isNotEmpty(onlineUserList)) {
payDTO.setToken(onlineUserList.get(0).getToken());
} else {
payDTO.setShopId(Integer.valueOf(shopId));
payDTO.setStaffId(staffId);
payDTO.setLoginName(userName);
}
return ResponseEntity.ok(tbShopTableService.pay(payDTO));
}

View File

@@ -30,5 +30,7 @@ public class PayDTO {
private List<UserCouponInfoDTO> userCouponInfos = new ArrayList<>();
// 使用的积分抵扣数量
private Integer pointsNum;
private Integer staffId;
private String loginName;
}

View File

@@ -2084,6 +2084,9 @@ public class TbShopTableServiceImpl implements TbShopTableService {
JSONObject jsonObject = new JSONObject();
jsonObject.put("token", payDTO.getToken());
jsonObject.put("shopId", payDTO.getShopId());
jsonObject.put("staffId", payDTO.getStaffId());
jsonObject.put("loginName", payDTO.getLoginName());
jsonObject.put("type", "create");
jsonObject.put("orderId", orderInfo.getId());
rabbitMsgUtils.sendOrderCollectMsg(jsonObject, 3);