Commit 9ba5b0d1 by 邓敏

passwordLogin接口字段优化

1 parent ff37f499
...@@ -16,6 +16,7 @@ import com.subsidy.vo.member.ContentVodNewVO; ...@@ -16,6 +16,7 @@ import com.subsidy.vo.member.ContentVodNewVO;
import com.subsidy.vo.member.GetAllVO; import com.subsidy.vo.member.GetAllVO;
import com.subsidy.vo.member.GetStudyInfoVO; import com.subsidy.vo.member.GetStudyInfoVO;
import com.subsidy.vo.member.MemberStudyPageVO; import com.subsidy.vo.member.MemberStudyPageVO;
import com.subsidy.vo.member.MemberVO;
import com.subsidy.vo.paper.QueryPapersVO; import com.subsidy.vo.paper.QueryPapersVO;
import java.util.List; import java.util.List;
...@@ -40,7 +41,7 @@ public interface MemberService extends IService<MemberDO> { ...@@ -40,7 +41,7 @@ public interface MemberService extends IService<MemberDO> {
UserRoleVO login(VerifyCodeDTO verifyCodeDTO); UserRoleVO login(VerifyCodeDTO verifyCodeDTO);
MemberDO passwordLogin(PasswordLoginDTO passwordLoginDTO); MemberVO passwordLogin(PasswordLoginDTO passwordLoginDTO);
String updatePassword(MemberDO memberDO); String updatePassword(MemberDO memberDO);
......
...@@ -47,6 +47,7 @@ import com.subsidy.vo.member.ContentVodVO; ...@@ -47,6 +47,7 @@ import com.subsidy.vo.member.ContentVodVO;
import com.subsidy.vo.member.GetAllVO; import com.subsidy.vo.member.GetAllVO;
import com.subsidy.vo.member.GetStudyInfoVO; import com.subsidy.vo.member.GetStudyInfoVO;
import com.subsidy.vo.member.MemberStudyPageVO; import com.subsidy.vo.member.MemberStudyPageVO;
import com.subsidy.vo.member.MemberVO;
import com.subsidy.vo.member.MemberVodVO; import com.subsidy.vo.member.MemberVodVO;
import com.subsidy.vo.member.StudyPageVO; import com.subsidy.vo.member.StudyPageVO;
import com.subsidy.vo.paper.QueryPapersVO; import com.subsidy.vo.paper.QueryPapersVO;
...@@ -300,7 +301,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -300,7 +301,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
return userRoleVO; return userRoleVO;
} }
public MemberDO passwordLogin(PasswordLoginDTO passwordLoginDTO) { public MemberVO passwordLogin(PasswordLoginDTO passwordLoginDTO) {
/** /**
* 先从redis里查 * 先从redis里查
*/ */
...@@ -319,13 +320,15 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -319,13 +320,15 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
} }
if (memberDO.getPassword().equals(passwordLoginDTO.getPassword())&&1==memberDO.getFirstLogin()&&"冻结".equals(memberDO.getStatus())){ 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 oprMemDictDO = new OprMemDictDO();
oprMemDictDO.setUserId(memberDO.getId()); oprMemDictDO.setUserId(memberDO.getId());
oprMemDictDO.setOprType("登录"); oprMemDictDO.setOprType("登录");
oprMemDictDO.setResult(1); oprMemDictDO.setResult(1);
oprMemDictDO.setCreateDate(LocalDateTime.now()); oprMemDictDO.setCreateDate(LocalDateTime.now());
redisUtil.set(RedisPrefixConstant.SUBSIDY_MEMBER_LOGIN_PREFIX + memberDO.getId() + "_" + System.currentTimeMillis(), 1); redisUtil.set(RedisPrefixConstant.SUBSIDY_MEMBER_LOGIN_PREFIX + memberDO.getId() + "_" + System.currentTimeMillis(), 1);
return memberDO; return memberVO;
}else { }else {
if (!memberDO.getPassword().equals(passwordLoginDTO.getPassword())) { if (!memberDO.getPassword().equals(passwordLoginDTO.getPassword())) {
OprMemDictDO oprMemDictDO = new OprMemDictDO(); OprMemDictDO oprMemDictDO = new OprMemDictDO();
......
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;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!