修改
This commit is contained in:
@@ -23,6 +23,8 @@ public class LoginContoller {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
LoginService loginService;
|
LoginService loginService;
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "login",method = RequestMethod.POST)
|
@RequestMapping(value = "login",method = RequestMethod.POST)
|
||||||
public Result login(@RequestBody LoginReq loginReq, HttpServletRequest request){
|
public Result login(@RequestBody LoginReq loginReq, HttpServletRequest request){
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -190,28 +190,28 @@ public class MemberService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ("1".equals(shopInfo.getIsMemberIn())) {
|
// if ("1".equals(shopInfo.getIsMemberIn())) {
|
||||||
if (!map.containsKey("pwd") || ObjectUtil.isEmpty(map.get("pwd"))) {
|
// if (!map.containsKey("pwd") || ObjectUtil.isEmpty(map.get("pwd"))) {
|
||||||
return Result.fail(CodeEnum.PARAM);
|
// return Result.fail(CodeEnum.PARAM);
|
||||||
}
|
// }
|
||||||
String pwd = map.get("pwd").toString();
|
// String pwd = map.get("pwd").toString();
|
||||||
String accountId = TokenUtil.parseParamFromToken(token).getString("accountId");
|
// String accountId = TokenUtil.parseParamFromToken(token).getString("accountId");
|
||||||
|
//
|
||||||
|
//
|
||||||
TbmerchantAccount account = tbmerchantAccountMapper.selectByPrimaryKey(Integer.valueOf(accountId));
|
// TbmerchantAccount account = tbmerchantAccountMapper.selectByPrimaryKey(Integer.valueOf(accountId));
|
||||||
if (Objects.isNull(account)) {
|
// if (Objects.isNull(account)) {
|
||||||
return Result.fail(CodeEnum.ACCOUNTEIXST);
|
// return Result.fail(CodeEnum.ACCOUNTEIXST);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
if (Objects.isNull(account.getPwd()) || ObjectUtil.isEmpty(account.getPwd())) {
|
// if (Objects.isNull(account.getPwd()) || ObjectUtil.isEmpty(account.getPwd())) {
|
||||||
return Result.fail(CodeEnum.PWDNOSET);
|
// return Result.fail(CodeEnum.PWDNOSET);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (!account.getPwd().equals(MD5Util.encrypt(pwd.concat(account.getAccount()).concat(account.getId().toString())))) {
|
// if (!account.getPwd().equals(MD5Util.encrypt(pwd.concat(account.getAccount()).concat(account.getId().toString())))) {
|
||||||
return Result.fail(CodeEnum.PWDERROE);
|
// return Result.fail(CodeEnum.PWDERROE);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
TbShopUser shopUser = tbShopUserMapper.selectByPrimaryKey(Integer.valueOf(memberId));
|
TbShopUser shopUser = tbShopUserMapper.selectByPrimaryKey(Integer.valueOf(memberId));
|
||||||
|
|||||||
Reference in New Issue
Block a user