luodangjia
2025-02-07 8ffeb751b3a694e8d1cb6a21bec855f6c49b31b6
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
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<Void> editAppUserById(@RequestBody 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);
 
    @PostMapping("/appUserShop/addAppUserShop")
    R<Void> addAppUserShop(@RequestBody AppUserShop appUserShop);
 
    /**
     * 根据用户id获取用户的祖籍列表
     */
    @GetMapping("/appletLogin/getUserAncestorList")
    R<List<AppUser>> getUserAncestorList(@RequestParam("id") Long id);
 
    @PostMapping("/app-user/getSuperiorLeader")
    R<AppUser> getSuperiorLeader(@RequestParam("id") Long id);
 
    @PostMapping("/app-user/getTopUsers")
    R<List<AppUser>> getTopUsers();
 
    @PostMapping("/app-user/getVipCount")
    R<Long> getVipCount(@RequestParam("userId")Long userId, @RequestParam("vipId") Integer vipId );
 
 
    @PostMapping("/app-user/listByIds")
    List<AppUser> listByIds(@RequestParam("ids") List<Long> list);
 
    /**
     * 根据用户名称模糊搜索用户列表
     * @param name
     * @return
     */
    @PostMapping("/app-user/getAppUserByName")
    R<List<AppUser>> getAppUserByName(@RequestParam("name") String name);
 
    @GetMapping("/app-user/getAppUserByNameNoFilter")
    public R<List<AppUser>> getAppUserByNameNoFilter(@RequestParam("name") String name);
 
    /**
     * 根据用户电话模糊搜索用户列表
     * @param phone
     * @return
     */
    @PostMapping("/app-user/getAppUserByPhone")
    R<List<AppUser>> getAppUserByPhone(@RequestParam("phone") String phone);
 
    @GetMapping("/app-user/getAppUserByPhoneNoFilter")
    public R<List<AppUser>> getAppUserByPhoneNoFilter(@RequestParam("phone") String phone);
 
 
    @PostMapping("/app-user/getAppUserByPhone1")
    R<AppUser> getAppUserByPhone1(@RequestParam("phone") String phone);
 
    /**
     * 获得指定用户的下级用户
     * @param userId
     * @return
     */
    @PostMapping("/app-user/setLowerUserShop")
    R<List<AppUser>>  setLowerUserShop(@RequestParam("userId") Long userId,@RequestParam("shopId") Integer shopId);
    
    
    
    /**
     * 检查会员等级变更
     * @param appUserId
     */
    @PostMapping("/app-user/vipUpgrade")
    void vipUpgrade(@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);
}