Commit 74809c0f by 徐高华

激活账号

parent ade9c229
......@@ -237,30 +237,29 @@ public class StaffServiceImpl implements StaffService {
if(null == staff && end.getTime()>System.currentTimeMillis()) {
staff = this.mapper.getDeleteUser(userId, wxEnterpriseId) ;
}
TabHaobanQywxFeeAccountStaff accountStaff = new TabHaobanQywxFeeAccountStaff();
accountStaff.setFeeAccountStaffId(UniqueIdUtils.uniqueLong());
accountStaff.setWxEnterpriseId(wxEnterpriseId);
accountStaff.setCorpId(openCorpid);
if(null != staff) {
this.updateActiveStatusById(staff.getStaffId(), start, end, new Date(), 1) ;
TabHaobanQywxFeeAccountStaff accountStaff = new TabHaobanQywxFeeAccountStaff();
accountStaff.setFeeAccountStaffId(UniqueIdUtils.uniqueLong());
accountStaff.setWxEnterpriseId(wxEnterpriseId);
accountStaff.setCorpId(openCorpid);
ActiveInfoUserResponseDTO activeInfoUserResponseDTO = qywxUserApiService.getActiveInfoByUser(openCorpid, config.getCorpid(), userId);
log.info("查询激活详情={},{}",JSON.toJSONString(activeInfoUserResponseDTO),userId);
if (activeInfoUserResponseDTO.getErrcode() == 0) {
for(AccountListDTO dto : activeInfoUserResponseDTO.getActiveInfoList()) {
if(dto.getType()==2) {
accountStaff.setActiveCode(dto.getActiveCode());
}
}
}
accountStaff.setStaffId(staff.getStaffId());
accountStaff.setAccountType(item.getType());
accountStaff.setExpireTime(DateUtil.date(item.getExpireTime() * 1000));
accountStaff.setActiveTime(DateUtil.date(item.getActiveTime() * 1000));
this.haobanQywxFeeAccountStaffService.save(accountStaff);
}else {
log.info("查询激活账号,用户不存在,userid={}",userId);
}
ActiveInfoUserResponseDTO activeInfoUserResponseDTO = qywxUserApiService.getActiveInfoByUser(openCorpid, config.getCorpid(), userId);
log.info("查询激活详情={},{}",JSON.toJSONString(activeInfoUserResponseDTO),userId);
if (activeInfoUserResponseDTO.getErrcode() == 0) {
for(AccountListDTO dto : activeInfoUserResponseDTO.getActiveInfoList()) {
if(dto.getType()==2) {
accountStaff.setActiveCode(dto.getActiveCode());
}
}
}
accountStaff.setAccountType(item.getType());
accountStaff.setExpireTime(DateUtil.date(item.getExpireTime() * 1000));
accountStaff.setActiveTime(DateUtil.date(item.getActiveTime() * 1000));
this.haobanQywxFeeAccountStaffService.save(accountStaff);
}
}
......
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