|
|
@@ -17,16 +17,15 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.validation.Valid;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
import static com.yc.ship.framework.common.exception.util.ServiceExceptionUtil.exception0;
|
|
|
import static com.yc.ship.framework.operatelog.core.enums.OperateTypeEnum.TRADE;
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * @Description :ota标准服务controller
|
|
|
- * @Author :qsl
|
|
|
- * @Date :2025/6/17 20:52
|
|
|
+ * @Description :ota标准服务controller
|
|
|
+ * @Author :qsl
|
|
|
+ * @Date :2025/6/17 20:52
|
|
|
*/
|
|
|
@Tag(name = "ota标准服务")
|
|
|
@RestController
|
|
|
@@ -65,7 +64,7 @@ public class OtaRelationController {
|
|
|
public String xieCheng(
|
|
|
@PathVariable("tenantId") Long tenantId, @PathVariable("path") String path,
|
|
|
HttpServletRequest request, @RequestBody String body) {
|
|
|
- log.info("携程-请求:tenantId" + tenantId + ";path=" + ";body=" + body);
|
|
|
+ log.info("携程-请求:tenantId{};path=;body={}", tenantId, body);
|
|
|
return xieChengService.doRequest(tenantId, path, body, request);
|
|
|
}
|
|
|
|
|
|
@@ -81,9 +80,8 @@ public class OtaRelationController {
|
|
|
@Operation(summary ="美团-请求")
|
|
|
@OperateLog(type = TRADE)
|
|
|
public String meiTuan(@PathVariable("tenantId") Long tenantId, @PathVariable("path") String path, HttpServletRequest request, @RequestBody String jsonStr) {
|
|
|
- log.error("[meiTuan]开始请求jsonStr:" + jsonStr);
|
|
|
- String result = meiTuanService.doRequest(request, path, jsonStr, tenantId);
|
|
|
- return result;
|
|
|
+ log.error("[meiTuan]开始请求jsonStr:{}", jsonStr);
|
|
|
+ return meiTuanService.doRequest(request, path, jsonStr, tenantId);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -95,7 +93,7 @@ public class OtaRelationController {
|
|
|
* @return java.lang.String
|
|
|
* @description 同程-请求
|
|
|
*
|
|
|
- * @date 2021/12/7 09:00
|
|
|
+ * @date 2025/12/7 09:00
|
|
|
*/
|
|
|
@PostMapping(value = "/tongCheng/{tenantId}/{path}", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
@Operation(summary ="同程-请求")
|
|
|
@@ -103,7 +101,7 @@ public class OtaRelationController {
|
|
|
public String tongCheng(
|
|
|
@PathVariable("tenantId") Long tenantId, @PathVariable("path") String path,
|
|
|
HttpServletRequest request, @RequestBody String body) {
|
|
|
- log.info("同程-请求:tenantId " + tenantId + ";body=" + body);
|
|
|
+ log.info("同程-请求:tenantId {};body={}", tenantId, body);
|
|
|
return tongChengService.doRequest(tenantId, path, request, body);
|
|
|
}
|
|
|
|
|
|
@@ -120,7 +118,7 @@ public class OtaRelationController {
|
|
|
@Operation(summary ="抖音三方码-请求")
|
|
|
@OperateLog(type = TRADE)
|
|
|
public String tiktok(@PathVariable("tenantId") Long tenantId, @PathVariable("path") String path, HttpServletRequest request, @RequestBody String body) {
|
|
|
- log.info("抖音三方码-请求:tenantId "+ tenantId + ";body=" + body);
|
|
|
+ log.info("抖音三方码-请求:tenantId {};body={}", tenantId, body);
|
|
|
return tiktokLifeService.doRequest(tenantId, path, request, body, "");
|
|
|
}
|
|
|
|
|
|
@@ -136,7 +134,7 @@ public class OtaRelationController {
|
|
|
@Operation(summary ="抖音三方码(抖音来客版本)-请求")
|
|
|
@OperateLog(type = TRADE)
|
|
|
public String tiktokLife(@PathVariable("tenantId") Long tenantId, @PathVariable("path") String path, HttpServletRequest request, @RequestBody String body) {
|
|
|
- log.info("抖音三方码(抖音来客版本)-请求:tenantId "+ tenantId + ";body=" + body);
|
|
|
+ log.info("抖音三方码(抖音来客版本)-请求:tenantId {};body={}", tenantId, body);
|
|
|
return tiktokLifeService.doRequest(tenantId, path, request, body, "life");
|
|
|
}
|
|
|
|
|
|
@@ -144,7 +142,7 @@ public class OtaRelationController {
|
|
|
@Operation(summary ="抖音日历票(抖音来客版本)-请求")
|
|
|
@OperateLog(type = TRADE)
|
|
|
public String tiktokCalendar(@PathVariable("tenantId") Long tenantId, @PathVariable("path") String path, HttpServletRequest request, @RequestBody String body) {
|
|
|
- log.info("抖音日历票(抖音来客版本)-请求:tenantId "+ tenantId + ";body=" + body);
|
|
|
+ log.info("抖音日历票(抖音来客版本)-请求:tenantId {};body={}", tenantId, body);
|
|
|
String result = tiktokCalendarService.doRequestTiktokCalendar(tenantId, path, request, body);
|
|
|
log.info("抖音日历票(抖音来客版本)-返回:{}",result);
|
|
|
return result;
|
|
|
@@ -157,7 +155,7 @@ public class OtaRelationController {
|
|
|
@OperateLog(type = TRADE)
|
|
|
@ResponseBody
|
|
|
public String doRequest(HttpServletRequest request, @PathVariable("tenementId") Long tenantId, @PathVariable("method") String method, @RequestBody String jsonStr) {
|
|
|
- log.info("OTA统一分销接口:tenementId " + tenantId + ";method=" + method + ";body=" + jsonStr);
|
|
|
+ log.info("OTA统一分销接口:tenementId {};method={};body={}", tenantId, method, jsonStr);
|
|
|
return zshlService.doRequest(request,tenantId,method, jsonStr);
|
|
|
}
|
|
|
|
|
|
@@ -183,7 +181,6 @@ public class OtaRelationController {
|
|
|
@ResponseBody
|
|
|
public CommonResult<?> notify1(@RequestBody String jsonStr){
|
|
|
try{
|
|
|
- Map param = JSONUtil.toBean(jsonStr, Map.class);
|
|
|
return CommonResult.success(true);
|
|
|
}catch (Exception e){
|
|
|
log.error("手动推送核销通知失败,",e);
|