Commit d0e5d9cd by 徐高华

激活 账号

parent c709e3c6
......@@ -179,6 +179,7 @@ public class StaffServiceImpl implements StaffService {
@Override
public void activedAccountTimer(String wxEid) {
log.info("开始查询激活账号,wxEid={}", wxEid);
List<TabHaobanWxEnterprise> list = new ArrayList<>() ;
if("-1".equals(wxEid)) {
list = this.wxEnterpriseMapper.listAll() ;
......@@ -207,8 +208,9 @@ public class StaffServiceImpl implements StaffService {
List<AccountListDTO> list = dto.getAccountList() ;
this.updateAccount(wxEnterpriseId, list);
cursor = dto.getNextCursor() ;
Integer hasMore = dto.getHasMore() ;
// 从企微拉取下一批数据
if (StringUtils.isNotBlank(cursor)) {
if (StringUtils.isNotBlank(cursor) && null !=hasMore && hasMore==1) {
this.listAccount(wxEnterprise, limit , cursor);
}
}
......@@ -221,7 +223,11 @@ public class StaffServiceImpl implements StaffService {
Date start = new Date(item.getActiveTime()*1000L) ;
Date end = new Date(item.getExpireTime()*1000L) ;
TabHaobanStaff staff = this.mapper.selectByUserIdAndEnterpriseId(userId, wxEnterpriseId) ;
this.updateActiveStatusById(staff.getStaffId(), activeCode, start, end, new Date(), 1) ;
if(null != staff) {
this.updateActiveStatusById(staff.getStaffId(), activeCode, start, end, new Date(), 1) ;
}else {
log.info("查询激活账号,用户不存在,userid={}",userId);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment