opt calling list summary

This commit is contained in:
Donghuang 2021-10-10 15:04:16 +08:00
parent 9bf88d9f5f
commit e08e404b66
3 changed files with 6 additions and 4 deletions

View File

@ -97,6 +97,7 @@ public class CallingListController
@RequestParam("campaignId")
final Integer 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("historicalList", callingListHistoricalService.summary(campaignId));
return vm;

View File

@ -17,7 +17,8 @@
count(if(export_batch_key is not null, 1, null)) exported,
count(if(export_batch_key is null, 1, null)) ready
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
order by added_time desc
limit 9

View File

@ -5,8 +5,8 @@ import org.junit.Test;
import lombok.extern.slf4j.Slf4j;
import org.junit.runner.RunWith;
import me.chyxion.tigon.mybatis.Search;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
@ -15,14 +15,14 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
*/
@Slf4j
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath*:spring/spring-*.xml")
@SpringBootTest(classes = TestDriver.class)
public class CallingListPreparedMapperTest {
@Autowired
private CallingListPreparedMapper mapper;
@Test
public void testSummary() {
val summary = mapper.summary(6);
val summary = mapper.summary(4);
log.info("Summary [{}].", summary);
}