This commit is contained in:
parent
187a757575
commit
e0b62b66d4
|
|
@ -23,6 +23,8 @@ public class LoginContoller {
|
|||
|
||||
@Autowired
|
||||
LoginService loginService;
|
||||
|
||||
|
||||
@RequestMapping(value = "login",method = RequestMethod.POST)
|
||||
public Result login(@RequestBody LoginReq loginReq, HttpServletRequest request){
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -190,28 +190,28 @@ public class MemberService {
|
|||
}
|
||||
|
||||
|
||||
if ("1".equals(shopInfo.getIsMemberIn())) {
|
||||
if (!map.containsKey("pwd") || ObjectUtil.isEmpty(map.get("pwd"))) {
|
||||
return Result.fail(CodeEnum.PARAM);
|
||||
}
|
||||
String pwd = map.get("pwd").toString();
|
||||
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(pwd.concat(account.getAccount()).concat(account.getId().toString())))) {
|
||||
return Result.fail(CodeEnum.PWDERROE);
|
||||
}
|
||||
}
|
||||
// if ("1".equals(shopInfo.getIsMemberIn())) {
|
||||
// if (!map.containsKey("pwd") || ObjectUtil.isEmpty(map.get("pwd"))) {
|
||||
// return Result.fail(CodeEnum.PARAM);
|
||||
// }
|
||||
// String pwd = map.get("pwd").toString();
|
||||
// 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(pwd.concat(account.getAccount()).concat(account.getId().toString())))) {
|
||||
// return Result.fail(CodeEnum.PWDERROE);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
TbShopUser shopUser = tbShopUserMapper.selectByPrimaryKey(Integer.valueOf(memberId));
|
||||
|
|
|
|||
Loading…
Reference in New Issue