Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
张松 2024-11-06 16:20:45 +08:00
commit dc6e739f25
3 changed files with 10 additions and 1 deletions

View File

@ -178,7 +178,7 @@ public class TbPlaceController {
TbPlussShopStaff shopStaff;
if (userName.contains("@")) {
shopStaff = staffRepository.queryMasterAccount(shopId);
}else {
} else {
shopStaff = staffRepository.queryByAccount(userName, shopId);
}
TbMerchantAccount merchantAccount = tbMerchantAccountMapper.selectOne(Wrappers.<TbMerchantAccount>lambdaQuery()
@ -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

@ -2082,6 +2082,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);