DataServiceOrderInfoService.java 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. package com.zswl.dataservicestarter.service;
  2. import com.zswl.dataservicestarter.dao.DataServiceOrderInfoDao;
  3. import com.zswl.dataservicestarter.domain.DataServiceOrderInfo;
  4. import com.zswl.dataservicestarter.utils.result.ResultContent;
  5. import org.apache.commons.lang3.ObjectUtils;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.stereotype.Service;
  8. /**
  9. * 订单信息 管理
  10. *
  11. * @author TRX
  12. * @date 2024/3/25
  13. */
  14. @Service
  15. public class DataServiceOrderInfoService {
  16. @Autowired
  17. DataServiceOrderInfoDao orderInfoDao;
  18. /**
  19. * 更加HashCode验证支付信息是否存在
  20. *
  21. * @param hashCode
  22. * @return
  23. */
  24. public ResultContent validateDataByHashCode(int hashCode) {
  25. DataServiceOrderInfo orderInfo = orderInfoDao.findTopByHashCode(hashCode);
  26. if (ObjectUtils.isEmpty(orderInfo)) {
  27. return ResultContent.buildFail("对应数据未找到");
  28. }
  29. return ResultContent.buildSuccess();
  30. }
  31. /**
  32. * 更加dataId验证支付信息是否存在
  33. *
  34. * @param dataId
  35. * @return
  36. */
  37. public ResultContent validateDataByDataId(String dataId) {
  38. DataServiceOrderInfo orderInfo = orderInfoDao.findTopByDataId(dataId);
  39. if (ObjectUtils.isEmpty(orderInfo)) {
  40. return ResultContent.buildFail("对应数据未找到");
  41. }
  42. return ResultContent.buildSuccess();
  43. }
  44. /**
  45. * 编辑信息是否同步到平台
  46. *
  47. * @param dataId
  48. * @return
  49. */
  50. public ResultContent markSyncPlatform(String dataId) {
  51. int a = 100;
  52. return ResultContent.buildSuccess();
  53. }
  54. }