mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 批量续费sim卡方法
This commit is contained in:
@@ -150,4 +150,9 @@ public class PileSimInfoController extends BaseController {
|
|||||||
// return result;
|
// return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/batchRechargeSimCard")
|
||||||
|
public AjaxResult batchRechargeSimCard(@RequestBody SimRenewDTO dto) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import com.jsowell.common.util.id.IdUtils;
|
|||||||
import com.jsowell.common.util.sim.SimCardUtils;
|
import com.jsowell.common.util.sim.SimCardUtils;
|
||||||
import com.jsowell.common.util.sim.XunZhongSimUtils;
|
import com.jsowell.common.util.sim.XunZhongSimUtils;
|
||||||
import com.jsowell.pile.domain.PileSimInfo;
|
import com.jsowell.pile.domain.PileSimInfo;
|
||||||
|
import com.jsowell.pile.dto.SimRenewDTO;
|
||||||
import com.jsowell.pile.vo.web.*;
|
import com.jsowell.pile.vo.web.*;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -195,6 +196,20 @@ public class SimCardService {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void batchRenewSimCard(SimRenewDTO dto) {
|
||||||
|
List<String> iccIds = dto.getIccIds();
|
||||||
|
// 先分组 key: 卡商名 value:流量卡卡号
|
||||||
|
Map<String, List<String>> map = goupingBySimSupplier(iccIds);
|
||||||
|
// 讯众 Sim 卡卡号
|
||||||
|
List<String> xunZhongCards = map.get("xunzhong");
|
||||||
|
// 智宇物联平台 Sim卡卡号
|
||||||
|
List<String> wuLianCards = map.get("wulian");
|
||||||
|
// 异步批量执行续费方法
|
||||||
|
XunZhongSimRenewal(xunZhongCards, dto.getCycleNumber());
|
||||||
|
|
||||||
|
WuLianSimRenew(wuLianCards, dto.getCycleNumber());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将iccid按照卡商分组
|
* 将iccid按照卡商分组
|
||||||
* @param iccIds
|
* @param iccIds
|
||||||
|
|||||||
Reference in New Issue
Block a user