Sunshine
2024-11-05 8f7985d7764a0aad24bd593ac5ea47b7fc290961
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
package com.nova.sankuai.service;
 
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nova.sankuai.domain.api.externalInterface.CheckUserResponse;
import com.nova.sankuai.domain.api.externalInterface.RegisterResponse;
import com.nova.sankuai.domain.api.externalInterface.UserDto;
import com.nova.sankuai.domain.dto.LoginUserDto;
import com.nova.sankuai.domain.entity.Customer;
import com.nova.sankuai.domain.entity.CustomerUser;
import com.nova.sankuai.domain.entity.VipCardOrder;
import com.nova.sankuai.domain.vo.VipEffectiveTimeVo;
 
import java.util.Date;
 
/**
 * @author weikangdi
 * @create 2021/11/8
 */
public interface ICustomerUserService extends IService<CustomerUser> {
 
    /**
     * 根据申请记录注册客户端用户
     *
     * @param customer
     */
    void registerUserByCustomer(Customer customer);
 
    /**
     * 登录时注册初始客户端用户
     *
     * @param phone
     * @param appId
     * @param device
     * @return
     */
    CustomerUser registerInitCustomerUser(String phone, String appId, Integer device, String businessType);
 
    /**
     * 获取登录用户信息
     *
     * @param userDto
     * @return
     */
    CustomerUser getUser(LoginUserDto userDto);
 
    /**
     * 通过手机号获取登录客户
     *
     * @param phone
     * @return
     */
    CustomerUser getUserByPhone(String phone);
 
    /**
     * 联登接口
     *
     * @param autologin
     * @return
     * @throws Exception
     */
    JSONObject autoLogin(String autologin) throws Exception;
 
    /**
     * 用户购买会员更新逻辑
     *
     * @param vipCardOrder
     * @param vipEffectiveTimeVo
     */
    void updateVipEffectiveTime(VipCardOrder vipCardOrder, VipEffectiveTimeVo vipEffectiveTimeVo);
 
    /**
     * 计算会员到期时间按天数
     *
     * @param userId
     * @param paymentDays
     * @param startDate
     * @param endDate
     * @return
     */
    VipEffectiveTimeVo calculateExpiredDate(Long userId, Integer paymentDays, Date startDate, Date endDate);
 
    /**
     * 撞库测试
     * @param phone
     * @param phoneMD5
     * @return
     */
    CustomerUser checkCustomer (String phone, String phoneMD5);
 
    /**
     * 面向渠道方撞库
     *
     * @return
     */
    CheckUserResponse unionCheckUser(UserDto checkUserDto);
 
    /**
     * 面向渠道方联登
     *
     * @return
     */
    RegisterResponse unionRegister(UserDto checkUserDto);
 
 
    /**
     * 根据最新申请记录更新用户注册表信息
     * @param customerUser
     * @param customer
     */
    void checkAndUpdateUser(CustomerUser customerUser, Customer customer);
 
    /**
     * 联登下载接口
     *
     * @param autodownload
     * @return
     * @throws Exception
     */
    JSONObject autodownload(String autodownload) throws Exception;
 
 
    CustomerUser getCustomerUser(Long id);
}