You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.9 KiB

5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
  1. package com.gaotao.modules.automatedWarehouse.mapper;
  2. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  3. import com.gaotao.modules.automatedWarehouse.entity.WcsCallbackPalletScan;
  4. import org.apache.ibatis.annotations.Mapper;
  5. import org.apache.ibatis.annotations.Param;
  6. import java.util.List;
  7. /**
  8. * @Description WCS回调栈板扫描Mapper - rqrq
  9. * @Author rqrq
  10. * @Date 2025/10/07
  11. */
  12. @Mapper
  13. public interface WcsCallbackPalletScanMapper extends BaseMapper<WcsCallbackPalletScan> {
  14. /**
  15. * @Description 获取待处理的回调记录 - rqrq
  16. * @param site 工厂编码
  17. * @param maxRetryCount 最大重试次数
  18. * @return List<WcsCallbackPalletScan>
  19. * @author rqrq
  20. * @date 2025/10/07
  21. */
  22. List<WcsCallbackPalletScan> getPendingCallbacks(@Param("site") String site, @Param("maxRetryCount") int maxRetryCount);
  23. // List<WcsCallbackPalletScan> getPendingCallbacksForAutoSort(@Param("site") String site, @Param("maxRetryCount") int maxRetryCount);
  24. /**
  25. * @Description 更新处理状态 - rqrq
  26. * @param id 记录ID
  27. * @param processStatus 处理状态
  28. * @param errorMsg 错误信息
  29. * @author rqrq
  30. * @date 2025/10/07
  31. */
  32. void updateProcessStatus(@Param("id") Long id, @Param("processStatus") String processStatus, @Param("errorMsg") String errorMsg);
  33. /**
  34. * @Description 使用乐观锁更新处理状态防止重复处理- rqrq
  35. * @param id 记录ID
  36. * @param oldStatus 原状态
  37. * @param newStatus 新状态
  38. * @return 更新的行数0表示更新失败
  39. * @author rqrq
  40. * @date 2025/10/30
  41. */
  42. int updateProcessStatusWithLock(@Param("id") Long id, @Param("oldStatus") String oldStatus, @Param("newStatus") String newStatus);
  43. /**
  44. * @Description 增加重试次数 - rqrq
  45. * @param id 记录ID
  46. * @author rqrq
  47. * @date 2025/10/07
  48. */
  49. void incrementRetryCount(@Param("id") Long id);
  50. }