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);
|
}
|