|
|
@ -17,6 +17,7 @@ import me.chanjar.weixin.common.error.WxErrorException;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.concurrent.ExecutorService;
|
|
|
|
import java.util.concurrent.ExecutorService;
|
|
|
@ -76,16 +77,25 @@ public class CustomerBehaviorJob {
|
|
|
|
List<PrivilageCpUserDO> privilageCpUserDOS = privilageCpUserDOMapper.selectList(null);
|
|
|
|
List<PrivilageCpUserDO> privilageCpUserDOS = privilageCpUserDOMapper.selectList(null);
|
|
|
|
List<String> cpUserIds = privilageCpUserDOS.stream().map(privilageCpUserDO -> privilageCpUserDO.getCpUserId()).collect(Collectors.toList());
|
|
|
|
List<String> cpUserIds = privilageCpUserDOS.stream().map(privilageCpUserDO -> privilageCpUserDO.getCpUserId()).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
|
|
List<Date> dates = DateUtils.getdays(startDate, endDate);
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
int index =0;
|
|
|
|
int index =0;
|
|
|
|
for (Date date:dates){
|
|
|
|
if (sdf.format(startDate).equals(sdf.format(endDate))){
|
|
|
|
for (String cpUserId : cpUserIds) {
|
|
|
|
for (String cpUserId : cpUserIds) {
|
|
|
|
producer.produceData(index,cpUserId,date);
|
|
|
|
producer.produceData(index,cpUserId,DateUtils.formatHourMinuteAndSecondToZero(startDate));
|
|
|
|
index++;
|
|
|
|
index++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
List<Date> dates = DateUtils.getdays(startDate, endDate);
|
|
|
|
|
|
|
|
for (Date date:dates){
|
|
|
|
|
|
|
|
for (String cpUserId : cpUserIds) {
|
|
|
|
|
|
|
|
producer.produceData(index,cpUserId,date);
|
|
|
|
|
|
|
|
index++;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
disruptor.shutdown();
|
|
|
|
disruptor.shutdown();
|
|
|
|
|
|
|
|
|
|
|
|
if (sysTaskDO !=null){
|
|
|
|
if (sysTaskDO !=null){
|
|
|
|