This commit is contained in:
moxiangrong
2024-02-23 11:37:07 +08:00
parent 070ff57989
commit 62684f1a2a
4 changed files with 21 additions and 1 deletions

View File

@ -8,6 +8,7 @@
*/
package co.yixiang.yshop.module.order.controller.app.order;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import co.yixiang.yshop.framework.common.pojo.CommonResult;
import co.yixiang.yshop.framework.security.core.annotations.PreAuthenticated;
@ -48,6 +49,7 @@ import java.util.Objects;
import static co.yixiang.yshop.framework.common.exception.util.ServiceExceptionUtil.exception;
import static co.yixiang.yshop.framework.common.pojo.CommonResult.success;
import static co.yixiang.yshop.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
import static co.yixiang.yshop.module.express.enums.ErrorCodeConstants.EXPRESS_CONFIG_NOT_EXISTS;
import static co.yixiang.yshop.module.order.enums.ErrorCodeConstants.PARAM_ERROR;
/**
@ -290,8 +292,8 @@ public class AppOrderController {
@PostMapping("/order/express")
@Operation(summary = "获取物流信息")
public CommonResult<KdniaoApiVO> express(@RequestBody AppExpressParam appExpressParam) {
KdniaoApiBaseDTO kdniaoApiBaseDTO = expressRedisDAO.get();
if(ObjectUtil.isEmpty(kdniaoApiBaseDTO)) throw exception(EXPRESS_CONFIG_NOT_EXISTS);
KdniaoApiDTO params = new KdniaoApiDTO();
params.setLogisticCode(appExpressParam.getLogisticCode());
params.setShipperCode(appExpressParam.getShipperCode());