diff --git a/src/main/java/com/subsidy/service/MemberService.java b/src/main/java/com/subsidy/service/MemberService.java index 1bf9cd7..928d371 100644 --- a/src/main/java/com/subsidy/service/MemberService.java +++ b/src/main/java/com/subsidy/service/MemberService.java @@ -16,6 +16,7 @@ import com.subsidy.vo.member.ContentVodNewVO; import com.subsidy.vo.member.GetAllVO; import com.subsidy.vo.member.GetStudyInfoVO; import com.subsidy.vo.member.MemberStudyPageVO; +import com.subsidy.vo.member.MemberVO; import com.subsidy.vo.paper.QueryPapersVO; import java.util.List; @@ -40,7 +41,7 @@ public interface MemberService extends IService { UserRoleVO login(VerifyCodeDTO verifyCodeDTO); - MemberDO passwordLogin(PasswordLoginDTO passwordLoginDTO); + MemberVO passwordLogin(PasswordLoginDTO passwordLoginDTO); String updatePassword(MemberDO memberDO); diff --git a/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java b/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java index 1a22b6e..6834ee4 100644 --- a/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java @@ -47,6 +47,7 @@ import com.subsidy.vo.member.ContentVodVO; import com.subsidy.vo.member.GetAllVO; import com.subsidy.vo.member.GetStudyInfoVO; import com.subsidy.vo.member.MemberStudyPageVO; +import com.subsidy.vo.member.MemberVO; import com.subsidy.vo.member.MemberVodVO; import com.subsidy.vo.member.StudyPageVO; import com.subsidy.vo.paper.QueryPapersVO; @@ -300,7 +301,7 @@ public class MemberServiceImpl extends ServiceImpl imple return userRoleVO; } - public MemberDO passwordLogin(PasswordLoginDTO passwordLoginDTO) { + public MemberVO passwordLogin(PasswordLoginDTO passwordLoginDTO) { /** * 先从redis里查 */ @@ -319,13 +320,15 @@ public class MemberServiceImpl extends ServiceImpl imple } if (memberDO.getPassword().equals(passwordLoginDTO.getPassword())&&1==memberDO.getFirstLogin()&&"冻结".equals(memberDO.getStatus())){ + MemberVO memberVO = new MemberVO(); + BeanUtils.copyProperties(memberDO, memberVO); OprMemDictDO oprMemDictDO = new OprMemDictDO(); oprMemDictDO.setUserId(memberDO.getId()); oprMemDictDO.setOprType("登录"); oprMemDictDO.setResult(1); oprMemDictDO.setCreateDate(LocalDateTime.now()); redisUtil.set(RedisPrefixConstant.SUBSIDY_MEMBER_LOGIN_PREFIX + memberDO.getId() + "_" + System.currentTimeMillis(), 1); - return memberDO; + return memberVO; }else { if (!memberDO.getPassword().equals(passwordLoginDTO.getPassword())) { OprMemDictDO oprMemDictDO = new OprMemDictDO(); diff --git a/src/main/java/com/subsidy/vo/member/MemberVO.java b/src/main/java/com/subsidy/vo/member/MemberVO.java new file mode 100644 index 0000000..79ac09c --- /dev/null +++ b/src/main/java/com/subsidy/vo/member/MemberVO.java @@ -0,0 +1,19 @@ +package com.subsidy.vo.member; + +import lombok.Data; + +@Data +public class MemberVO { + + private Long id; + + private String gender; + + private String telephone; + + private String userName; + + private String image; + + private Integer firstLogin; +}