Pu Zhibing
2025-02-25 49e96cc15baf35d710fe3a049fb97aff6a1af132
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
package com.ruoyi.other.api.feignClient;
 
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.other.api.domain.Shop;
import com.ruoyi.other.api.domain.ShopBalanceStatement;
import com.ruoyi.other.api.factory.ShopClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
 
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Set;
 
/**
 * @author zhibing.pu
 * @Date 2024/11/29 10:28
 */
@FeignClient(contextId = "ShopClient", value = ServiceNameConstants.OTHER_SERVICE, fallbackFactory = ShopClientFallbackFactory.class)
public interface ShopClient {
    
    
    /**
     * 根据id获取门店信息
     * @param id
     * @return
     */
    @PostMapping("/shop/getShopById")
    R<Shop> getShopById(@RequestParam("id") Integer id);
 
    @PostMapping("/shop/getShopByUserId")
    R<List<Shop>> getShopByUserId(@RequestParam("id") Long id);
    
    /**
     * 根据店铺管理员电话获取门店数据
     * @param phone
     * @return
     */
    @PostMapping("/shop/getShopByPhone")
    R<Shop> getShopByPhone(@RequestParam("phone") String phone);
 
    @PostMapping("/shop/getShopByUserIds")
    R<List<Shop>> getShopByUserIds(@RequestBody List<Long> userIds);
 
    @PostMapping("/shop/getShopIdByName")
    R<Set<Integer>> getShopIdByName(@RequestParam("shopName") String shopName);
 
    @PostMapping("/shop-balance-statement/getList")
    R<List<ShopBalanceStatement>> getShopBalanceStatementList(@RequestBody ShopBalanceStatement shopBalanceStatement);
    
    /**
     * 编辑门店
     * @param shop
     */
    @PostMapping("/shop/updateShop")
    void updateShop(Shop shop);
 
 
    /**
     * 获取所有门店
     * @return
     */
    @PostMapping("/shop/getAllShop")
    R<List<Shop>> getAllShop();
 
 
    @GetMapping("/shop/getShopStatistics")
    public R<Map<String, BigDecimal>> getShopStatistics(@RequestParam("shopId") Integer shopId);
 
    /**
     * 获取指定用户的服务商
     */
    @GetMapping("/shop/getServiceProvider")
    R<Shop> getServiceProvider(@RequestParam("appUserId") Long appUserId);
 
    /**
     * 获取指定用户的高级服务商
     */
    @GetMapping("/shop/getSuperiorServiceProvider")
    public R<Shop> getSuperiorServiceProvider(@RequestParam("appUserId") Long appUserId);
 
 
}