12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- package com.dashitech.callcenter.init;
- import com.dashitech.hsms.dao.IHsmsCallLogDAO;
- import com.dashitech.hsms.entity.HsmsCallLogEntity;
- import org.apache.commons.logging.Log;
- import org.apache.commons.logging.LogFactory;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.boot.ApplicationArguments;
- import org.springframework.boot.ApplicationRunner;
- import org.springframework.context.annotation.Bean;
- import org.springframework.context.annotation.Lazy;
- import org.springframework.core.annotation.Order;
- import org.springframework.stereotype.Service;
- import java.util.Date;
- @Service
- @Order(10)
- public class TestInit implements ApplicationRunner {
- private static Log log = LogFactory.getLog(TestInit.class);
- @Autowired
- private IHsmsCallLogDAO hsmsCallLogDAO;
- @Override
- public void run(ApplicationArguments args) throws Exception {
- // testHsmsCallLogEntity();
- }
- private void testHsmsCallLogEntity() {
- log.info("start");
- HsmsCallLogEntity hsmsCallLog = new HsmsCallLogEntity();
- hsmsCallLog.setVersion(0);
- hsmsCallLog.setCallDept(null);
- hsmsCallLog.setCallAccept("AAAAAAAAA");
- hsmsCallLog.setPhyIDA("1111");
- hsmsCallLog.setdTMFA("2222");
- hsmsCallLog.setdTMFB("33333");
- hsmsCallLog.setResponseTime(new Date());
- hsmsCallLog.setLongTime("123");
- hsmsCallLog.setPath("d:/a.txt");
- hsmsCallLog.setCallType(1);
- hsmsCallLog.setCallState(1);
- hsmsCallLog.setHosId(1);
- hsmsCallLogDAO.save(hsmsCallLog);
- log.info("保存HSMS通话记录完成!");
- }
- }
|