Commit 7c9db5db by jinxin

许可账号总数实时统计

parent 8ed958a7
package com.gic.haoban.manage.service.service;
import com.gic.haoban.manage.api.dto.StaffActiveDataDTO;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseActiveData;
/**
* @description: 通讯录数据总览内部service
......@@ -19,4 +20,6 @@ public interface WxEnterpriseActiveDataService {
StaffActiveDataDTO getWxEnterpriseActiveDataByWxEnterpriseId(String wxEnterpriseId);
void updateByStaffActiveDataDTO(StaffActiveDataDTO dto);
void insert(TabHaobanWxEnterpriseActiveData data);
}
......@@ -133,4 +133,13 @@ public class WxEnterpriseActiveDataServiceImpl implements WxEnterpriseActiveData
TabHaobanWxEnterpriseActiveData tabHaobanWxEnterpriseActiveData = EntityUtil.changeEntityByJSON(TabHaobanWxEnterpriseActiveData.class, dto);
tabHaobanWxEnterpriseActiveDataMapper.updateActiveDataByWxEnterpriseId(tabHaobanWxEnterpriseActiveData);
}
@Override
public void insert(TabHaobanWxEnterpriseActiveData data) {
if(null == data){
log.info("新增许可账号统计参数不能为空!");
return;
}
tabHaobanWxEnterpriseActiveDataMapper.insert(data);
}
}
......@@ -1169,8 +1169,8 @@ public class StaffApiServiceImpl implements StaffApiService {
staffMapper.updateActiveStatusById(staffId,timeStampDate,expireTimeDate,activeCode);
StaffActiveDataDTO activeDataDTO = wxEnterpriseActiveDataService.getWxEnterpriseActiveDataByWxEnterpriseId(wxEnterprise.getWxEnterpriseId());
if (null == activeDataDTO){
logger.info("查询不到企业的许可账号统计信息!");
}
logger.info("查询不到企业微信id->{}的许可账号统计信息!",wxEnterprise.getWxEnterpriseId());
}else {
//已使用的加1,已激活的加1,未激活的减1
Integer used = activeDataDTO.getUsed();
Integer inactive = activeDataDTO.getInactive();
......@@ -1185,6 +1185,7 @@ public class StaffApiServiceImpl implements StaffApiService {
activeDataDTO.setActivated(activated);
wxEnterpriseActiveDataService.updateByStaffActiveDataDTO(activeDataDTO);
}
}
return com.gic.api.base.commons.ServiceResponse.success(true);
}
......
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