puhanshu
2022-01-05 eb49b39db4de118a2161fd2a57b96f8f1b84eade
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ShopApi.java
@@ -6,18 +6,52 @@
import org.springframework.beans.BeanUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.panzhihua.common.model.dtos.PageDTO;
import com.panzhihua.common.model.dtos.shop.*;
import com.panzhihua.common.model.dtos.shop.ComShopAddressDTO;
import com.panzhihua.common.model.dtos.shop.ComShopCartDTO;
import com.panzhihua.common.model.dtos.shop.ComShopEditNubCartDTO;
import com.panzhihua.common.model.dtos.shop.ComShopFundsExportDTO;
import com.panzhihua.common.model.dtos.shop.ComShopGoodsDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderCreateDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderDeliverDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderExportDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderPreviewDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderQueryDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderShipDTO;
import com.panzhihua.common.model.dtos.shop.ComShopSysConfDTO;
import com.panzhihua.common.model.dtos.shop.OrderPayDTO;
import com.panzhihua.common.model.dtos.shop.PageComOrderListDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopAddressDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopFundsSearchDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopGoodsDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopOrderSearchDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopStoreDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopSysConfDTO;
import com.panzhihua.common.model.dtos.shop.WxPayNotifyOrderDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.shop.AddShopGoodsVO;
import com.panzhihua.common.model.vos.shop.ComShopSysConfVO;
import com.panzhihua.common.model.vos.shop.ShopOperLogVO;
import com.panzhihua.common.model.vos.shop.ShopStoreVO;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.service_community.model.dos.ComShopSysConfDO;
import com.panzhihua.service_community.service.*;
import com.panzhihua.service_community.service.ComShopCartService;
import com.panzhihua.service_community.service.ComShopGoodsService;
import com.panzhihua.service_community.service.ComShopOperLogService;
import com.panzhihua.service_community.service.ComShopOrderService;
import com.panzhihua.service_community.service.ComShopStoreService;
import com.panzhihua.service_community.service.ComShopSysConfService;
import com.panzhihua.service_community.service.ComShopUserAddressService;
import com.panzhihua.service_community.service.ConvenientMerchantService;
import lombok.extern.slf4j.Slf4j;
@@ -40,6 +74,10 @@
    private ComShopUserAddressService comShopUserAddressService;
    @Resource
    private ComShopSysConfService comShopSysConfService;
    @Resource
    private ConvenientMerchantService convenientMerchantService;
    @Resource
    private UserService userService;
    /**
     * 店铺列表-分页查询
@@ -636,4 +674,17 @@
        }
        return R.ok();
    }
    /**
     * check商家/店铺是否有效
     * @param userId
     * @return
     */
    @GetMapping("/checkStoreIsValid")
    public R checkStoreIsValid(@RequestParam("userId") Long userId) {
        Boolean isShopValid = comShopStoreService.checkStoreIsValid(userId);
        Boolean isConvenientValid = convenientMerchantService.checkStoreIsValid(userId);
        Boolean isMcsValid = userService.checkUserIsValid(userId, 11);
        return R.ok(isShopValid || isConvenientValid || isMcsValid);
    }
}