diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 3948860e..8f17baf6 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -270,14 +270,16 @@ dubbo: bxg: shop: # API_URL: http://192.168.10.113:48080/bxgApp - API_URL: http://675b568e.r6.cpolar.top + API_URL: http://45288535.r5.cpolar.top SITE_URL: http://192.168.10.113:48080/bxgApp UNI_SITE_URL: http://192.168.10.113:48080/bxgApp ADMIN_API_URL: http://192.168.10.113:48080/bxg # 快递100 参数 kuaidi100: enable: true - key: mmbOboEj7168 - customer: A6D46C8A03A4127C78DF0E377D721702 +# key: mmbOboEj7168 +# customer: A6D46C8A03A4127C78DF0E377D721702 + key: JUIqcuah6354 + customer: 72E85D8E7C67AEDB980F46C2B4194C27 secret: 13fcbe029263431293f5658cbf3259d3 userid: 79978ee033e640dca101450508620182 \ No newline at end of file diff --git a/zsw-bxg/src/main/java/co/yixiang/app/modules/user/rest/AppStoreAfterSalesController.java b/zsw-bxg/src/main/java/co/yixiang/app/modules/user/rest/AppStoreAfterSalesController.java index 7c93bbc1..8703f8c0 100644 --- a/zsw-bxg/src/main/java/co/yixiang/app/modules/user/rest/AppStoreAfterSalesController.java +++ b/zsw-bxg/src/main/java/co/yixiang/app/modules/user/rest/AppStoreAfterSalesController.java @@ -75,6 +75,9 @@ public class AppStoreAfterSalesController { return ApiResult.resultPage(total.intValue(), totalPage.intValue(), map.get("list")); } + + + @AppLog(value = "查看售後详情", type = 1) @AuthCheck @GetMapping("/store/detail/{key}/{id}") diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/order/rest/StoreOrderController.java b/zsw-bxg/src/main/java/co/yixiang/modules/order/rest/StoreOrderController.java index ef577770..838b2972 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/order/rest/StoreOrderController.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/order/rest/StoreOrderController.java @@ -12,6 +12,7 @@ import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.common.exception.YshopException; import co.yixiang.annotation.AnonymousAccess; import co.yixiang.dozer.service.IGenerator; import co.yixiang.enums.OrderInfoEnum; @@ -344,7 +345,8 @@ public class StoreOrderController { ExpressInfo expressInfo = expressService.getExpressInfo(expressInfoDo.getOrderCode(), expressInfoDo.getShipperCode(), expressInfoDo.getLogisticCode()); if (!expressInfo.isSuccess()) { - throw new BadRequestException(expressInfo.getReason()); +// throw new BadRequestException(expressInfo.getReason()); + throw new YshopException(expressInfo.getReason()); } return new ResponseEntity<>(expressInfo, HttpStatus.OK); } diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/sales/StoreAfterSalesController.java b/zsw-bxg/src/main/java/co/yixiang/modules/sales/StoreAfterSalesController.java index 1a8aaf0e..081344d7 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/sales/StoreAfterSalesController.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/sales/StoreAfterSalesController.java @@ -1,5 +1,8 @@ package co.yixiang.modules.sales; +import cn.iocoder.yudao.framework.common.pojo.ApiResult; +import cn.iocoder.yudao.framework.security.core.annotations.AuthCheck; +import co.yixiang.app.modules.order.param.ExpressParam; import co.yixiang.dozer.service.IGenerator; import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.mp.service.WeixinPayService; @@ -8,6 +11,8 @@ import co.yixiang.modules.sales.param.SalesCheckDto; import co.yixiang.modules.sales.param.YxStoreAfterSalesDto; import co.yixiang.modules.sales.service.StoreAfterSalesService; import co.yixiang.modules.sales.param.YxStoreAfterSalesQueryCriteria; +import co.yixiang.tools.express.ExpressService; +import co.yixiang.tools.express.dao.ExpressInfo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; @@ -40,6 +45,8 @@ public class StoreAfterSalesController { private final WeixinPayService weixinPayService; private final IGenerator generator; + private final ExpressService expressService; + /** * 审核 */ @@ -73,6 +80,15 @@ public class StoreAfterSalesController { public void download(HttpServletResponse response, YxStoreAfterSalesQueryCriteria criteria) throws IOException { storeAfterSalesService.download(generator.convert(storeAfterSalesService.queryAll(criteria), YxStoreAfterSalesDto.class), response); } + @Log("获取物流信息") + @PostMapping("/order/express") + @ApiOperation(value = "获取物流信息", notes = "获取物流信息") + public ResponseEntity express(@RequestBody ExpressParam expressInfoDo) { + ExpressInfo expressInfo = expressService.getExpressInfo(expressInfoDo.getOrderCode(), + expressInfoDo.getShipperCode(), expressInfoDo.getLogisticCode()); + return new ResponseEntity<>(expressInfo,HttpStatus.OK); + } + @GetMapping(value = "/sales/List") @Log("查询售后") @@ -82,6 +98,8 @@ public class StoreAfterSalesController { return new ResponseEntity<>(storeAfterSalesService.queryAll(criteria,pageable),HttpStatus.OK); } + + @PostMapping @Log("新增售后") @ApiOperation("新增售后") diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesServiceImpl.java b/zsw-bxg/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesServiceImpl.java index 0dc772fe..c48eea94 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesServiceImpl.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesServiceImpl.java @@ -14,6 +14,7 @@ import co.yixiang.event.TemplateEvent; import co.yixiang.event.TemplateListenEnum; import co.yixiang.exception.ErrorRequestException; import co.yixiang.modules.cart.vo.YxStoreCartQueryVo; +import co.yixiang.modules.mp.service.WeixinPayService; import co.yixiang.modules.order.domain.YxStoreOrder; import co.yixiang.modules.order.domain.YxStoreOrderCartInfo; import co.yixiang.modules.order.service.YxStoreOrderService; @@ -71,6 +72,8 @@ public class StoreAfterSalesServiceImpl extends BaseServiceImpllambdaQuery().eq(StoreAfterSales::getOrderCode, orderCode).eq(StoreAfterSales::getId, salesId)); - if (approvalStatus == 0) { + if (approvalStatus == 0) { //同意申请 storeAfterSales.setState(AfterSalesStatusEnum.STATUS_1.getValue()); - if (storeAfterSales.getServiceType() == 1) { + if (storeAfterSales.getServiceType() == 1) { //退货退款 if (StringUtils.isEmpty(consignee) || StringUtils.isEmpty(phoneNumber) || StringUtils.isEmpty(address)) { throw new ErrorRequestException("请输入收货人信息"); } @@ -350,23 +353,30 @@ public class StoreAfterSalesServiceImpl extends BaseServiceImpl 0; } @@ -376,10 +386,10 @@ public class StoreAfterSalesServiceImpl extends BaseServiceImpllambdaQuery().eq(StoreAfterSales::getOrderCode, orderCode).eq(StoreAfterSales::getId, salesId)); storeAfterSales.setState(AfterSalesStatusEnum.STATUS_3.getValue()); baseMapper.updateById(storeAfterSales); - //操作记录 + //操作记录/ StoreAfterSalesStatus storeAfterSalesStatus = new StoreAfterSalesStatus(); storeAfterSalesStatus.setStoreAfterSalesId(storeAfterSales.getId()); - storeAfterSalesStatus.setChangeType(3); + storeAfterSalesStatus.setChangeType(3); /** 操作类型 0售后订单生成 1后台审核成功 2用户发货 3打款 4审核失败 5用户撤销*/ storeAfterSalesStatus.setChangeMessage("平台打款成功"); storeAfterSalesStatus.setChangeTime(Timestamp.valueOf(LocalDateTime.now())); storeAfterSalesStatus.setOperator("admin");