diff --git a/yshop-app/src/main/java/co/yixiang/sales/rest/StoreAfterSalesController.java b/yshop-app/src/main/java/co/yixiang/sales/rest/StoreAfterSalesController.java index 2c5bafb6..dae7d9cf 100644 --- a/yshop-app/src/main/java/co/yixiang/sales/rest/StoreAfterSalesController.java +++ b/yshop-app/src/main/java/co/yixiang/sales/rest/StoreAfterSalesController.java @@ -143,15 +143,18 @@ public class StoreAfterSalesController { @ApiImplicitParam(name = "code", value = "快递公司编码", paramType = "query", dataType = "string"), @ApiImplicitParam(name = "name", value = "快递公司名称", paramType = "query", dataType = "string"), @ApiImplicitParam(name = "postalCode", value = "快递编号", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "orderCode", value = "订单编号", paramType = "query", dataType = "string") + @ApiImplicitParam(name = "orderCode", value = "订单编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "id", value = "售后订单id", paramType = "query", dataType = "long") }) @ApiOperation(value = "添加物流信息", notes = "添加物流信息") - public ApiResult addLogisticsInformation(@RequestParam String code, @RequestParam String name, @RequestParam String postalCode, @RequestParam String orderCode) { + public ApiResult addLogisticsInformation(@RequestParam String code, @RequestParam String name, + @RequestParam String postalCode, @RequestParam String orderCode, + @RequestParam Long id) { Long uid = LocalUser.getUser().getUid(); if (StrUtil.isEmpty(code) || StrUtil.isEmpty(name) || StrUtil.isEmpty(postalCode)) { throw new YshopException("参数错误"); } - Boolean revoke = storeAfterSalesService.addLogisticsInformation(code, name, postalCode, orderCode); + Boolean revoke = storeAfterSalesService.addLogisticsInformation(code, name, postalCode, orderCode, id); return ApiResult.ok(revoke); } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/service/StoreAfterSalesService.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/StoreAfterSalesService.java index 1276ca84..198079ff 100644 --- a/yshop-mall/src/main/java/co/yixiang/modules/sales/service/StoreAfterSalesService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/StoreAfterSalesService.java @@ -79,13 +79,15 @@ public interface StoreAfterSalesService extends BaseService { /** * 添加快递信息 - * @param code 物流公司编码 - * @param name 物流公司名称 + * + * @param code 物流公司编码 + * @param name 物流公司名称 * @param postalCode * @param orderCode + * @param id * @return */ - Boolean addLogisticsInformation(String code, String name, String postalCode ,String orderCode); + Boolean addLogisticsInformation(String code, String name, String postalCode ,String orderCode, Long id); /** * 删除售后订单 diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesServiceImpl.java index f1d9e93f..0e8a413a 100644 --- a/yshop-mall/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesServiceImpl.java @@ -281,8 +281,11 @@ public class StoreAfterSalesServiceImpl extends BaseServiceImpllambdaQuery().eq(StoreAfterSales::getOrderCode, orderCode)); + public Boolean addLogisticsInformation(String code, String name, String postalCode, String orderCode, Long id) { + StoreAfterSales storeAfterSales = baseMapper.selectOne(Wrappers.lambdaQuery() + .eq(StoreAfterSales::getId, id) + .eq(StoreAfterSales::getOrderCode, orderCode) + ); if (!storeAfterSales.getState().equals(AfterSalesStatusEnum.STATUS_1.getValue())) { throw new YshopException("当前状态不能添加物流信息!"); }