Files
smartDriveEE/src/main/java/com/rj/service/ILbGoodsService.java
2026-06-02 19:16:10 +08:00

59 lines
2.2 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.rj.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.rj.entity.LbGoods;
import java.util.Map;
public interface ILbGoodsService extends IService<LbGoods> {
Map<String, Object> add(LbGoods entity);
Map<String, Object> update(LbGoods entity);
Map<String, Object> deleteById(Long id);
Map<String, Object> pageQuery(
Integer current,
Integer size,
String tenantId,
Long oldId,
Long userId,
String title,
Long sellerId,
Integer isShow,
Integer status,
Integer currentPage,
String createdAtStart,
String createdAtEnd,
String updatedAtStart,
String updatedAtEnd);
/**
* 分页调用第三方 {@code /api/order/goods},解析后 upsert 到 {@code lb_goods}。
*
* @param token 可选;非空时作为请求头 token否则使用 {@code hxr.admin.goods-api-token}
*/
Map<String, Object> syncFromHxrGoods(String tenantId, String token);
/**
* 分页拉取第三方 {@code /api/order/goods},仅组装为内存对象列表,不写入 {@code lb_goods}。
*
* @param token 可选;非空时作为请求头 token否则使用集成配置中的 goodsApiToken
*/
Map<String, Object> fetchGoodsFromHxrInMemory(String tenantId, String token);
/**
* 选取金额大于29000且24小时内更新的 {@code lb_goods},调用 hxrd {@code /api/order/buy} 抢购;
* 成功笔数达到 {@code maxBuyCount} 后停止,且循环抢购总次数不超过 {@code maxBuyCount} 的5倍。
*
* @param token 可选;非空时作为请求头 token否则使用 {@code lb_third_integration_config} 中的 goodsApiToken
* @param rushBuyAccountLabel 可选;批量账号抢单时传入,用于日志标识当前抢单账号
*/
default Map<String, Object> rushBuy(String tenantId, String token, Integer maxBuyCount) {
return rushBuy(tenantId, token, maxBuyCount, null);
}
Map<String, Object> rushBuy(String tenantId, String token, Integer maxBuyCount, String rushBuyAccountLabel);
}