add clearManager

master
luoyang 6 years ago
parent c789897636
commit 28d94d9a64

@ -11,6 +11,8 @@ public interface SignInAccountService {
JSONObject getManager(String accountId);
void clearManager(String accountId);
JSONObject getClient(String accountId);
void clearAccountCache(String accountId);

@ -6,6 +6,7 @@ import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
import au.com.royalpay.payment.manage.organizations.core.OrgManager;
import au.com.royalpay.payment.manage.signin.beans.ManagerInfo;
import au.com.royalpay.payment.manage.signin.core.ManagerAccountsService;
import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.NotFoundException;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
@ -37,6 +38,8 @@ public class ManagerAccountServiceImpl implements ManagerAccountsService {
@Resource
private OrgManager orgManager;
@Resource
private SignInAccountService signInAccountService;
@Override
public PageList<JSONObject> listManagers(JSONObject loginManager,JSONObject params) {
@ -105,6 +108,7 @@ public class ManagerAccountServiceImpl implements ManagerAccountsService {
}
obj.put("manager_id", userId);
managerMapper.update(obj);
signInAccountService.clearManager(userId);
}
@Override

@ -129,6 +129,12 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
return manager;
}
@Override
@CacheEvict(value = ":login:managers:", key = "''+#accountId")
public void clearManager(String accountId) {
}
@Override
@Cacheable(value = ":login:clients:", key = "''+#accountId")
public JSONObject getClient(String accountId) {

Loading…
Cancel
Save