DESKTOP-71BH0QO\L、ming
2021-04-21 3ffa739e77cdafdc4be1aa153acb3423071cd102
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ShopApi.java
@@ -2,7 +2,6 @@
import com.panzhihua.common.model.dtos.shop.PageComShopGoodsDTO;
import com.panzhihua.common.model.dtos.shop.*;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.PageDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopOrderSearchDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopStoreDTO;
@@ -20,9 +19,7 @@
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.NotNull;
@Slf4j
@RestController
@@ -73,6 +70,11 @@
    @PostMapping("/editStore/{id}")
    public R editStore(@RequestBody ShopStoreVO storeVO, @PathVariable("id") Long id) {
        return comShopStoreService.editStore(id, storeVO);
    }
    @GetMapping("/getStoreByPhone")
    R GetStoreByPhone(@RequestParam("phone") String phone){
        return comShopStoreService.getStoreByPhone(phone);
    }
    /**
@@ -158,6 +160,7 @@
     */
    @PostMapping("/pageShopGoods")
    public R pageShopGoods(@RequestBody ComShopGoodsDTO comShopGoodsDTO) {
        return comShopGoodsService.pageShopGoods(comShopGoodsDTO);
    }
@@ -179,6 +182,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);
    }
    /**
@@ -360,6 +373,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);
@@ -467,5 +481,22 @@
        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);
    }
}