货物包预测查询去掉默认的租户ID
This commit is contained in:
@@ -63,6 +63,7 @@ public class MybatisPlusConfig {
|
||||
ignoreTables.add("lb_third_integration_config"); // 每租户一条,按 tenant_id 显式查询,不走插件自动拼接
|
||||
ignoreTables.add("lb_buy_account"); // 抢单账号跨租户管理;分页/批量抢单按记录 tenant_id 业务处理
|
||||
ignoreTables.add("lb_buy_account_history"); // 抢单历史跨租户查询;按记录 tenant_id 业务过滤
|
||||
ignoreTables.add("lb_goods"); // 货品跨租户管理;分页/抢单按页面或业务传入的 tenant_id 显式过滤
|
||||
|
||||
return new TenantLineHandler() {
|
||||
|
||||
|
||||
@@ -50,10 +50,8 @@ public interface ILbGoodsService extends IService<LbGoods> {
|
||||
* 成功笔数达到 {@code maxBuyCount} 后停止,且循环抢购总次数不超过 {@code maxBuyCount} 的5倍。
|
||||
*
|
||||
* @param token 可选;非空时作为请求头 token,否则使用 {@code lb_third_integration_config} 中的 goodsApiToken
|
||||
* @param rushBuyAccountLabel 批量账号抢单时传入,用于日志标识当前抢单账号
|
||||
* @param tokenRefreshContext 非空且 token 失效时,按账号凭证自动登录并刷新 {@code lb_buy_account.token_front}
|
||||
* @param goodsCoordinator 批量抢单时传入,保证同租户同货品 ID 仅一个账号抢购
|
||||
* @param accountId 批量抢单时当前账号主键,与 {@code goodsCoordinator} 配合使用
|
||||
*
|
||||
* @param token 失效时,按账号凭证自动登录并刷新 {@code lb_buy_account.token_front}
|
||||
*/
|
||||
default Map<String, Object> rushBuy(String tenantId, String token, Integer maxBuyCount) {
|
||||
return rushBuy(tenantId, token, maxBuyCount, null, null, null, null);
|
||||
|
||||
@@ -153,12 +153,12 @@ public class LbBuyAccountServiceImpl
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<LbBuyAccount> queryWrapper = new LambdaQueryWrapper<>();
|
||||
// if (tenantId != null && !tenantId.trim().isEmpty()) {
|
||||
// queryWrapper.eq(LbBuyAccount::getTenantId, tenantId.trim());
|
||||
// }
|
||||
// if (tenantName != null && !tenantName.trim().isEmpty()) {
|
||||
// queryWrapper.like(LbBuyAccount::getTenantName, tenantName.trim());
|
||||
// }
|
||||
if (tenantId != null && !tenantId.trim().isEmpty()) {
|
||||
queryWrapper.eq(LbBuyAccount::getTenantId, tenantId.trim());
|
||||
}
|
||||
if (tenantName != null && !tenantName.trim().isEmpty()) {
|
||||
queryWrapper.like(LbBuyAccount::getTenantName, tenantName.trim());
|
||||
}
|
||||
if (loginAccount != null && !loginAccount.trim().isEmpty()) {
|
||||
queryWrapper.like(LbBuyAccount::getLoginAccount, loginAccount.trim());
|
||||
}
|
||||
|
||||
@@ -843,6 +843,7 @@ public class LbGoodsServiceImpl extends ServiceImpl<LbGoodsMapper, LbGoods> impl
|
||||
private List<LbGoods> loadRushBuyGoodsList(String tid, String accountTag) {
|
||||
LocalDateTime updatedAfter = resolveRushBuyUpdatedAfter();
|
||||
LambdaQueryWrapper<LbGoods> w = new LambdaQueryWrapper<>();
|
||||
w.eq(LbGoods::getTenantId, tid);
|
||||
w.isNotNull(LbGoods::getSellerId);
|
||||
w.gt(LbGoods::getTotalMoney, RUSH_BUY_MIN_TOTAL_MONEY);
|
||||
w.le(LbGoods::getTotalMoney, RUSH_BUY_MAX_TOTAL_MONEY);
|
||||
|
||||
Reference in New Issue
Block a user