yanghui
2022-11-22 e60572581d3a8b97bb8cc35536daaa7b3f2c0a14
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ShopFlowerApi.java
@@ -4,11 +4,13 @@
import com.panzhihua.applets.weixin.CheckService;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO;
import com.panzhihua.common.model.dtos.community.convenient.PageConvenientServiceCategoryDTO;
import com.panzhihua.common.model.dtos.shop.*;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.convenient.ConvenientElevatingPointVO;
import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO;
import com.panzhihua.common.model.vos.community.convenient.ConvenientServiceCategoryVO;
import com.panzhihua.common.model.vos.shop.*;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.validated.AddGroup;
@@ -66,11 +68,13 @@
    public R shopGoodsDetail(@RequestParam("goodsId") Long goodsId) {
        return communityService.shopFlowerGoodsDetail(goodsId);
    }
    @ApiOperation(value = "删除商品")
    @DeleteMapping("/goods/delete")
    public R deleteShopGoods(@RequestParam("goodsId") Long goodsId) {
        return communityService.deleteFlowerShopGoods(goodsId);
    }
    @ApiOperation(value = "商品上下架")
    @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "商品Id"),
            @ApiImplicitParam(name = "status", value = "1.上架  2.下架 ")})
@@ -78,12 +82,14 @@
    public R changeStatus(@RequestParam("id") Long id, @RequestParam("status") Integer status) {
        return communityService.changeFlowerStatus(id, status);
    }
    @ApiOperation(value = "编辑商品")
    @PostMapping("/goods/edit/{id}")
    public R editShopGoods(@PathVariable("id") Long id,
                           @RequestBody @Validated(AddGroup.class) AddShopFlowerGoodsVO addShopGoodsVO) {
        return communityService.editFlowerShopGoods(id, addShopGoodsVO);
    }
    @ApiOperation(value = "新增商品")
    @PostMapping("/goods/save")
    public R saveShopGoods(@RequestBody @Validated(AddGroup.class) AddShopFlowerGoodsVO addShopGoodsVO) {
@@ -236,7 +242,7 @@
    public R saveEvaluate(@RequestBody ComShopFlowerEvaluateDTO comShopFlowerEvaluateDTO) {
        String evaluateContent = comShopFlowerEvaluateDTO.getEvaluateContent();
        if (StrUtil.isNotBlank(evaluateContent)) {
            String result = checkService.checkMessageBy(evaluateContent,this.getLoginUserInfo().getOpenid(),this.getAppId());
            String result = checkService.checkMessageBy(evaluateContent, this.getLoginUserInfo().getOpenid(), this.getAppId());
            if (StrUtil.isNotBlank(result)) {
                return R.fail(501, "填写内容存在 " + result + " 违规信息");
            }
@@ -365,60 +371,117 @@
    /**
     * 查询我的店铺各类统计数据
     *
     * @param storeId
     * @return
     */
    @ApiOperation(value = "查询我的店铺各类统计数据")
    @GetMapping("/selectCountByStoreId")
    public R selectCountByStoreId(Long storeId){
        return communityService.selectCountByStoreId(storeId);
    public R selectCountByUserId(Long storeId) {
        return communityService.selectCountByUserId(storeId);
    }
    /**
     * 创建退款订单
     *
     * @param comShopFlowerRefundOrderDTO
     * @return
     */
    @PostMapping("createRefundOrder")
    @ApiOperation(value = "创建退款订单")
    public R createRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO){
    public R createRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO) {
        return communityService.createRefundOrder(comShopFlowerRefundOrderDTO);
    }
    /**
     * 用户 分页查询退款订单
     *
     * @param pageComOrderRefundDTO
     * @return
     */
    @PostMapping("pageRefundOrder")
    @ApiOperation(value = "退款订单分页查询 用户",response = ComShopFlowerRefundOrderVO.class)
    public R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO){
    @ApiOperation(value = "退款订单分页查询 用户", response = ComShopFlowerRefundOrderVO.class)
    public R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO) {
        pageComOrderRefundDTO.setUserId(this.getUserId());
        return communityService.pageRefundOrder(pageComOrderRefundDTO);
    }
    /**
     * 修改退款订单
     *
     * @param comShopFlowerRefundOrderDTO
     * @return
     */
    @PostMapping("updateRefundOrder")
    @ApiOperation(value = "修改退款订单")
    public R updateRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO){
    public R updateRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO) {
        return communityService.updateRefundOrder(comShopFlowerRefundOrderDTO);
    }
    /**
     * 商家后台-退款申请统计
     *
     * @param storeId
     * @return
     */
    @GetMapping("selectCountGroupStatus")
    @ApiOperation(value = "商家后台-退款申请统计")
    public R selectCountGroupStatus(Long storeId){
    public R selectCountGroupStatus(Long storeId) {
        return communityService.selectCountGroupStatus(storeId);
    }
    @ApiOperation(value = "商品分类")
    @GetMapping("/goodsCategory/getAllGoodsCategories")
    public R getAllGoodsCategories() {
        return communityService.getAllGoodsCategories();
    }
    @ApiOperation(value = "分页查询便民服务分类", response = ConvenientServiceCategoryVO.class)
    @PostMapping("/service-category/page")
    public R pageServiceCategory(@RequestBody PageConvenientServiceCategoryDTO pageConvenientServiceCategoryDTO) {
        pageConvenientServiceCategoryDTO.setAreaCode(this.getAreaCode());
        return communityService.pageServiceCategory(pageConvenientServiceCategoryDTO);
    }
    /**
     * 新增商品浏览量
     *
     * @param goodsId
     * @return
     */
    @GetMapping("incrGoodsView")
    public R incrGoodsView(@RequestParam("goodsId") Long goodsId) {
        return communityService.incrGoodsView(goodsId);
    }
    @ApiOperation(value = "增加商家咨询量")
    @GetMapping("/merchant/incr-consult")
    public R incrMerchantConsult(@RequestParam("merchantId") Long merchantId) {
        return communityService.consultMerchant(merchantId);
    }
    @ApiOperation(value = "增加商家浏览量")
    @GetMapping("/merchant/incr-view")
    public R incrMerchantView(@RequestParam("merchantId") Long merchantId) {
        return communityService.incrMerchantView(merchantId);
    }
    @ApiOperation(value = "出入账分页", response = ComShopFlowerOrderPayVO.class)
    @PostMapping("pageOrderPay")
    public R pageOrderPay(@RequestBody PageComShopFlowerOrderPayDTO pageComShopFlowerOrderPayDTO) {
        return communityService.pageOrderPay(pageComShopFlowerOrderPayDTO);
    }
    /**
     * 获取商家的营业额和可结算金额
     * @param storeId
     * @return
     */
    @ApiOperation(value = "获取商家的营业额和可结算金额")
    @GetMapping("getQuota")
    public R getQuota(@RequestParam("storeId") Long storeId){
        return communityService.getQuota(storeId);
    }
}