多模块重构 5:infra 模块的修改~~~

This commit is contained in:
YunaiV
2022-01-31 17:57:45 +08:00
parent dc11dfc215
commit 9bc9b2ac6b
153 changed files with 1420 additions and 1742 deletions

View File

@ -1,13 +1,13 @@
package cn.iocoder.yudao.module.system.service.user;
import cn.hutool.core.util.RandomUtil;
import cn.iocoder.yudao.coreservice.modules.infra.service.file.InfFileCoreService;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.exception.ServiceException;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils;
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
import cn.iocoder.yudao.framework.common.util.object.ObjectUtils;
import cn.iocoder.yudao.module.infra.api.file.FileApi;
import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdatePasswordReqVO;
import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdateReqVO;
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.*;
@ -63,7 +63,7 @@ public class UserServiceImplTest extends BaseDbUnitTest {
@MockBean
private PasswordEncoder passwordEncoder;
@MockBean
private InfFileCoreService fileService;
private FileApi fileApi;
@Test
public void testCreatUser_success() {
@ -182,7 +182,7 @@ public class UserServiceImplTest extends BaseDbUnitTest {
ByteArrayInputStream avatarFile = new ByteArrayInputStream(avatarFileBytes);
// mock 方法
String avatar = randomString();
when(fileService.createFile(anyString(), eq(avatarFileBytes))).thenReturn(avatar);
when(fileApi.createFile(eq(avatarFileBytes))).thenReturn(avatar);
// 调用
userService.updateUserAvatar(userId, avatarFile);

View File

@ -45,8 +45,7 @@ mybatis:
yudao:
info:
base-package: cn.iocoder.yudao.module.member.dal.mysql
member-package: cn.iocoder.yudao.module.member # TODO 芋艿:要清理掉
system-package: cn.iocoder.yudao.module.system # TODO 芋艿:要清理掉
base-package2: cn.iocoder.yudao.module
core-service:
base-package: cn.iocoder.yudao.module.member.dal.mysql # TODO 芋艿:要清理掉
captcha: