From 9148170926bc2f041597802390dba14d8f9ecaec Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 2 Sep 2023 19:23:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=20mapper=20=E5=91=BD?= =?UTF-8?q?=E5=90=8D=EF=BC=8C=E9=81=BF=E5=85=8D=E5=8F=AF=E8=83=BD=E7=9A=84?= =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ssMapper.java => MemberAddressMapper.java} | 2 +- .../service/address/AddressServiceImpl.java | 24 +++++++++---------- .../service/group/MemberGroupServiceImpl.java | 18 +++++++------- .../service/level/MemberLevelServiceImpl.java | 20 ++++++++-------- .../point/MemberPointConfigServiceImpl.java | 8 +++---- .../point/MemberPointRecordServiceImpl.java | 8 +++---- .../signin/MemberSignInConfigServiceImpl.java | 18 +++++++------- .../signin/MemberSignInRecordServiceImpl.java | 6 ++--- .../service/tag/MemberTagServiceImpl.java | 20 ++++++++-------- .../address/AddressServiceImplTest.java | 4 ++-- 10 files changed, 64 insertions(+), 64 deletions(-) rename yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/address/{AddressMapper.java => MemberAddressMapper.java} (91%) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/address/AddressMapper.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/address/MemberAddressMapper.java similarity index 91% rename from yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/address/AddressMapper.java rename to yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/address/MemberAddressMapper.java index db824f6f5..3df68c51a 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/address/AddressMapper.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/address/MemberAddressMapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Mapper; import java.util.List; @Mapper -public interface AddressMapper extends BaseMapperX { +public interface MemberAddressMapper extends BaseMapperX { default MemberAddressDO selectByIdAndUserId(Long id, Long userId) { return selectOne(MemberAddressDO::getId, id, MemberAddressDO::getUserId, userId); diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/address/AddressServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/address/AddressServiceImpl.java index 2689177ea..901f1b340 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/address/AddressServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/address/AddressServiceImpl.java @@ -5,7 +5,7 @@ import cn.iocoder.yudao.module.member.controller.app.address.vo.AppAddressCreate import cn.iocoder.yudao.module.member.controller.app.address.vo.AppAddressUpdateReqVO; import cn.iocoder.yudao.module.member.convert.address.AddressConvert; import cn.iocoder.yudao.module.member.dal.dataobject.address.MemberAddressDO; -import cn.iocoder.yudao.module.member.dal.mysql.address.AddressMapper; +import cn.iocoder.yudao.module.member.dal.mysql.address.MemberAddressMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; @@ -26,21 +26,21 @@ import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.ADDRESS_NO public class AddressServiceImpl implements AddressService { @Resource - private AddressMapper addressMapper; + private MemberAddressMapper memberAddressMapper; @Override @Transactional(rollbackFor = Exception.class) public Long createAddress(Long userId, AppAddressCreateReqVO createReqVO) { // 如果添加的是默认收件地址,则将原默认地址修改为非默认 if (Boolean.TRUE.equals(createReqVO.getDefaultStatus())) { - List addresses = addressMapper.selectListByUserIdAndDefaulted(userId, true); - addresses.forEach(address -> addressMapper.updateById(new MemberAddressDO().setId(address.getId()).setDefaultStatus(false))); + List addresses = memberAddressMapper.selectListByUserIdAndDefaulted(userId, true); + addresses.forEach(address -> memberAddressMapper.updateById(new MemberAddressDO().setId(address.getId()).setDefaultStatus(false))); } // 插入 MemberAddressDO address = AddressConvert.INSTANCE.convert(createReqVO); address.setUserId(userId); - addressMapper.insert(address); + memberAddressMapper.insert(address); // 返回 return address.getId(); } @@ -53,14 +53,14 @@ public class AddressServiceImpl implements AddressService { // 如果修改的是默认收件地址,则将原默认地址修改为非默认 if (Boolean.TRUE.equals(updateReqVO.getDefaultStatus())) { - List addresses = addressMapper.selectListByUserIdAndDefaulted(userId, true); + List addresses = memberAddressMapper.selectListByUserIdAndDefaulted(userId, true); addresses.stream().filter(u -> !u.getId().equals(updateReqVO.getId())) // 排除自己 - .forEach(address -> addressMapper.updateById(new MemberAddressDO().setId(address.getId()).setDefaultStatus(false))); + .forEach(address -> memberAddressMapper.updateById(new MemberAddressDO().setId(address.getId()).setDefaultStatus(false))); } // 更新 MemberAddressDO updateObj = AddressConvert.INSTANCE.convert(updateReqVO); - addressMapper.updateById(updateObj); + memberAddressMapper.updateById(updateObj); } @Override @@ -68,7 +68,7 @@ public class AddressServiceImpl implements AddressService { // 校验存在,校验是否能够操作 validAddressExists(userId, id); // 删除 - addressMapper.deleteById(id); + memberAddressMapper.deleteById(id); } private void validAddressExists(Long userId, Long id) { @@ -80,17 +80,17 @@ public class AddressServiceImpl implements AddressService { @Override public MemberAddressDO getAddress(Long userId, Long id) { - return addressMapper.selectByIdAndUserId(id, userId); + return memberAddressMapper.selectByIdAndUserId(id, userId); } @Override public List getAddressList(Long userId) { - return addressMapper.selectListByUserIdAndDefaulted(userId, null); + return memberAddressMapper.selectListByUserIdAndDefaulted(userId, null); } @Override public MemberAddressDO getDefaultUserAddress(Long userId) { - List addresses = addressMapper.selectListByUserIdAndDefaulted(userId, true); + List addresses = memberAddressMapper.selectListByUserIdAndDefaulted(userId, true); return CollUtil.getFirst(addresses); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/group/MemberGroupServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/group/MemberGroupServiceImpl.java index 98ec3cc85..c7b09108f 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/group/MemberGroupServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/group/MemberGroupServiceImpl.java @@ -31,7 +31,7 @@ import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.GROUP_NOT_ public class MemberGroupServiceImpl implements MemberGroupService { @Resource - private MemberGroupMapper groupMapper; + private MemberGroupMapper memberGroupMapper; @Resource private MemberUserService memberUserService; @@ -39,7 +39,7 @@ public class MemberGroupServiceImpl implements MemberGroupService { public Long createGroup(MemberGroupCreateReqVO createReqVO) { // 插入 MemberGroupDO group = MemberGroupConvert.INSTANCE.convert(createReqVO); - groupMapper.insert(group); + memberGroupMapper.insert(group); // 返回 return group.getId(); } @@ -50,7 +50,7 @@ public class MemberGroupServiceImpl implements MemberGroupService { validateGroupExists(updateReqVO.getId()); // 更新 MemberGroupDO updateObj = MemberGroupConvert.INSTANCE.convert(updateReqVO); - groupMapper.updateById(updateObj); + memberGroupMapper.updateById(updateObj); } @Override @@ -60,11 +60,11 @@ public class MemberGroupServiceImpl implements MemberGroupService { // 校验分组下是否有用户 validateGroupHasUser(id); // 删除 - groupMapper.deleteById(id); + memberGroupMapper.deleteById(id); } void validateGroupExists(Long id) { - if (groupMapper.selectById(id) == null) { + if (memberGroupMapper.selectById(id) == null) { throw exception(GROUP_NOT_EXISTS); } } @@ -78,7 +78,7 @@ public class MemberGroupServiceImpl implements MemberGroupService { @Override public MemberGroupDO getGroup(Long id) { - return groupMapper.selectById(id); + return memberGroupMapper.selectById(id); } @Override @@ -86,17 +86,17 @@ public class MemberGroupServiceImpl implements MemberGroupService { if (CollUtil.isEmpty(ids)) { return ListUtil.empty(); } - return groupMapper.selectBatchIds(ids); + return memberGroupMapper.selectBatchIds(ids); } @Override public PageResult getGroupPage(MemberGroupPageReqVO pageReqVO) { - return groupMapper.selectPage(pageReqVO); + return memberGroupMapper.selectPage(pageReqVO); } @Override public List getGroupListByStatus(Integer status) { - return groupMapper.selectListByStatus(status); + return memberGroupMapper.selectListByStatus(status); } } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/level/MemberLevelServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/level/MemberLevelServiceImpl.java index 2868d0826..26505faa5 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/level/MemberLevelServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/level/MemberLevelServiceImpl.java @@ -42,7 +42,7 @@ import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.*; public class MemberLevelServiceImpl implements MemberLevelService { @Resource - private MemberLevelMapper levelMapper; + private MemberLevelMapper memberLevelMapper; @Resource private MemberLevelRecordService memberLevelRecordService; @Resource @@ -57,7 +57,7 @@ public class MemberLevelServiceImpl implements MemberLevelService { // 插入 MemberLevelDO level = MemberLevelConvert.INSTANCE.convert(createReqVO); - levelMapper.insert(level); + memberLevelMapper.insert(level); // 返回 return level.getId(); } @@ -71,7 +71,7 @@ public class MemberLevelServiceImpl implements MemberLevelService { // 更新 MemberLevelDO updateObj = MemberLevelConvert.INSTANCE.convert(updateReqVO); - levelMapper.updateById(updateObj); + memberLevelMapper.updateById(updateObj); } @Override @@ -81,12 +81,12 @@ public class MemberLevelServiceImpl implements MemberLevelService { // 校验分组下是否有用户 validateLevelHasUser(id); // 删除 - levelMapper.deleteById(id); + memberLevelMapper.deleteById(id); } @VisibleForTesting MemberLevelDO validateLevelExists(Long id) { - MemberLevelDO levelDO = levelMapper.selectById(id); + MemberLevelDO levelDO = memberLevelMapper.selectById(id); if (levelDO == null) { throw exception(LEVEL_NOT_EXISTS); } @@ -141,7 +141,7 @@ public class MemberLevelServiceImpl implements MemberLevelService { @VisibleForTesting void validateConfigValid(Long id, String name, Integer level, Integer experience) { - List list = levelMapper.selectList(); + List list = memberLevelMapper.selectList(); // 校验名称唯一 validateNameUnique(list, id, name); // 校验等级唯一 @@ -160,7 +160,7 @@ public class MemberLevelServiceImpl implements MemberLevelService { @Override public MemberLevelDO getLevel(Long id) { - return id != null && id > 0 ? levelMapper.selectById(id) : null; + return id != null && id > 0 ? memberLevelMapper.selectById(id) : null; } @Override @@ -168,17 +168,17 @@ public class MemberLevelServiceImpl implements MemberLevelService { if (CollUtil.isEmpty(ids)) { return Collections.emptyList(); } - return levelMapper.selectBatchIds(ids); + return memberLevelMapper.selectBatchIds(ids); } @Override public List getLevelList(MemberLevelListReqVO listReqVO) { - return levelMapper.selectList(listReqVO); + return memberLevelMapper.selectList(listReqVO); } @Override public List getLevelListByStatus(Integer status) { - return levelMapper.selectListByStatus(status); + return memberLevelMapper.selectListByStatus(status); } @Override diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointConfigServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointConfigServiceImpl.java index feb2aba86..f148097f1 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointConfigServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointConfigServiceImpl.java @@ -21,23 +21,23 @@ import java.util.List; public class MemberPointConfigServiceImpl implements MemberPointConfigService { @Resource - private MemberPointConfigMapper pointConfigMapper; + private MemberPointConfigMapper memberPointConfigMapper; @Override public void savePointConfig(MemberPointConfigSaveReqVO saveReqVO) { // 存在,则进行更新 MemberPointConfigDO dbConfig = getPointConfig(); if (dbConfig != null) { - pointConfigMapper.updateById(MemberPointConfigConvert.INSTANCE.convert(saveReqVO).setId(dbConfig.getId())); + memberPointConfigMapper.updateById(MemberPointConfigConvert.INSTANCE.convert(saveReqVO).setId(dbConfig.getId())); return; } // 不存在,则进行插入 - pointConfigMapper.insert(MemberPointConfigConvert.INSTANCE.convert(saveReqVO)); + memberPointConfigMapper.insert(MemberPointConfigConvert.INSTANCE.convert(saveReqVO)); } @Override public MemberPointConfigDO getPointConfig() { - List list = pointConfigMapper.selectList(); + List list = memberPointConfigMapper.selectList(); return CollectionUtils.getFirst(list); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointRecordServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointRecordServiceImpl.java index 8801ef33d..a28e94795 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointRecordServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointRecordServiceImpl.java @@ -35,7 +35,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. public class MemberPointRecordServiceImpl implements MemberPointRecordService { @Resource - private MemberPointRecordMapper recordMapper; + private MemberPointRecordMapper memberPointRecordMapper; @Resource private MemberPointConfigService memberPointConfigService; @@ -55,12 +55,12 @@ public class MemberPointRecordServiceImpl implements MemberPointRecordService { userIds = convertSet(users, MemberUserDO::getId); } // 执行查询 - return recordMapper.selectPage(pageReqVO, userIds); + return memberPointRecordMapper.selectPage(pageReqVO, userIds); } @Override public PageResult getPointRecordPage(Long userId, PageParam pageVO) { - return recordMapper.selectPage(userId, pageVO); + return memberPointRecordMapper.selectPage(userId, pageVO); } @Override @@ -86,7 +86,7 @@ public class MemberPointRecordServiceImpl implements MemberPointRecordService { .setUserId(userId).setBizId(bizId).setBizType(bizType.getType()) .setTitle(bizType.getName()).setDescription(StrUtil.format(bizType.getDescription(), point)) .setPoint(point).setTotalPoint(totalPoint); - recordMapper.insert(record); + memberPointRecordMapper.insert(record); // 3. 更新用户积分 memberUserService.updateUserPoint(userId, totalPoint); diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInConfigServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInConfigServiceImpl.java index 87464e081..52f01d98e 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInConfigServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInConfigServiceImpl.java @@ -26,7 +26,7 @@ import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.SIGN_IN_CO public class MemberSignInConfigServiceImpl implements MemberSignInConfigService { @Resource - private MemberSignInConfigMapper signInConfigMapper; + private MemberSignInConfigMapper memberSignInConfigMapper; @Override public Long createSignInConfig(MemberSignInConfigCreateReqVO createReqVO) { @@ -35,7 +35,7 @@ public class MemberSignInConfigServiceImpl implements MemberSignInConfigService // 插入 MemberSignInConfigDO signInConfig = MemberSignInConfigConvert.INSTANCE.convert(createReqVO); - signInConfigMapper.insert(signInConfig); + memberSignInConfigMapper.insert(signInConfig); // 返回 return signInConfig.getId(); } @@ -49,7 +49,7 @@ public class MemberSignInConfigServiceImpl implements MemberSignInConfigService // 判断更新 MemberSignInConfigDO updateObj = MemberSignInConfigConvert.INSTANCE.convert(updateReqVO); - signInConfigMapper.updateById(updateObj); + memberSignInConfigMapper.updateById(updateObj); } @Override @@ -57,11 +57,11 @@ public class MemberSignInConfigServiceImpl implements MemberSignInConfigService // 校验存在 validateSignInConfigExists(id); // 删除 - signInConfigMapper.deleteById(id); + memberSignInConfigMapper.deleteById(id); } private void validateSignInConfigExists(Long id) { - if (signInConfigMapper.selectById(id) == null) { + if (memberSignInConfigMapper.selectById(id) == null) { throw exception(SIGN_IN_CONFIG_NOT_EXISTS); } } @@ -73,7 +73,7 @@ public class MemberSignInConfigServiceImpl implements MemberSignInConfigService * @param id 编号,只有更新的时候会传递 */ private void validateSignInConfigDayDuplicate(Integer day, Long id) { - MemberSignInConfigDO config = signInConfigMapper.selectByDay(day); + MemberSignInConfigDO config = memberSignInConfigMapper.selectByDay(day); // 1. 新增时,config 非空,则说明重复 if (id == null && config != null) { throw exception(SIGN_IN_CONFIG_EXISTS); @@ -86,19 +86,19 @@ public class MemberSignInConfigServiceImpl implements MemberSignInConfigService @Override public MemberSignInConfigDO getSignInConfig(Long id) { - return signInConfigMapper.selectById(id); + return memberSignInConfigMapper.selectById(id); } @Override public List getSignInConfigList() { - List list = signInConfigMapper.selectList(); + List list = memberSignInConfigMapper.selectList(); list.sort(Comparator.comparing(MemberSignInConfigDO::getDay)); return list; } @Override public List getSignInConfigList(Integer status) { - List list = signInConfigMapper.selectListByStatus(status); + List list = memberSignInConfigMapper.selectListByStatus(status); list.sort(Comparator.comparing(MemberSignInConfigDO::getDay)); return list; } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java index 63c8e9b31..76589d67f 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java @@ -28,7 +28,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. public class MemberSignInRecordServiceImpl implements MemberSignInRecordService { @Resource - private MemberSignInRecordMapper signInRecordMapper; + private MemberSignInRecordMapper memberSignInRecordMapper; @Resource private MemberUserApi memberUserApi; @@ -46,12 +46,12 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService userIds = convertSet(users, MemberUserRespDTO::getId); } // 分页查询 - return signInRecordMapper.selectPage(pageReqVO, userIds); + return memberSignInRecordMapper.selectPage(pageReqVO, userIds); } @Override public PageResult getSignRecordPage(Long userId, PageParam pageParam) { - return signInRecordMapper.selectPage(userId, pageParam); + return memberSignInRecordMapper.selectPage(userId, pageParam); } } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/tag/MemberTagServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/tag/MemberTagServiceImpl.java index d176bcabb..60a603808 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/tag/MemberTagServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/tag/MemberTagServiceImpl.java @@ -31,7 +31,7 @@ import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.*; public class MemberTagServiceImpl implements MemberTagService { @Resource - private MemberTagMapper tagMapper; + private MemberTagMapper memberTagMapper; @Resource private MemberUserService memberUserService; @@ -41,7 +41,7 @@ public class MemberTagServiceImpl implements MemberTagService { validateTagNameUnique(null, createReqVO.getName()); // 插入 MemberTagDO tag = MemberTagConvert.INSTANCE.convert(createReqVO); - tagMapper.insert(tag); + memberTagMapper.insert(tag); // 返回 return tag.getId(); } @@ -54,7 +54,7 @@ public class MemberTagServiceImpl implements MemberTagService { validateTagNameUnique(updateReqVO.getId(), updateReqVO.getName()); // 更新 MemberTagDO updateObj = MemberTagConvert.INSTANCE.convert(updateReqVO); - tagMapper.updateById(updateObj); + memberTagMapper.updateById(updateObj); } @Override @@ -64,11 +64,11 @@ public class MemberTagServiceImpl implements MemberTagService { // 校验标签下是否有用户 validateTagHasUser(id); // 删除 - tagMapper.deleteById(id); + memberTagMapper.deleteById(id); } private void validateTagExists(Long id) { - if (tagMapper.selectById(id) == null) { + if (memberTagMapper.selectById(id) == null) { throw exception(TAG_NOT_EXISTS); } } @@ -77,7 +77,7 @@ public class MemberTagServiceImpl implements MemberTagService { if (StrUtil.isBlank(name)) { return; } - MemberTagDO tag = tagMapper.selelctByName(name); + MemberTagDO tag = memberTagMapper.selelctByName(name); if (tag == null) { return; } @@ -100,7 +100,7 @@ public class MemberTagServiceImpl implements MemberTagService { @Override public MemberTagDO getTag(Long id) { - return tagMapper.selectById(id); + return memberTagMapper.selectById(id); } @Override @@ -108,17 +108,17 @@ public class MemberTagServiceImpl implements MemberTagService { if (CollUtil.isEmpty(ids)) { return ListUtil.empty(); } - return tagMapper.selectBatchIds(ids); + return memberTagMapper.selectBatchIds(ids); } @Override public PageResult getTagPage(MemberTagPageReqVO pageReqVO) { - return tagMapper.selectPage(pageReqVO); + return memberTagMapper.selectPage(pageReqVO); } @Override public List getTagList() { - return tagMapper.selectList(); + return memberTagMapper.selectList(); } } diff --git a/yudao-module-member/yudao-module-member-biz/src/test/java/cn/iocoder/yudao/module/member/service/address/AddressServiceImplTest.java b/yudao-module-member/yudao-module-member-biz/src/test/java/cn/iocoder/yudao/module/member/service/address/AddressServiceImplTest.java index c25b76ca6..e4337f2c9 100644 --- a/yudao-module-member/yudao-module-member-biz/src/test/java/cn/iocoder/yudao/module/member/service/address/AddressServiceImplTest.java +++ b/yudao-module-member/yudao-module-member-biz/src/test/java/cn/iocoder/yudao/module/member/service/address/AddressServiceImplTest.java @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; import cn.iocoder.yudao.module.member.controller.app.address.vo.AppAddressCreateReqVO; import cn.iocoder.yudao.module.member.controller.app.address.vo.AppAddressUpdateReqVO; import cn.iocoder.yudao.module.member.dal.dataobject.address.MemberAddressDO; -import cn.iocoder.yudao.module.member.dal.mysql.address.AddressMapper; +import cn.iocoder.yudao.module.member.dal.mysql.address.MemberAddressMapper; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; @@ -30,7 +30,7 @@ public class AddressServiceImplTest extends BaseDbUnitTest { private AddressServiceImpl addressService; @Resource - private AddressMapper addressMapper; + private MemberAddressMapper addressMapper; @Test public void testCreateAddress_success() {