phpcjl
2024-12-04 bb66ef51805b58448af8edae8e6b04f153d80b5f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
 
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("/appUser/getAppUserById")
    AppUser getAppUserById(@RequestParam("id") Long id);
 
    /**
     * 根据id编辑用户
     */
    @PostMapping("/app-user/editAppUserById")
    R<Void> editAppUserById(@RequestParam("appUser") AppUser appUser);
 
    @PostMapping("/app-user/getCouponCount")
    R<Long> getCouponCount(@RequestParam("userId")Long userId, @RequestParam("couponId") Integer couponId );
 
    /**
     *  根据用户id查询用户门店信息
     */
    @GetMapping("/appUserShop/shop/{userId}")
    R<List<AppUserShop>> getAppUserShop(@PathVariable("userId") Long userId);
 
    /**
     * 根据用户id获取用户的祖籍列表
     */
    @GetMapping("/appletLogin/getUserAncestorList")
    R<List<AppUser>> getUserAncestorList(@RequestParam("id") Long id);
 
 
 
    @PostMapping("/app-user/getVipCount")
    R<Long> getVipCount(@RequestParam("userId")Long userId, @RequestParam("vipId") Integer vipId );
}