提交 4df86092 authored 作者: 刘海泉's avatar 刘海泉

增加数媒宝和马上来供应链sdk对接的接口逻辑

上级 c79f642b
package com.clx.performance.controller;
import com.clx.performance.param.pc.DealExceptionReportParam;
import com.clx.performance.service.OrderChildExceptionReportService;
import com.msl.common.result.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping(value="/pc/carrier/exceptionReport")
@Validated
@Tag(name = "承运端-异常上报")
@AllArgsConstructor
public class OrderChildExceptionReportController {
private final OrderChildExceptionReportService orderChildExceptionReportService;
@Deprecated
@Operation(summary = "异常上报处理", description = "<br>By:刘海泉")
public Result<?> updateDealExceptionReport(@RequestBody @Validated DealExceptionReportParam param) {
orderChildExceptionReportService.updateDealExceptionReport(param);
return Result.ok();
}
}
package com.clx.performance.controller.feign;
import com.alibaba.fastjson.JSON;
import com.clx.open.sdk.request.action.*;
import com.clx.open.sdk.request.dto.BatchOrderStatisticsDTO;
import com.clx.open.sdk.request.dto.BatchOrderStatisticsInfoDTO;
......@@ -146,17 +147,22 @@ public class PerformanceSdkFeignController {
//数媒宝同步异常上报信息
@PostMapping("clx-performance/feign/sdk/smbSyncExceptionReportInfo")
Result<String> smbSyncExceptionReportInfo(@RequestBody @Validated SmbSyncExceptionReportInfoAction action){
return orderChildExceptionReportService.smbSyncExceptionReportInfo(action);
log.info("数媒宝同步异常上报信息开始,请求参数:{}", JSON.toJSONString(action));
Result<String> result = orderChildExceptionReportService.smbSyncExceptionReportInfo(action);
log.info("数媒宝同步异常上报信息结束,响应结果:{}", result);
return result;
}
//数媒宝同步异常上报结果
@PostMapping("clx-performance/feign/sdk/smbSyncExceptionReportResult")
Result<Object> smbSyncExceptionReportResult(@RequestBody @Validated SmbSyncExceptionReportResultAction action){
log.info("数媒宝同步异常上报结果开始,请求参数:{}", JSON.toJSONString(action));
return orderChildExceptionReportService.smbSyncExceptionReportResult(action);
}
//数媒宝撤销异常上报
@PostMapping("clx-performance/feign/sdk/smbWithdrawExceptionReport")
Result<Object> smbWithdrawExceptionReport(@RequestBody @Validated SmbWithdrawExceptionReportAction action){
log.info("数媒宝撤销异常上报开始,请求参数:{}", JSON.toJSONString(action));
return orderChildExceptionReportService.smbWithdrawExceptionReport(action);
}
......@@ -165,18 +171,24 @@ public class PerformanceSdkFeignController {
//马上来供应链同步异常上报信息
@PostMapping("clx-performance/feign/sdk/mslSyncExceptionReportInfo")
Result<String> mslSyncExceptionReportInfo(@RequestBody @Validated MslSyncExceptionReportInfoAction action){
return orderChildExceptionReportService.mslSyncExceptionReportInfo(action);
log.info("马上来供应链同步异常上报信息开始,请求参数:{}", JSON.toJSONString(action));
Result<String> result = orderChildExceptionReportService.mslSyncExceptionReportInfo(action);
log.info("马上来供应链同步异常上报信息结束,响应结果:{}", result);
return result;
}
//马上来供应链同步异常上报结果
@PostMapping("clx-performance/feign/sdk/mslSyncExceptionReportResult")
Result<Object> mslSyncExceptionReportResult(@RequestBody @Validated MslSyncExceptionReportResultAction action){
log.info("马上来供应链同步异常上报结果开始,请求参数:{}", JSON.toJSONString(action));
return orderChildExceptionReportService.mslSyncExceptionReportResult(action);
}
//马上来供应链撤销异常上报
@PostMapping("clx-performance/feign/sdk/mslWithdrawExceptionReport")
Result<Object> mslWithdrawExceptionReport(@RequestBody @Validated MslWithdrawExceptionReportAction action){
log.info("马上来供应链撤销异常上报开始,请求参数:{}", JSON.toJSONString(action));
return orderChildExceptionReportService.mslWithdrawExceptionReport(action);
}
......
......@@ -10,4 +10,5 @@ import com.clx.performance.model.OrderChildExceptionReport;
* Time 10:38
*/
public interface OrderChildExceptionReportDao extends BaseDao<OrderChildExceptionReportMapper, OrderChildExceptionReport, Integer> {
OrderChildExceptionReport findByThirdReportNoAndSource(Integer source, String thirdReportNo);
}
package com.clx.performance.dao.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.msl.common.dao.impl.BaseDaoImpl;
import com.clx.performance.dao.OrderChildExceptionReportDao;
import com.clx.performance.mapper.OrderChildExceptionReportMapper;
......@@ -13,4 +14,11 @@ import org.springframework.stereotype.Repository;
*/
@Repository
public class OrderChildExceptionReportDaoImpl extends BaseDaoImpl<OrderChildExceptionReportMapper, OrderChildExceptionReport, Integer> implements OrderChildExceptionReportDao {
@Override
public OrderChildExceptionReport findByThirdReportNoAndSource(Integer source, String thirdReportNo) {
LambdaQueryWrapper<OrderChildExceptionReport> query = new LambdaQueryWrapper<>();
query.eq(OrderChildExceptionReport :: getSource,source);
query.eq(OrderChildExceptionReport ::getThirdReportNo,thirdReportNo);
return baseMapper.selectOne(query);
}
}
......@@ -78,7 +78,7 @@ public class OrderChildExceptionReport implements HasKey<Integer> {
@TableField("deal_time")
@Schema(description="处理时间")
private String dealTime;
private LocalDateTime dealTime;
@TableField("deal_result")
@Schema(description="处理结果")
......
package com.clx.performance.service;
import com.clx.open.sdk.request.action.*;
import com.clx.performance.param.pc.DealExceptionReportParam;
import com.msl.common.result.Result;
/**
......@@ -20,4 +21,6 @@ public interface OrderChildExceptionReportService {
Result<Object> mslSyncExceptionReportResult(MslSyncExceptionReportResultAction action);
Result<Object> mslWithdrawExceptionReport(MslWithdrawExceptionReportAction action);
void updateDealExceptionReport(DealExceptionReportParam param);
}
......@@ -6,7 +6,7 @@ import lombok.Getter;
import java.util.Arrays;
import java.util.Optional;
public enum ExceptionReportEnum {
public enum CarrierExceptionReportEnum {
;
@Getter
......
package com.clx.performance.param.pc;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* @ClassName DealExceptionReportParam
* @Description
* @Author kavin
* @Date 2024/10/22 20:07
* @Version 1.0
*/
@Getter
@Setter
public class DealExceptionReportParam {
@NotNull(message = "异常上报ID不能为空")
@Schema(description="异常上报ID")
private Integer id;
@NotNull(message = "处理方式不能为空")
@Schema(description="处理方式 1:同意扣罚 2:申诉" ,example = "枚举 ExceptionReportEnum.DealWay ")
private Integer dealWay;
@Schema(description="申诉原因")
private String appealReason;
@Schema(description="图片")
private List<String> pictureUrl;
@Schema(description="视频")
private List<String> videoUrl;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论