From 0bf174be571c53b8af796eca4b51fcd3edec1657 Mon Sep 17 00:00:00 2001 From: DESKTOP-71BH0QO\L、ming <172680469@qq.com> Date: 星期日, 25 四月 2021 21:55:43 +0800 Subject: [PATCH] no --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ShopApi.java | 147 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 145 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ShopApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ShopApi.java index a068fd1..8fe40d8 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ShopApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ShopApi.java @@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.util.Date; import java.util.List; import javax.validation.constraints.NotNull; @@ -63,6 +64,16 @@ } /** + * 新增店铺 + * @param storeVO 店铺信息 + * @return 新增结果 + */ + @PostMapping("/addStore") + public R addStore(@RequestBody ShopStoreVO storeVO) { + return comShopStoreService.addStore(storeVO); + } + + /** * 编辑店铺、启用、禁用 * * @param storeVO @@ -94,6 +105,28 @@ @GetMapping("/getStoreInfo") public R getOneInfo(@RequestParam("id") Long id) { return comShopStoreService.getOneInfo(id); + } + + + /** + * 获取用户商铺详细 + * + * @param userId 用户ID + * @return + */ + @GetMapping("/getUserStoreInfo") + public R getUserStoreInfo(@RequestParam("userId") Long userId) { + return comShopStoreService.getUserStoreInfo(userId); + } + /** + * 获取用户商铺详细 + * + * @param account 用户账号 + * @return + */ + @GetMapping("/getUserStoreInfoByAccount") + public R<ShopStoreVO> getUserStoreInfoByAccount(@RequestParam("account") String account) { + return comShopStoreService.getUserStoreInfo(account); } /** @@ -145,6 +178,7 @@ */ @PostMapping("/pageShopGoods") public R pageShopGoods(@RequestBody ComShopGoodsDTO comShopGoodsDTO) { + return comShopGoodsService.pageShopGoods(comShopGoodsDTO); } @@ -166,6 +200,16 @@ @PostMapping("shopCartList") public R shopCartList(@RequestParam("userId") Long userId) { return comShopCartService.shopCartList(userId); + } + + /** + * 查询用户购物车数量 + * @param userId 用户id + * @return 用户购物车商品数量 + */ + @PostMapping("shopCartUserTotal") + public R shopCartUserTotal(@RequestParam("userId") Long userId) { + return comShopCartService.shopCartUserTotal(userId); } /** @@ -285,7 +329,7 @@ */ @PostMapping("orderCancel") public R orderCancel(@RequestBody ComShopOrderQueryDTO comShopOrderQueryDTO) { - return comShopOrderService.orderCancel(comShopOrderQueryDTO.getOrderId(),comShopOrderQueryDTO.getPhone()); + return comShopOrderService.orderCancel(comShopOrderQueryDTO); } /** @@ -347,6 +391,7 @@ * @param id 商铺Id * @return */ + @Transactional(rollbackFor = Exception.class) @PostMapping("editShopGoods/{id}") public R editShopGoods(@PathVariable("id") Long id,@RequestBody AddShopGoodsVO addShopGoodsVO) { return comShopGoodsService.editShopGoods(id, addShopGoodsVO); @@ -363,7 +408,7 @@ } /** - * 删除商品 + * 修改商品状态 * @param id * @return */ @@ -372,4 +417,102 @@ return comShopGoodsService.changeStatus(id,status); } + /** + * 商家资金的订单详情 + * @param id + * @return + */ + @GetMapping("capitalDetailByStore") + public R capitalDetailByStore(@RequestParam("id") Long id) { + return comShopOrderService.capitalDetailByStore(id); + } + + /** + * 订单发货 + * @param orderShipDTO 发货信息 + * @return 发货结果 + */ + @PostMapping("/shipOrder") + R shipOrder(@RequestBody ComShopOrderShipDTO orderShipDTO){ + return comShopOrderService.shipOrder(orderShipDTO); + } + + /** + * 订单配送 + * @param deliverDTO 订单ID + * @return 配送结果 + */ + @PostMapping("/deliverOrder") + R deliverOrder(@RequestBody ComShopOrderDeliverDTO deliverDTO){ + return comShopOrderService.deliverOrder(deliverDTO); + } + /** + * 订单配送 + * @param deliverDTO 订单ID + * @return 配送完成 + */ + @PostMapping("/finishDeliverOrder") + R finishDeliverOrder(@RequestBody ComShopOrderDeliverDTO deliverDTO){ + return comShopOrderService.finishDeliverOrder(deliverDTO); + } + + /** + * 订单导出信息 + * @param comShopOrderExportDTO 订单导出信息 + * @return 订单导出信息 + */ + @PostMapping("/shopOrderExportData") + R shopOrderExportData(@RequestBody ComShopOrderExportDTO comShopOrderExportDTO){ + return comShopOrderService.shopOrderExportData(comShopOrderExportDTO); + } + + /** + * 资金管理导出信息 + * @param comShopFundsExportDTO 资金管理导出信息 + * @return 资金管理导出信息 + */ + @PostMapping("/shopOrderFundsExportData") + R shopOrderFundsExportData(@RequestBody ComShopFundsExportDTO comShopFundsExportDTO){ + return comShopOrderService.shopOrderFundsExportData(comShopFundsExportDTO); + } + + + /** + * 用户资金统计信息 + * @param userId 用户ID + * @return 统计信息 + */ + @GetMapping("/getFundsStat") + R getFundsStat(@RequestParam("userId") Long userId){ + return comShopOrderService.getFundsStat(userId); + } + + /** + * 店铺资金统计信息 + * @param pageComShopFundsSearchDTO 店铺资金 + * @return 店铺资金统计信息 + */ + @PostMapping("/pageShopFunds") + R pageShopFunds(@RequestBody PageComShopFundsSearchDTO pageComShopFundsSearchDTO){ + return comShopOrderService.pageShopFunds(pageComShopFundsSearchDTO); + } + + /** + * 微信支付订单回调 + * @param wxPayNotifyOrderDTO 订单支付回调参数 + */ + @PostMapping("/wxOrderPayNotify") + public void wxOrderPayNotify(@RequestBody WxPayNotifyOrderDTO wxPayNotifyOrderDTO){ + comShopOrderService.wxOrderPayNotify(wxPayNotifyOrderDTO); + } + + /** + * 点击去支付订单 + * @param orderPayDTO 请求参数 + * @return 支付对象 + */ + @PostMapping("/wxPay") + public R wxPay(@RequestBody OrderPayDTO orderPayDTO){ + return comShopOrderService.wxPay(orderPayDTO); + } } -- Gitblit v1.7.1