|
|
@ -1,6 +1,8 @@
|
|
|
|
package com.kiisoo.ic.job;
|
|
|
|
package com.kiisoo.ic.job;
|
|
|
|
|
|
|
|
|
|
|
|
import com.kiisoo.ic.customer.CustomerService;
|
|
|
|
import com.kiisoo.ic.customer.CustomerService;
|
|
|
|
|
|
|
|
import com.kiisoo.ic.employee.entity.PrivilageCpUserDO;
|
|
|
|
|
|
|
|
import com.kiisoo.ic.employee.mapper.PrivilageCpUserDOMapper;
|
|
|
|
import com.kiisoo.ic.store.entity.PrivilageCpUserStoreDO;
|
|
|
|
import com.kiisoo.ic.store.entity.PrivilageCpUserStoreDO;
|
|
|
|
import com.kiisoo.ic.store.mapper.PoiStoreStaffDOMapper;
|
|
|
|
import com.kiisoo.ic.store.mapper.PoiStoreStaffDOMapper;
|
|
|
|
import com.kiisoo.ic.store.mapper.PrivilageCpUserStoreDOMapper;
|
|
|
|
import com.kiisoo.ic.store.mapper.PrivilageCpUserStoreDOMapper;
|
|
|
@ -9,11 +11,9 @@ import com.lmax.disruptor.*;
|
|
|
|
import com.lmax.disruptor.dsl.Disruptor;
|
|
|
|
import com.lmax.disruptor.dsl.Disruptor;
|
|
|
|
import com.lmax.disruptor.dsl.ProducerType;
|
|
|
|
import com.lmax.disruptor.dsl.ProducerType;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
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.nio.ByteBuffer;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.concurrent.*;
|
|
|
|
import java.util.concurrent.*;
|
|
|
|
|
|
|
|
|
|
|
@ -31,6 +31,9 @@ public class CustomerDataJob {
|
|
|
|
private static final int THREAD_NUMBERS = 50;
|
|
|
|
private static final int THREAD_NUMBERS = 50;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private PrivilageCpUserDOMapper privilageCpUserDOMapper;
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private PrivilageCpUserStoreDOMapper privilageCpUserStoreDOMapper;
|
|
|
|
private PrivilageCpUserStoreDOMapper privilageCpUserStoreDOMapper;
|
|
|
|
|
|
|
|
|
|
|
@ -64,11 +67,11 @@ public class CustomerDataJob {
|
|
|
|
disruptor.start();
|
|
|
|
disruptor.start();
|
|
|
|
|
|
|
|
|
|
|
|
DTOMessageEventProducer producer = new DTOMessageEventProducer(ringBuffer, qwMailListManageService, customerService, poiStoreStaffDOMapper);
|
|
|
|
DTOMessageEventProducer producer = new DTOMessageEventProducer(ringBuffer, qwMailListManageService, customerService, poiStoreStaffDOMapper);
|
|
|
|
List<PrivilageCpUserStoreDO> privilageCpUserStoreDOS = privilageCpUserStoreDOMapper.selectList(null);
|
|
|
|
List<PrivilageCpUserDO> privilageCpUserDOS = privilageCpUserDOMapper.selectList(null);
|
|
|
|
int index =0;
|
|
|
|
int index =0;
|
|
|
|
for (PrivilageCpUserStoreDO privilageCpUserStoreDO : privilageCpUserStoreDOS) {
|
|
|
|
for (PrivilageCpUserDO privilageCpUserDO : privilageCpUserDOS) {
|
|
|
|
String cpUserId = privilageCpUserStoreDOMapper.selectCpUserIdByStoreId(privilageCpUserStoreDO.getStoreId());
|
|
|
|
Long storeId = privilageCpUserStoreDOMapper.selectOneByCpUserId(privilageCpUserDO.getCpUserId());
|
|
|
|
producer.produceData(index,privilageCpUserStoreDO, cpUserId);
|
|
|
|
producer.produceData(index,storeId,privilageCpUserDO.getCpUserId());
|
|
|
|
index++;
|
|
|
|
index++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|