yanghui
2022-11-17 b30e1a48f2bc5f65a0efd2e69e090fed2d7a627c
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ShopFlowerApi.java
@@ -1,17 +1,21 @@
package com.panzhihua.applets.api;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO;
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.shop.*;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.validated.PutGroup;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -31,14 +35,19 @@
    private CommunityService communityService;
/*    @ApiOperation(value = "查询店铺详情", response = PageShopStoreVO.class)
    @PostMapping("shopstoredetail")
    public R shopStoreDetail(@RequestBody PageComShopStoreDTO comShopStoreDTO) {
        if (comShopStoreDTO == null || comShopStoreDTO.getStoreId() == null) {
            return R.fail("参数错误");
        }
        return communityService.shopStoreDetail(comShopStoreDTO);
    }*/
    @ApiOperation(value = "查询便民服务商家详情", response = ConvenientMerchantVO.class)
    @GetMapping("/merchant/getMerchantByUserId")
    public R getMerchant(@RequestParam("userId") Long userId) {
        return communityService.getMerchantByUserId(userId);
    }
    @ApiOperation(value = "编辑便民服务商家")
    @PutMapping("/merchant/put")
    public R putMerchant(@RequestBody @Validated(PutGroup.class) ConvenientMerchantDTO convenientMerchantDTO) {
        convenientMerchantDTO.setUpdatedBy(this.getUserId());
        convenientMerchantDTO.setCreatedBy(this.getUserId());
        return communityService.putMerchant(convenientMerchantDTO);
    }
    @ApiOperation(value = "分页查询商品列表", response = ComShopFlowerGoodsVO.class)
    @PostMapping("pageShopGoods")