只允许一个登录
This commit is contained in:
parent
5963f18425
commit
944b1102e5
|
|
@ -523,27 +523,27 @@ public class MemberService {
|
|||
|| !map.containsKey("shopId") || ObjectUtil.isEmpty(map.get("shopId"))
|
||||
|| !map.containsKey("memberId") || ObjectUtil.isEmpty(map.get("memberId"))
|
||||
|| !map.containsKey("amount") || ObjectUtil.isEmpty(map.get("amount"))
|
||||
||!map.containsKey("pwd")||ObjectUtil.isEmpty(map.get("pwd"))
|
||||
// ||!map.containsKey("pwd")||ObjectUtil.isEmpty(map.get("pwd"))
|
||||
) {
|
||||
return Result.fail(CodeEnum.PARAM);
|
||||
}
|
||||
|
||||
|
||||
String accountId= TokenUtil.parseParamFromToken(token).getString("accountId");
|
||||
|
||||
TbmerchantAccount account= tbmerchantAccountMapper.selectByPrimaryKey(Integer.valueOf(accountId));
|
||||
if(Objects.isNull(account)){
|
||||
return Result.fail(CodeEnum.ACCOUNTEIXST);
|
||||
}
|
||||
|
||||
|
||||
if(Objects.isNull(account.getPwd())||ObjectUtil.isEmpty(account.getPwd())){
|
||||
return Result.fail(CodeEnum.PWDNOSET);
|
||||
}
|
||||
|
||||
if(!account.getPwd().equals(MD5Util.encrypt(map.get("pwd").toString().concat(account.getAccount()).concat(account.getId().toString())))){
|
||||
return Result.fail(CodeEnum.PWDERROE);
|
||||
}
|
||||
//
|
||||
// String accountId= TokenUtil.parseParamFromToken(token).getString("accountId");
|
||||
//
|
||||
// TbmerchantAccount account= tbmerchantAccountMapper.selectByPrimaryKey(Integer.valueOf(accountId));
|
||||
// if(Objects.isNull(account)){
|
||||
// return Result.fail(CodeEnum.ACCOUNTEIXST);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// if(Objects.isNull(account.getPwd())||ObjectUtil.isEmpty(account.getPwd())){
|
||||
// return Result.fail(CodeEnum.PWDNOSET);
|
||||
// }
|
||||
//
|
||||
// if(!account.getPwd().equals(MD5Util.encrypt(map.get("pwd").toString().concat(account.getAccount()).concat(account.getId().toString())))){
|
||||
// return Result.fail(CodeEnum.PWDERROE);
|
||||
// }
|
||||
|
||||
|
||||
String memberId = String.valueOf(map.get("memberId"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue