opt calling list summary
This commit is contained in:
parent
9bf88d9f5f
commit
e08e404b66
@ -97,6 +97,7 @@ public class CallingListController
|
|||||||
@RequestParam("campaignId")
|
@RequestParam("campaignId")
|
||||||
final Integer campaignId) {
|
final Integer campaignId) {
|
||||||
val vm = new ViewModel<List<CallingListSummary>>(((CallingListService) queryService).summary(campaignId));
|
val vm = new ViewModel<List<CallingListSummary>>(((CallingListService) queryService).summary(campaignId));
|
||||||
|
vm.attr("campaign", campaignService.find(campaignId));
|
||||||
vm.setAttr("preparedList", callingListPreparedService.summary(campaignId));
|
vm.setAttr("preparedList", callingListPreparedService.summary(campaignId));
|
||||||
vm.setAttr("historicalList", callingListHistoricalService.summary(campaignId));
|
vm.setAttr("historicalList", callingListHistoricalService.summary(campaignId));
|
||||||
return vm;
|
return vm;
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
count(if(export_batch_key is not null, 1, null)) exported,
|
count(if(export_batch_key is not null, 1, null)) exported,
|
||||||
count(if(export_batch_key is null, 1, null)) ready
|
count(if(export_batch_key is null, 1, null)) ready
|
||||||
from br_calling_list_prepared
|
from br_calling_list_prepared
|
||||||
where campaign_id = #{campaignId}
|
where added_time > date(now() - interval 31 day)
|
||||||
|
and campaign_id = #{campaignId}
|
||||||
group by insert_batch_key
|
group by insert_batch_key
|
||||||
order by added_time desc
|
order by added_time desc
|
||||||
limit 9
|
limit 9
|
||||||
|
@ -5,8 +5,8 @@ import org.junit.Test;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import me.chyxion.tigon.mybatis.Search;
|
import me.chyxion.tigon.mybatis.Search;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
|
||||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -15,14 +15,14 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
@ContextConfiguration("classpath*:spring/spring-*.xml")
|
@SpringBootTest(classes = TestDriver.class)
|
||||||
public class CallingListPreparedMapperTest {
|
public class CallingListPreparedMapperTest {
|
||||||
@Autowired
|
@Autowired
|
||||||
private CallingListPreparedMapper mapper;
|
private CallingListPreparedMapper mapper;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSummary() {
|
public void testSummary() {
|
||||||
val summary = mapper.summary(6);
|
val summary = mapper.summary(4);
|
||||||
log.info("Summary [{}].", summary);
|
log.info("Summary [{}].", summary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user