mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-25 00:15:06 +08:00
MALL-KEFU: 新增客服相关操作接口
This commit is contained in:
@ -57,4 +57,12 @@ public interface MemberUserApi {
|
||||
* @return 用户信息
|
||||
*/
|
||||
MemberUserRespDTO getUserByMobile(String mobile);
|
||||
|
||||
/**
|
||||
* 校验用户是否存在
|
||||
*
|
||||
* @param id 用户编号
|
||||
*/
|
||||
void validateUser(Long id);
|
||||
|
||||
}
|
||||
|
@ -11,6 +11,9 @@ import jakarta.annotation.Resource;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.USER_MOBILE_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 会员用户的 API 实现类
|
||||
*
|
||||
@ -44,4 +47,12 @@ public class MemberUserApiImpl implements MemberUserApi {
|
||||
return MemberUserConvert.INSTANCE.convert2(userService.getUserByMobile(mobile));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validateUser(Long id) {
|
||||
MemberUserDO user = userService.getUser(id);
|
||||
if (user == null) {
|
||||
throw exception(USER_MOBILE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user