From b0b52cbabf7a4bc8e00fc328d14ac05336d0221e Mon Sep 17 00:00:00 2001 From: jiangqs <jiangqs> Date: 星期六, 15 七月 2023 20:07:44 +0800 Subject: [PATCH] 员工端 --- ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/console/ShopController.java | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 60 insertions(+), 0 deletions(-) diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/console/ShopController.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/console/ShopController.java index b875415..77213f8 100644 --- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/console/ShopController.java +++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/console/ShopController.java @@ -101,6 +101,16 @@ return R.ok(shopRelUserVo); } + @PostMapping("/getShopByBelongUserId") + public R<ShopRelUserVo> getShopByBelongUserId(@RequestBody Long userId) + { + Shop shop = shopService.getShopByBelongUserId(userId); + Optional.ofNullable(shop).orElseThrow(() -> new ServiceException("未查询到商户信息")); + ShopRelUserVo shopRelUserVo = new ShopRelUserVo(); + shopRelUserVo.setShopId(shop.getShopId()); + return R.ok(shopRelUserVo); + } + /** * @description 删除商户标签 * @author jqs @@ -220,4 +230,54 @@ return R.ok(taskSimpleVo); } + /** + * @description 获取商户下属代理商 + * @author jqs + * @date 2023/7/3 17:26 + * @return R<List<Long>> + */ + @PostMapping("/listShopIdByShopId") + public R<List<Long>> listShopIdByShopId(@RequestBody Long shopId) + { + List<Long> shopIdList = shopService.listShopIdByShopId(shopId); + return R.ok(shopIdList); + } + + /** + * @description 获取未回复数量 + * @author jqs + * @date 2023/7/5 12:49 + * @param + * @return R<Integer> + */ + @PostMapping("/getUnReplaySuggestVo") + public R<Integer> getUnReplaySuggestVo() + { + 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); + } } -- Gitblit v1.7.1