add CallSatisfaction
This commit is contained in:
parent
264af78bbd
commit
64b0ea3cdc
@ -11,8 +11,6 @@ import org.springframework.context.annotation.Bean;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
import org.springframework.beans.factory.ObjectFactory;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.openfeign.support.SpringEncoder;
|
||||
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
|
||||
import org.springframework.cloud.openfeign.support.ResponseEntityDecoder;
|
||||
@ -22,12 +20,8 @@ import org.springframework.cloud.openfeign.support.ResponseEntityDecoder;
|
||||
* @date Jul 22, 2020 14:08:16
|
||||
*/
|
||||
@Slf4j
|
||||
@Configuration
|
||||
public class FeignClientConfiguration {
|
||||
|
||||
@Autowired
|
||||
private ObjectFactory<HttpMessageConverters> messageConverters;
|
||||
|
||||
@Bean
|
||||
public RequestInterceptor requestInterceptor() {
|
||||
return reqTpl -> {
|
||||
@ -37,7 +31,7 @@ public class FeignClientConfiguration {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Encoder feignEncoder() {
|
||||
public Encoder feignEncoder(final ObjectFactory<HttpMessageConverters> messageConverters) {
|
||||
return new SpringFormEncoder(new SpringEncoder(messageConverters));
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ pushd $(dirname "$prg_path")
|
||||
WORK_DIR=$(pwd)
|
||||
echo "Work dir [$WORK_DIR]"
|
||||
|
||||
mvn -T 2C -am -DskipTests -pl lib/tigon/codegen spring-boot:run \
|
||||
mvn -T 4C -am -DskipTests -pl lib/tigon/codegen spring-boot:run \
|
||||
-Dspring-boot.run.arguments="--tigon.codegen.work-dir=$WORK_DIR --spring.config.location=$WORK_DIR/codegen.properties --server.port=8088"
|
||||
popd
|
||||
|
||||
|
@ -0,0 +1,34 @@
|
||||
package com.pudonghot.yo.fsagent.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import com.pudonghot.yo.model.domain.CallSatisfaction;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.pudonghot.yo.fsagent.service.CallSatisfactionService;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Jun 12, 2020 10:04:20
|
||||
*/
|
||||
@Slf4j
|
||||
@Controller
|
||||
@RequestMapping("/call-satisfaction")
|
||||
public class CallSatisfactionController {
|
||||
@Autowired
|
||||
private CallSatisfactionService callSatisfactionService;
|
||||
|
||||
@PostMapping("/submit")
|
||||
public void submit(
|
||||
@RequestParam("connId")
|
||||
final String connId,
|
||||
@RequestParam("digits")
|
||||
final String digits) {
|
||||
final CallSatisfaction model = new CallSatisfaction();
|
||||
model.setConnId(connId);
|
||||
model.setDigits(digits);
|
||||
callSatisfactionService.create(model);
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.pudonghot.yo.fsagent.service;
|
||||
|
||||
import com.wacai.tigon.service.BaseCrudService;
|
||||
import com.pudonghot.yo.model.domain.CallSatisfaction;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Aug 17, 2020 22:13:50
|
||||
*/
|
||||
public interface CallSatisfactionService extends BaseCrudService<Integer, CallSatisfaction> {
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.pudonghot.yo.fsagent.service.impl;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.pudonghot.yo.mapper.CallSatisfactionMapper;
|
||||
import com.pudonghot.yo.model.domain.CallSatisfaction;
|
||||
import com.wacai.tigon.service.support.BaseCrudServiceSupport;
|
||||
import com.pudonghot.yo.fsagent.service.CallSatisfactionService;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Aug 17, 2020 22:13:44
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class CallSatisfactionServiceImpl
|
||||
extends BaseCrudServiceSupport<Integer,
|
||||
CallSatisfaction,
|
||||
CallSatisfactionMapper>
|
||||
implements CallSatisfactionService {
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.pudonghot.yo.mapper;
|
||||
|
||||
import com.wacai.tigon.mybatis.BaseMapper;
|
||||
import com.pudonghot.yo.model.domain.CallSatisfaction;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Aug 17, 2020 21:35:37
|
||||
*/
|
||||
public interface CallSatisfactionMapper extends BaseMapper<Integer, CallSatisfaction> {
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Aug 17, 2020 21:35:37
|
||||
*/
|
||||
-->
|
||||
<!DOCTYPE mapper PUBLIC
|
||||
"-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.pudonghot.yo.mapper.CallSatisfactionMapper">
|
||||
</mapper>
|
@ -0,0 +1,25 @@
|
||||
package com.pudonghot.yo.mapper;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import com.wacai.tigon.mybatis.Search;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Aug 17, 2020 21:35:37
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration("classpath*:spring/spring-*.xml")
|
||||
public class CallSatisfactionMapperTest extends AbstractTransactionalJUnit4SpringContextTests {
|
||||
@Autowired
|
||||
private CallSatisfactionMapper mapper;
|
||||
|
||||
@Test
|
||||
public void mapperTest() {
|
||||
mapper.list(new Search().limit(8));
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.pudonghot.yo.model.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import com.wacai.tigon.mybatis.Table;
|
||||
import com.wacai.tigon.mybatis.NotUpdate;
|
||||
import lombok.experimental.FieldNameConstants;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Aug 17, 2020 21:35:37
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Table("br_call_satisfaction")
|
||||
@FieldNameConstants(prefix = "")
|
||||
public class CallSatisfaction extends BaseDomain {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotUpdate
|
||||
private String connId;
|
||||
@NotUpdate
|
||||
private String digits;
|
||||
}
|
@ -287,7 +287,7 @@ public class CommonAgentStatusServiceImpl
|
||||
*/
|
||||
@Override
|
||||
public void idle(final Agent agent) {
|
||||
log.info("Idle agent [{}] call [{}].", agent);
|
||||
log.info("Idle agent [{}].", agent);
|
||||
updateState(agent, AgentStatus.State.IDLE);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user