Pu Zhibing
2025-03-26 cbf2486983b77a27af9968bbb362cb8d43789115
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
package com.ruoyi.account.api.feignClient;
 
import com.ruoyi.account.api.factory.UserPointFallbackFactory;
import com.ruoyi.account.api.model.UserPoint;
import com.ruoyi.account.api.model.UserPointCopy;
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.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
 
import java.util.List;
 
/**
 * @author zhibing.pu
 * @Date 2024/12/2 15:04
 */
@FeignClient(contextId = "UserPointClient", value = ServiceNameConstants.ACCOUNT_SERVICE, fallbackFactory = UserPointFallbackFactory.class)
public interface UserPointClient {
    
    /**
     * 保存积分流水记录
     * @param userPoint
     * @return
     */
    @PostMapping("/user-point/saveUserPoint")
    R saveUserPoint(@RequestBody UserPoint userPoint);
 
    @PostMapping("/user-point/saveUserPointCopy")
    R saveUserPointCopy(@RequestBody UserPointCopy userPoint);
 
    @DeleteMapping("/user-point/deleteUserPointCopy")
    R deleteUserPointCopy(@RequestParam("orderId") Long orderId, @RequestParam("type") List<Integer> type);
    
    @DeleteMapping("/user-point/deleteUserPointCopyByIds")
    R deleteUserPointCopyByIds(@RequestParam("ids") List<Long> ids);
    
    @PostMapping("/user-point/getUserPointCopy")
    R<List<UserPointCopy>> getUserPointCopy(@RequestParam("orderId") Long orderId, @RequestParam("type") List<Integer> type);
 
 
    /**
     * 获取积分变动明细
     * @param userPoint
     * @return
     */
    @PostMapping("/user-point/getUserPointList")
    R<List<UserPoint>> getUserPointList(@RequestBody UserPoint userPoint);
 
 
    /**
     * 判断当天是否分享获得过积分
     * @param appUserId
     * @return
     */
    @PostMapping("/user-point/judgmentDailyShare")
    R<Boolean> judgmentDailyShare(@RequestParam("appUserId") Long appUserId);
}