SalesDetailController.java 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. package com.emato.biz.controller.mall;
  2. import com.alibaba.fastjson.JSONObject;
  3. import com.emato.biz.domain.mall.NewSystemFormatEntiy;
  4. import com.emato.biz.service.mall.ISalesDetaiServicel;
  5. import com.emato.common.annotation.AnonymousAccess;
  6. import com.emato.common.core.Result;
  7. import com.emato.common.core.ResultNew;
  8. import org.apache.http.Header;
  9. import org.apache.http.HttpRequest;
  10. import org.slf4j.Logger;
  11. import org.slf4j.LoggerFactory;
  12. import org.springframework.beans.factory.annotation.Autowired;
  13. import org.springframework.web.bind.annotation.PostMapping;
  14. import org.springframework.web.bind.annotation.RequestBody;
  15. import org.springframework.web.bind.annotation.RequestMapping;
  16. import org.springframework.web.bind.annotation.RestController;
  17. import javax.servlet.http.HttpServletRequest;
  18. /**
  19. * 接收Kmall推送到eccs的销售明细数据
  20. * 接收外部商户系统请求所需要的销售明细数据
  21. *
  22. * @author Scott Chen
  23. * @since 1.0.0
  24. * @date 2023-03-21
  25. */
  26. @RestController
  27. public class SalesDetailController {
  28. private static final Logger logger = LoggerFactory.getLogger(SalesDetailController.class);
  29. @Autowired
  30. private ISalesDetaiServicel salesDetaiServicel;
  31. /**
  32. * 接收kmall向eccs系统推送的销售明细数据
  33. * @param newSystemFormatEntiy
  34. * @return
  35. */
  36. @AnonymousAccess
  37. @PostMapping("/salesdetail/eccspushsales")
  38. public ResultNew pushSalesDetailServicel(@RequestBody NewSystemFormatEntiy newSystemFormatEntiy)
  39. {
  40. logger.debug("---------- 接收销售明细推送::开始 ----------");
  41. return ResultNew.success(salesDetaiServicel.pushSalesDetaiServicel(newSystemFormatEntiy));
  42. }
  43. /**
  44. * 商户外部系统查询其所要同步的订单销售数据
  45. * @param msg
  46. * @return
  47. */
  48. @AnonymousAccess
  49. @PostMapping("/salesdetail/getsalesdet")
  50. public Result getSalesDetaiData(@RequestBody JSONObject msg, HttpServletRequest httpRequest)
  51. {
  52. logger.debug("---------- 接收商户获取销售明细请求::开始 ----------");
  53. return salesDetaiServicel.getSalesDetaiData(msg,httpRequest);
  54. }
  55. }