Commit 4c8b9d09 by 徐高华

激活码

parent c03da95e
...@@ -25,7 +25,6 @@ import com.gic.haoban.common.utils.PageUtil; ...@@ -25,7 +25,6 @@ import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.manage.api.constants.Manage3Constants; import com.gic.haoban.manage.api.constants.Manage3Constants;
import com.gic.haoban.manage.api.dto.AlertMessageDTO; import com.gic.haoban.manage.api.dto.AlertMessageDTO;
import com.gic.haoban.manage.api.dto.WxEnterpriseDTO; import com.gic.haoban.manage.api.dto.WxEnterpriseDTO;
import com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeAccountInterceptLogDTO; import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeAccountInterceptLogDTO;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDTO; import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDTO;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO; import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO;
...@@ -162,8 +161,8 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService { ...@@ -162,8 +161,8 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
} }
String serviceCorpid = config.getCorpid(); String serviceCorpid = config.getCorpid();
WxEnterpriseDTO wxEnterpriseDTO = wxEnterpriseService.selectById(wxEnterpriseId); WxEnterpriseDTO wxEnterpriseDTO = wxEnterpriseService.selectById(wxEnterpriseId);
if (wxEnterpriseDTO.getWxSecurityType() <= 0) { if (wxEnterpriseDTO.getWxSecurityType() <= 0 || wxEnterpriseDTO.getWxSecurityType()==5) {
logger.info("WxSecurityType=0,wxEnterpriseId={}", wxEnterpriseId); logger.info("WxSecurityType=0/5,wxEnterpriseId={}", wxEnterpriseId);
return; return;
} }
String corpid = wxEnterpriseDTO.getOpenCorpid(); String corpid = wxEnterpriseDTO.getOpenCorpid();
...@@ -227,11 +226,7 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService { ...@@ -227,11 +226,7 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
// 成员的激活码信息 // 成员的激活码信息
this.staffService.activedAccountTimer(wxEnterpriseId); this.staffService.activedAccountTimer(wxEnterpriseId);
// 更新企业的激活数量统计
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
if(!qwDTO.isSelf()) {
this.wxEnterpriseActiveDataService.saveOrUpdate(wxEnterpriseId); this.wxEnterpriseActiveDataService.saveOrUpdate(wxEnterpriseId);
}
// 统计 haobanQywxFeeDetailDTO 30天内最新过期的时间和人数 // 统计 haobanQywxFeeDetailDTO 30天内最新过期的时间和人数
HaobanQywxFeeDetailDTO haobanQywxFeeDetailDTO = haobanQywxFeeAccountStaffService.feeIntercept(wxEnterpriseId); HaobanQywxFeeDetailDTO haobanQywxFeeDetailDTO = haobanQywxFeeAccountStaffService.feeIntercept(wxEnterpriseId);
...@@ -254,8 +249,9 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService { ...@@ -254,8 +249,9 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
tabHaobanQywxFee.setInterceptFlag(0); tabHaobanQywxFee.setInterceptFlag(0);
haobanQywxFeeService.insert(tabHaobanQywxFee); haobanQywxFeeService.insert(tabHaobanQywxFee);
// 判断今天是否是本月最后一天 // 判断今天是否是本月最后一天
if (DateUtil.isSameDay(DateUtil.endOfMonth(new Date()), new Date()) || "ca66a01b79474c40b3e7c7f93daf1a3b".equals(wxEnterpriseId)) { if (DateUtil.isSameDay(DateUtil.endOfMonth(new Date()), new Date())
int monthWillInterceptNum = haobanQywxFeeDetailDTO.getInterceptUserNum() ; || "ca66a01b79474c40b3e7c7f93daf1a3b".equals(wxEnterpriseId)) {
int monthWillInterceptNum = haobanQywxFeeDetailDTO.getInterceptUserNum();
String content = "30天将有" + monthWillInterceptNum + "个接口许可证即将过期,您总共还剩余" + permissionUserNum String content = "30天将有" + monthWillInterceptNum + "个接口许可证即将过期,您总共还剩余" + permissionUserNum
+ "个可用的接口许可证,请保证数量充足,如需增加请及时联系相关人员续费,避免影响使用"; + "个可用的接口许可证,请保证数量充足,如需增加请及时联系相关人员续费,避免影响使用";
messageAlert(wxEnterpriseId, corpName, corpid, AlertTypeEnum.FEE_ALARM.getName(), content); messageAlert(wxEnterpriseId, corpName, corpid, AlertTypeEnum.FEE_ALARM.getName(), content);
...@@ -300,13 +296,13 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService { ...@@ -300,13 +296,13 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
TabHaobanQywxFeeOrderAccount activeAccount = new TabHaobanQywxFeeOrderAccount(); TabHaobanQywxFeeOrderAccount activeAccount = new TabHaobanQywxFeeOrderAccount();
// 查询激活码的详情 // 查询激活码的详情
List<List<String>> list = Lists.partition(codeList, 1000);
for (int i = 0; i < list.size(); i++) {
List<String> subCodeList = list.get(i);
List<ActiveInfoCodeResponseDTO> respList = qywxUserApiService.getActiveInfoByCodeList(corpid, serviceCorpid, List<ActiveInfoCodeResponseDTO> respList = qywxUserApiService.getActiveInfoByCodeList(corpid, serviceCorpid,
codeList); subCodeList);
if (CollectionUtils.isNotEmpty(respList)) { if (CollectionUtils.isNotEmpty(respList)) {
List<List<ActiveInfoCodeResponseDTO>> list = Lists.partition(respList, 800); for (ActiveInfoCodeResponseDTO activeDetail : respList) {
for (int i = 0; i < list.size(); i++) {
List<ActiveInfoCodeResponseDTO> subList = list.get(i);
for (ActiveInfoCodeResponseDTO activeDetail : subList) {
String userid = activeDetail.getUserid(); String userid = activeDetail.getUserid();
String activeCode = activeDetail.getActiveCode(); String activeCode = activeDetail.getActiveCode();
activeAccount.setWxUserId(userid); activeAccount.setWxUserId(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