- 后端:User 模块,service 如果逻辑有问题,抛出异常
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package cn.iocoder.mall.user.api;
|
||||
|
||||
import cn.iocoder.common.framework.exception.ServiceException;
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
|
||||
public interface MobileCodeService {
|
||||
|
||||
@@ -10,6 +9,6 @@ public interface MobileCodeService {
|
||||
*
|
||||
* @param mobile 手机号
|
||||
*/
|
||||
CommonResult<Void> send(String mobile) throws ServiceException;
|
||||
void send(String mobile) throws ServiceException;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package cn.iocoder.mall.user.api;
|
||||
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.user.api.bo.OAuth2AccessTokenBO;
|
||||
import cn.iocoder.mall.user.api.bo.OAuth2AuthenticationBO;
|
||||
|
||||
public interface OAuth2Service {
|
||||
|
||||
CommonResult<OAuth2AccessTokenBO> getAccessToken(String mobile, String code);
|
||||
OAuth2AccessTokenBO getAccessToken(String mobile, String code);
|
||||
|
||||
/**
|
||||
* 校验访问令牌,获取身份信息( 不包括 accessToken 等等 )
|
||||
@@ -15,9 +14,9 @@ public interface OAuth2Service {
|
||||
* @param accessToken 访问令牌
|
||||
* @return 授权信息
|
||||
*/
|
||||
CommonResult<OAuth2AuthenticationBO> checkToken(String accessToken);
|
||||
OAuth2AuthenticationBO checkToken(String accessToken);
|
||||
|
||||
CommonResult<OAuth2AccessTokenBO> refreshToken(String refreshToken);
|
||||
OAuth2AccessTokenBO refreshToken(String refreshToken);
|
||||
|
||||
// TODO @see 移除 token
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package cn.iocoder.mall.user.api;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.user.api.dto.UserAccessLogAddDTO;
|
||||
|
||||
public interface UserAccessLogService {
|
||||
|
||||
CommonResult<Boolean> addUserAccessLog(UserAccessLogAddDTO userAccessLogAddDTO);
|
||||
void addUserAccessLog(UserAccessLogAddDTO userAccessLogAddDTO);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package cn.iocoder.mall.user.api;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.common.framework.constant.CommonStatusEnum;
|
||||
import cn.iocoder.common.framework.validator.InEnum;
|
||||
import cn.iocoder.mall.user.api.bo.UserBO;
|
||||
import cn.iocoder.mall.user.api.bo.UserPageBO;
|
||||
import cn.iocoder.mall.user.api.dto.UserPageDTO;
|
||||
@@ -8,9 +9,9 @@ import cn.iocoder.mall.user.api.dto.UserUpdateDTO;
|
||||
|
||||
public interface UserService {
|
||||
|
||||
CommonResult<UserPageBO> getUserPage(UserPageDTO userPageDTO);
|
||||
UserPageBO getUserPage(UserPageDTO userPageDTO);
|
||||
|
||||
CommonResult<UserBO> getUser(Integer userId);
|
||||
UserBO getUser(Integer userId);
|
||||
|
||||
/**
|
||||
* 更新用户基本信息
|
||||
@@ -18,7 +19,7 @@ public interface UserService {
|
||||
* @param userUpdateDTO 更新 DTO
|
||||
* @return 更新结果
|
||||
*/
|
||||
CommonResult<Boolean> updateUser(UserUpdateDTO userUpdateDTO);
|
||||
Boolean updateUser(UserUpdateDTO userUpdateDTO);
|
||||
|
||||
/**
|
||||
* 更新用户状态
|
||||
@@ -27,7 +28,8 @@ public interface UserService {
|
||||
* @param status 状态
|
||||
* @return 更新结果
|
||||
*/
|
||||
CommonResult<Boolean> updateUserStatus(Integer userId, Integer status);
|
||||
Boolean updateUserStatus(Integer userId,
|
||||
@InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") Integer status);
|
||||
|
||||
/**
|
||||
* 更新用户手机号
|
||||
@@ -36,6 +38,6 @@ public interface UserService {
|
||||
* @param mobile 手机号
|
||||
* @return 更新结果
|
||||
*/
|
||||
CommonResult<Boolean> updateUserMobile(Integer userId, String mobile);
|
||||
Boolean updateUserMobile(Integer userId, String mobile);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user