package com.ruoyi.account.api.feignClient; import com.ruoyi.account.api.factory.AppUserClientFallbackFactory; import com.ruoyi.account.api.model.AppUser; import com.ruoyi.account.api.model.AppUserShop; import com.ruoyi.common.core.constant.ServiceNameConstants; import com.ruoyi.common.core.domain.R; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; import java.util.List; /** * @author zhibing.pu * @Date 2024/11/21 9:50 */ @FeignClient(contextId = "AppUserClient", value = ServiceNameConstants.ACCOUNT_SERVICE, fallbackFactory = AppUserClientFallbackFactory.class) public interface AppUserClient { /** * 根据id获取用户 * @param id * @return */ @PostMapping("/app-user/getAppUserById") AppUser getAppUserById(@RequestParam("id") Long id); /** * 根据id编辑用户 */ @PostMapping("/app-user/editAppUserById") R editAppUserById(@RequestBody AppUser appUser); @PostMapping("/app-user/getCouponCount") R getCouponCount(@RequestParam("userId")Long userId, @RequestParam("couponId") Integer couponId ); /** * 根据用户id查询用户门店信息 */ @GetMapping("/appUserShop/shop/{userId}") R> getAppUserShop(@PathVariable("userId") Long userId); @PostMapping("/appUserShop/addAppUserShop") R addAppUserShop(@RequestBody AppUserShop appUserShop); /** * 根据用户id获取用户的祖籍列表 */ @GetMapping("/appletLogin/getUserAncestorList") R> getUserAncestorList(@RequestParam("id") Long id); @PostMapping("/app-user/getSuperiorLeader") R getSuperiorLeader(@RequestParam("id") Long id); @PostMapping("/app-user/getTopUsers") R> getTopUsers(); @PostMapping("/app-user/getVipCount") R getVipCount(@RequestParam("userId")Long userId, @RequestParam("vipId") Integer vipId ); @PostMapping("/app-user/listByIds") List listByIds(@RequestParam("ids") List list); /** * 根据用户名称模糊搜索用户列表 * @param name * @return */ @PostMapping("/app-user/getAppUserByName") R> getAppUserByName(@RequestParam("name") String name); @GetMapping("/app-user/getAppUserByNameNoFilter") public R> getAppUserByNameNoFilter(@RequestParam("name") String name); /** * 根据用户电话模糊搜索用户列表 * @param phone * @return */ @PostMapping("/app-user/getAppUserByPhone") R> getAppUserByPhone(@RequestParam("phone") String phone); /** * 根据用户电话模糊搜索用户列表(包含被删除的用户) * @param phone * @return */ @GetMapping("/app-user/getAppUserByPhoneNoFilter") public R> getAppUserByPhoneNoFilter(@RequestParam("phone") String phone); @PostMapping("/app-user/getAppUserByPhone1") R getAppUserByPhone1(@RequestParam("phone") String phone); /** * 获得指定用户的下级用户 * @param userId * @return */ @PostMapping("/app-user/setLowerUserShop") R> setLowerUserShop(@RequestParam("userId") Long userId,@RequestParam("shopId") Integer shopId); /** * 检查会员等级变更 * @param appUserId */ @PostMapping("/app-user/vipUpgrade") void vipUpgrade(@RequestParam("appUserId") Long appUserId); /** * 消费后检查会员等级变更 */ @PostMapping("/app-user/vipConsumption") void vipConsumption(@RequestParam("appUserId") Long appUserId); /** * 检查会员降级 * @param appUserId */ @PostMapping("/app-user/vipDemotion") void vipDemotion(@RequestParam("appUserId") Long appUserId); /** * 用户降级检测 */ @PostMapping("/app-user/demotionDetection") void demotionDetection(); /** * 清空绑定门店的用户门店数据 * @param shopId * @return */ @PostMapping("/app-user/clearBindShop") R clearBindShop(@RequestParam("shopId") Integer shopId); }