123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237 |
- package com.caimei365.user.service;
- import com.caimei365.user.model.ResponseJson;
- import com.caimei365.user.model.dto.AuthBindDto;
- import com.caimei365.user.model.dto.LoginCodeDto;
- import com.caimei365.user.model.dto.LoginPasswordDto;
- import com.caimei365.user.model.dto.ScanBindDto;
- import com.caimei365.user.model.vo.MessageCenter;
- import com.caimei365.user.model.vo.UserLoginVo;
- import com.github.pagehelper.PageInfo;
- import org.springframework.http.HttpHeaders;
- import java.text.ParseException;
- import java.util.List;
- import java.util.Map;
- /**
- * Description
- *
- * @author : Charles
- * @date : 2021/3/8
- */
- public interface LoginService {
- /**
- * 登录(用户名,密码)
- *
- * @param loginPasswordDto {
- * mobileOrEmail 手机号或邮箱
- * password 密码
- * unionId 微信unionId
- * }
- * @return BaseUser
- */
- ResponseJson<UserLoginVo> passwordLogin(LoginPasswordDto loginPasswordDto) throws ParseException;
- /**
- * 登录(用户名,密码)
- *
- * @param loginPasswordDto {
- * mobileOrEmail 手机号或邮箱
- * password 密码
- * unionId 微信unionId
- * }
- * @return BaseUser
- */
- ResponseJson<UserLoginVo> passwordOrganizeLogin(LoginPasswordDto loginPasswordDto) throws ParseException;
- /**
- *
- * @param loginCodeDto {
- * mobile 手机号
- * code 短信验证码
- * }
- * @return
- * @throws ParseException
- */
- ResponseJson<UserLoginVo> codeLogin(LoginCodeDto loginCodeDto) throws ParseException;
- /**
- *
- * @param loginCodeDto {
- * mobile 手机号
- * code 短信验证码
- * }
- * @return
- * @throws ParseException
- */
- ResponseJson<UserLoginVo> codeOrganizeLogin(LoginCodeDto loginCodeDto) throws ParseException;
- /**
- * 微信授权登录(小程序)
- *
- * @param code 微信授权code
- * @param encryptedData 微信加密数据
- * @param iv 加密算法的初始向量
- * @return BaseUser
- */
- ResponseJson<UserLoginVo> appletsAuthorization(String code, String encryptedData, String iv, HttpHeaders headers) throws ParseException;
- /**
- * 微信授权登录(小程序) 组织
- *
- * @param code 微信授权code
- * @param encryptedData 微信加密数据
- * @param iv 加密算法的初始向量
- * @return BaseUser
- */
- ResponseJson<UserLoginVo> appletsOrganizeAuthorization(String code, String encryptedData, String iv, HttpHeaders headers) throws ParseException;
- ResponseJson<PageInfo<MessageCenter>> SpMessageList(Integer commonId,Integer messageType,Integer source,Integer type, int pageNum, int pageSize);
- ResponseJson<PageInfo<MessageCenter>> ClubMessageList(Integer commonId,Integer messageType,Integer source, int pageNum, int pageSize);
- /**
- * 推送访问(站内信) 记录
- * @param userId
- * @param link
- * @return
- */
- ResponseJson clubBehaviorInfo(Integer userId, String link);
- ResponseJson<PageInfo<MessageCenter>> shopMessageList(Integer commonId,Integer messageType,Integer source, int pageNum, int pageSize);
- ResponseJson<PageInfo<MessageCenter>> messageList(Integer commonId,Integer messageType,Integer userType, int pageNum, int pageSize);
- ResponseJson<Map<String, Object>> messageCount(Integer userType ,Integer commonId);
- ResponseJson<Map<String, Object>> count(Integer userType,Integer messageType,Integer commonId);
- ResponseJson<Map<String, Object>> ClubMessageCount(Integer messageType,Integer commonId);
- ResponseJson<Map<String, Object>> shopMessageCount(Integer messageType,Integer commonId);
- ResponseJson<Map<String, Object>> SpCount(Integer messageType,Integer commonId);
- ResponseJson<Map<String, Object>> ShopCount(Integer messageType,Integer commonId);
- ResponseJson<Map<String, Object>> ClubCount(Integer messageType,Integer commonId);
- Integer updateMessageAsRead(Integer userType,Integer messageType,Integer commonId);
- Integer updateRead(Integer userType,String Id);
- Integer deleteMessage(String id);
- /**
- * 微信公众号授权链接(www)
- *
- * @param redirectUri 用于微信授权的中间页面
- * @param mode 授权方式:1静默授权,其他手动同意授权
- */
- ResponseJson<String> getAuthorizationLink(String redirectUri, Integer mode);
- /**
- * 微信公众号授权登录(www)
- *
- * spi旧接口:user/authorizationLogin
- *
- * @param code 微信code
- * @param state 安全认证
- * @param mode 1:静默授权,2:用户手动授权
- */
- ResponseJson<UserLoginVo> websiteAuthorization(String code, String state, Integer mode, HttpHeaders headers);
- /**
- * 获取生成微信二维码的参数(www)
- *
- * @return Map<String, Object>
- */
- ResponseJson<Map<String, String>> getAuthParameters();
- /**
- * 微信用户扫码,微信服务器回调
- *
- * @param code 微信code
- * @param state 安全认证key(上一步获取参数时自定义生成的uuid)
- */
- void qrCodeAuthScan(String code, String state);
- /**
- * 校验扫码结果
- *
- * @param state 安全认证key(第一步获取参数时自定义生成的uuid)
- * @return UserLoginVo
- */
- ResponseJson<UserLoginVo> qrCodeAuthScanResult(String state) throws ParseException;
- /**
- * 微信扫码后,绑定机构账号
- *
- * @param scanBindDto {
- * mobileOrEmail 手机号或邮箱
- * password 密码
- * mobile 手机号
- * smsCode 手机验证码
- * linkName 联系人
- * }
- */
- ResponseJson<UserLoginVo> qrCodeAuthScanBind(ScanBindDto scanBindDto);
- /**
- * 邀请码登录
- *
- * @param invitationCode 邀请码
- * @param nickName 微信昵称
- * @param avatarUrl 微信头像(headimgurl)
- * @param unionId 微信unionId
- * @return UserLoginVo
- */
- ResponseJson<UserLoginVo> invitationCodeLogin(String invitationCode, String nickName, String avatarUrl, String unionId);
- /**
- * 邀请码登录
- *
- * @param invitationCode 邀请码
- * @param nickName 微信昵称
- * @param avatarUrl 微信头像(headimgurl)
- * @param unionId 微信unionId
- * @param organizeId 组织Id
- * @return UserLoginVo
- */
- ResponseJson<UserLoginVo> invitationCodeOrganizeLogin(String invitationCode, String nickName, String avatarUrl, String unionId, Integer organizeId);
- /**
- * 运营人员绑定微信
- *
- * @param authBindDto {
- * userId 要绑定的用户Id(userID)
- * mobile 手机号
- * smsCode 手机验证码(verificationCode)
- * unionId 微信unionId
- * nickName 微信昵称
- * avatarUrl 微信头像(headimgurl)
- * }
- * @return OperationPo
- */
- ResponseJson<UserLoginVo> operationBindWeChat(AuthBindDto authBindDto);
- /**
- * 绑定运营人员短信验证
- * @param loginCodeDto{
- * mobile 手机号
- * code 短信验证码
- * }
- * @return
- */
- ResponseJson<String> operateVerification(LoginCodeDto loginCodeDto);
- /**
- * 修改消息
- * @param messageCenter
- * @return
- */
- Integer updateMessageCenter(MessageCenter messageCenter);
- /**
- * 新增消息
- * @param messageCenter
- * @return
- */
- Integer insertMessageCenter(MessageCenter messageCenter);
- List<Integer> getMessageCenterListDay(Integer day);
- }
|