jiangqs
2023-07-07 5627daeb1ac1a29947e902f9a7efb6730ed98611
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/console/ShopController.java
@@ -246,4 +246,28 @@
        Integer count = shopSuggestService.getUnReplaySuggestVo();
        return R.ok(count);
    }
    /**
     * @description  获取商户营销状态
     * @author  jqs
     * @date    2023/7/7 14:05
     * @param shopId
     * @return  R<Integer>
     */
    @PostMapping("/getShopMarketingStatus")
    public R<Integer> getShopMarketingStatus(@RequestBody Long shopId)
    {
        Shop shop = shopService.getByShopId(shopId);
        Integer platformCouponFlag = shop.getPlatformCouponFlag();
        Integer platformBirthdayFlag = shop.getPlatformBirthdayFlag();
        Integer marketingStatus = 0;
        if(platformCouponFlag==1&&platformBirthdayFlag==0){
            marketingStatus = 1;
        }else if(platformCouponFlag==0&&platformBirthdayFlag==1){
            marketingStatus = 2;
        }else if(platformCouponFlag==1&&platformBirthdayFlag==1){
            marketingStatus = 3;
        }
        return R.ok(marketingStatus);
    }
}