员工登录 重复账号问题

This commit is contained in:
2024-08-02 09:26:52 +08:00
parent 6c528e3ac6
commit cc5fea21e8
3 changed files with 8 additions and 1 deletions

View File

@@ -20,4 +20,5 @@ public interface TbPlussShopStaffMapper {
int updateByPrimaryKey(TbPlussShopStaff record);
TbPlussShopStaff selectByAccount(String account);
TbPlussShopStaff selectByAccountAndShopId(String account,String shopId);
}

View File

@@ -87,7 +87,7 @@ public class LoginService {
return Result.fail(CodeEnum.MERCHANTEIXST);
}
TbPlussShopStaff tbPlussShopStaff = tbPlussShopStaffMapper.selectByAccount(loginReq.getLoginName());
TbPlussShopStaff tbPlussShopStaff = tbPlussShopStaffMapper.selectByAccountAndShopId(loginReq.getLoginName(),account.getShopId());
if (ObjectUtil.isEmpty(tbPlussShopStaff)) {
return Result.fail(CodeEnum.ACCOUNTEIXST);
} else if (!tbPlussShopStaff.getStatus()) {