后台-登录记录-查询时erbanNo转成uid
This commit is contained in:
@@ -4,12 +4,15 @@ import com.accompany.admin.service.base.BaseService;
|
||||
import com.accompany.common.utils.StringUtils;
|
||||
import com.accompany.core.model.AccountLoginRecord;
|
||||
import com.accompany.core.model.AccountLoginRecordExample;
|
||||
import com.accompany.core.model.Users;
|
||||
import com.accompany.core.mybatismapper.AccountLoginRecordMapper;
|
||||
import com.accompany.core.service.user.UsersBaseService;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -17,10 +20,15 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
public class AccountLoginRecordService extends BaseService {
|
||||
|
||||
@Autowired
|
||||
private UsersBaseService usersBaseService;
|
||||
@Autowired
|
||||
private AccountLoginRecordMapper accountLoginRecordMapper;
|
||||
|
||||
public PageInfo<AccountLoginRecord> getAccountLoginRecordList(Integer pageSize, Integer pageNum, Long erbanNo, String phone, Integer loginType, String deviceId) {
|
||||
public PageInfo<AccountLoginRecord> getAccountLoginRecordList(Integer pageSize, Integer pageNum,
|
||||
Long erbanNo, String phone,
|
||||
Integer loginType, String deviceId) {
|
||||
AccountLoginRecordExample accountLoginRecordExample = new AccountLoginRecordExample();
|
||||
AccountLoginRecordExample.Criteria criteria = accountLoginRecordExample.createCriteria();
|
||||
if (StringUtils.isNotBlank(deviceId)) {
|
||||
@@ -30,7 +38,11 @@ public class AccountLoginRecordService extends BaseService {
|
||||
criteria.andPhoneEqualTo(phone);
|
||||
}
|
||||
if (erbanNo != null) {
|
||||
criteria.andErbanNoEqualTo(erbanNo);
|
||||
Users u = usersBaseService.getUsersByErBanNo(erbanNo);
|
||||
if (null == u){
|
||||
return new PageInfo<>(Collections.EMPTY_LIST);
|
||||
}
|
||||
criteria.andErbanNoEqualTo(u.getUid());
|
||||
}
|
||||
if (loginType != null) {
|
||||
criteria.andLoginTypeEqualTo(loginType.byteValue());
|
||||
|
Reference in New Issue
Block a user