From 8813769d3db7940bb430812751b5613dfa73d34a Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期五, 04 七月 2025 16:11:55 +0800 Subject: [PATCH] 注册头像不写死 --- framework/src/main/java/cn/lili/modules/member/entity/dos/Member.java | 2 +- framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java | 9 ++++++--- framework/src/main/java/cn/lili/modules/connect/serviceimpl/ConnectServiceImpl.java | 3 ++- framework/src/main/java/cn/lili/modules/permission/entity/dos/AdminUser.java | 2 +- framework/src/main/java/cn/lili/modules/member/serviceimpl/MemberServiceImpl.java | 12 ++++++++++-- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/connect/serviceimpl/ConnectServiceImpl.java b/framework/src/main/java/cn/lili/modules/connect/serviceimpl/ConnectServiceImpl.java index e270ab4..f0c599a 100644 --- a/framework/src/main/java/cn/lili/modules/connect/serviceimpl/ConnectServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/connect/serviceimpl/ConnectServiceImpl.java @@ -259,7 +259,8 @@ user.setUsername(UuidUtils.getUUID()); user.setNickName("寰俊鐢ㄦ埛"); user.setPassword(DEFAULT_PASSWORD); - user.setFace("https://i.loli.net/2020/11/19/LyN6JF7zZRskdIe.png"); + user.setFace(""); + user.setDisabled(Boolean.TRUE); memberService.registerHandler(user); } diff --git a/framework/src/main/java/cn/lili/modules/member/entity/dos/Member.java b/framework/src/main/java/cn/lili/modules/member/entity/dos/Member.java index 83bb664..c66c3e2 100644 --- a/framework/src/main/java/cn/lili/modules/member/entity/dos/Member.java +++ b/framework/src/main/java/cn/lili/modules/member/entity/dos/Member.java @@ -72,7 +72,7 @@ @ApiModelProperty(value = "浼氬憳澶村儚") private String face; - @ApiModelProperty(value = "浼氬憳鐘舵��") + @ApiModelProperty(value = "浼氬憳鐘舵�侊細true 琛ㄧず娌¤绂佺敤锛� false 琚鐢�") private Boolean disabled; @ApiModelProperty(value = "鏄惁寮�閫氬簵閾�") diff --git a/framework/src/main/java/cn/lili/modules/member/serviceimpl/MemberServiceImpl.java b/framework/src/main/java/cn/lili/modules/member/serviceimpl/MemberServiceImpl.java index 66493cb..564de14 100644 --- a/framework/src/main/java/cn/lili/modules/member/serviceimpl/MemberServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/member/serviceimpl/MemberServiceImpl.java @@ -46,6 +46,7 @@ import cn.lili.mybatis.util.PageUtil; import cn.lili.rocketmq.RocketmqSendCallbackBuilder; import cn.lili.rocketmq.tags.MemberTagsEnum; +import cn.lili.utils.COSUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; @@ -116,6 +117,9 @@ @Autowired private MemberTagService memberTagService; + + @Autowired + private COSUtil cosUtil; @Override public Member findByUsername(String userName) { @@ -255,7 +259,7 @@ authUser.setNickname(CommonUtil.getSpecialStr("鐢ㄦ埛")); } if (CharSequenceUtil.isEmpty(authUser.getAvatar())) { - authUser.setAvatar("https://i.loli.net/2020/11/19/LyN6JF7zZRskdIe.png"); + authUser.setAvatar(""); } try { // String username = UuidUtils.getUUID(); @@ -799,7 +803,11 @@ @Override public MemberVO getMember(String id) { - return baseMapper.getVoById(id); + MemberVO member = baseMapper.getVoById(id); + if (Objects.nonNull(member)) { + member.setFace(cosUtil.getPreviewUrl(member.getFace())); + } + return member; } @Override diff --git a/framework/src/main/java/cn/lili/modules/permission/entity/dos/AdminUser.java b/framework/src/main/java/cn/lili/modules/permission/entity/dos/AdminUser.java index 92977e0..500f220 100644 --- a/framework/src/main/java/cn/lili/modules/permission/entity/dos/AdminUser.java +++ b/framework/src/main/java/cn/lili/modules/permission/entity/dos/AdminUser.java @@ -41,7 +41,7 @@ private String email; @ApiModelProperty(value = "鐢ㄦ埛澶村儚") - private String avatar = "https://i.loli.net/2020/11/19/LyN6JF7zZRskdIe.png"; + private String avatar = ""; @ApiModelProperty(value = "鏄惁鏄秴绾х鐞嗗憳 瓒呯骇绠$悊鍛�/鏅�氱鐞嗗憳") private Boolean isSuper = false; diff --git a/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java b/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java index 3f8b4dc..2d6693b 100644 --- a/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java @@ -40,6 +40,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.apache.rocketmq.spring.core.RocketMQTemplate; import org.springframework.beans.factory.annotation.Autowired; @@ -97,8 +98,10 @@ private Cache cache; @Override - public IPage<StoreVO> findByConditionPage(StoreSearchParams storeSearchParams, PageVO page) { - return this.baseMapper.getStoreList(PageUtil.initPage(page), storeSearchParams.queryWrapper()); + public IPage<StoreVO> findByConditionPage(StoreSearchParams storeSearchParams, PageVO vo) { + Page<StoreVO> page = PageUtil.initPage(vo); + this.baseMapper.getStoreList(page, storeSearchParams.queryWrapper()); + return page; } @Override @@ -412,4 +415,4 @@ return this.getOne(lambdaQueryWrapper, false); } -} \ No newline at end of file +} -- Gitblit v1.8.0