package com.emato.biz.controller.mall; import com.alibaba.fastjson.JSONObject; import com.emato.biz.domain.mall.NewSystemFormatEntiy; import com.emato.biz.service.mall.ISalesDetaiServicel; import com.emato.common.annotation.AnonymousAccess; import com.emato.common.core.Result; import com.emato.common.core.ResultNew; import org.apache.http.Header; import org.apache.http.HttpRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; /** * 接收Kmall推送到eccs的销售明细数据 * 接收外部商户系统请求所需要的销售明细数据 * * @author Scott Chen * @since 1.0.0 * @date 2023-03-21 */ @RestController public class SalesDetailController { private static final Logger logger = LoggerFactory.getLogger(SalesDetailController.class); @Autowired private ISalesDetaiServicel salesDetaiServicel; /** * 接收kmall向eccs系统推送的销售明细数据 * @param newSystemFormatEntiy * @return */ @AnonymousAccess @PostMapping("/salesdetail/eccspushsales") public ResultNew pushSalesDetailServicel(@RequestBody NewSystemFormatEntiy newSystemFormatEntiy) { logger.debug("---------- 接收销售明细推送::开始 ----------"); return ResultNew.success(salesDetaiServicel.pushSalesDetaiServicel(newSystemFormatEntiy)); } /** * 商户外部系统查询其所要同步的订单销售数据 * @param msg * @return */ @AnonymousAccess @PostMapping("/salesdetail/getsalesdet") public Result getSalesDetaiData(@RequestBody JSONObject msg, HttpServletRequest httpRequest) { logger.debug("---------- 接收商户获取销售明细请求::开始 ----------"); return salesDetaiServicel.getSalesDetaiData(msg,httpRequest); } }