大屏接口

dev_0531
yechenhao 6 years ago
parent e6db6f58e6
commit 89c3ebb0ef

@ -351,25 +351,18 @@ public class StorePromotionDataService {
//获取token //获取token
String token = mainService.getAccessToken(); String token = mainService.getAccessToken();
WxCpExternalContactService externalContactService = mainService.getExternalContactService(); WxCpExternalContactService externalContactService = mainService.getExternalContactService();
List<String> cpUserIds = externalContactService.listFollowUser(); List<PrivilageCpUserDO> privilageCpUserDOS = privilageCpUserDOMapper.selectList(null);
cpUserIds.forEach(cpUserId -> { privilageCpUserDOS.forEach(privilageCpUserDO -> {
// 返回 // 返回
try { try {
Long storeId = privilageCpUserStoreDOMapper.selectOneByCpUserId(cpUserId); Long storeId = privilageCpUserStoreDOMapper.selectOneByCpUserId(privilageCpUserDO.getCpUserId());
Long regionId = null; Long regionId = null;
if (storeId == null){ if (storeId == null){
QueryWrapper<PrivilageCpUserDO> cpUserQw = new QueryWrapper<>(); regionId = privilageCpUserDO.getId();
cpUserQw.eq("cpUserId",cpUserId).last("limit 1");
PrivilageCpUserDO privilageCpUserDO = privilageCpUserDOMapper.selectOne(cpUserQw);
if (privilageCpUserDO != null){
regionId = privilageCpUserDO.getId();
}else {
return;
}
} }
WxCusInfoReqDO wxCusInfoReqDO = new WxCusInfoReqDO(); WxCusInfoReqDO wxCusInfoReqDO = new WxCusInfoReqDO();
wxCusInfoReqDO.setAccess_token(token); wxCusInfoReqDO.setAccess_token(token);
wxCusInfoReqDO.setUserid(cpUserId); wxCusInfoReqDO.setUserid(privilageCpUserDO.getCpUserId());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//todo 分开写便于同步历史数据 最大跨度30天 最久当天往前180天 上线时改为System.currentTimeMillis() //todo 分开写便于同步历史数据 最大跨度30天 最久当天往前180天 上线时改为System.currentTimeMillis()
wxCusInfoReqDO.setStart_time(startDate.getTime() / 1000); wxCusInfoReqDO.setStart_time(startDate.getTime() / 1000);

Loading…
Cancel
Save