|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.ruoyi.common.core.constant.ServiceNameConstants; | 
|---|
|  |  |  | import com.ruoyi.common.core.domain.R; | 
|---|
|  |  |  | import com.ruoyi.other.api.domain.TUserSite; | 
|---|
|  |  |  | import com.ruoyi.other.api.factory.UserSiteFallbackFactory; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Delete; | 
|---|
|  |  |  | import org.springframework.cloud.openfeign.FeignClient; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.GetMapping; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RequestParam; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * @author zhibing.pu | 
|---|
|  |  |  | * @Date 2024/8/9 18:14 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @FeignClient(contextId = "UserSiteClient", value = ServiceNameConstants.CONTRACT_SERVICE, fallbackFactory = UserSiteFallbackFactory.class) | 
|---|
|  |  |  | @FeignClient(contextId = "UserSiteClient", value = ServiceNameConstants.OTHER_SERVICE, fallbackFactory = UserSiteFallbackFactory.class) | 
|---|
|  |  |  | public interface UserSiteClient { | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param userId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping("/t-user-site/getSiteIds") | 
|---|
|  |  |  | R<List<Integer>> getSiteIds(@RequestParam("userId") Long userId); | 
|---|
|  |  |  | @PostMapping("/t-user-site/getSiteIds/{userId}") | 
|---|
|  |  |  | R<List<Integer>> getSiteIds(@PathVariable("userId") Long userId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加用户站点关系数据 | 
|---|
|  |  |  | * @param userSite | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/t-user-site/addUserSite") | 
|---|
|  |  |  | R addUserSite(@RequestBody List<TUserSite> userSite); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 删除用户站点数据 | 
|---|
|  |  |  | * @param userId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @DeleteMapping("/t-user-site/delUserSite/{userId}") | 
|---|
|  |  |  | R delUserSite(@PathVariable("userId") Long userId); | 
|---|
|  |  |  | } | 
|---|