fix: 修复问题

This commit is contained in:
2026-02-23 14:53:19 +08:00
parent af23c8779e
commit 7a4175802f
4 changed files with 40 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
package cn.iocoder.yudao.module.tik.muye.memberuserprofile.controller.app;
package cn.iocoder.yudao.module.tik.member;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
@@ -15,13 +15,13 @@ import org.springframework.web.bind.annotation.RestController;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
/**
* 用户 APP - 会员档案
* 用户 App - 会员档案
*/
@Tag(name = "用户 APP - 会员档案")
@Tag(name = "用户 App - 会员档案")
@RestController
@RequestMapping("/api/tik/muye/member-profile")
@RequestMapping("/api/tik/member-profile")
@Validated
public class AppMemberUserProfileController {
public class AppMemberProfileController {
@Resource
private MemberUserProfileService memberUserProfileService;

View File

@@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.tik.muye.memberuserprofile.service;
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
import cn.iocoder.yudao.module.tik.muye.memberuserprofile.dal.MemberUserProfileDO;
import cn.iocoder.yudao.module.tik.muye.memberuserprofile.mapper.MemberUserProfileMapper;
import cn.iocoder.yudao.module.tik.muye.memberuserprofile.vo.MemberUserProfilePageReqVO;
@@ -29,6 +31,9 @@ public class MemberUserProfileServiceImpl implements MemberUserProfileService {
@Resource
private MemberUserProfileMapper memberUserProfileMapper;
@Resource
private MemberUserApi memberUserApi;
@Override
public Long createMemberUserProfile(MemberUserProfileSaveReqVO createReqVO) {
// 插入
@@ -88,6 +93,13 @@ public class MemberUserProfileServiceImpl implements MemberUserProfileService {
// 2. 创建新档案
profile = new MemberUserProfileDO();
profile.setUserId(String.valueOf(userId));
// 获取用户手机号
MemberUserRespDTO user = memberUserApi.getUser(userId);
if (user != null) {
profile.setMobile(user.getMobile());
} else {
profile.setMobile("");
}
profile.setRegisterTime(LocalDateTime.now());
profile.setLastLoginTime(LocalDateTime.now());
profile.setTotalPoints(0);