|
|
|
@@ -38,6 +38,7 @@ import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate; |
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import com.xueyi.common.core.constant.digitalman.SkillConstants.SkillType; |
|
|
|
|
|
|
|
import java.io.Serializable; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
@@ -152,14 +153,24 @@ public class DmIntentController extends BaseController<DmIntentQuery, DmIntentDt |
|
|
|
@ResponseBody |
|
|
|
public R<JSONObject> conversationInner(@RequestBody DmIntentVo intent) { |
|
|
|
JSONObject joResult = null; |
|
|
|
SkillType.BOOK_MEETING_ROOM.getCode(); |
|
|
|
// 判断skill code的值 |
|
|
|
switch (intent.getSkillCode()) { |
|
|
|
case "1": |
|
|
|
// 获取名称为"meeting-order"的BaseTemplate的实例 |
|
|
|
joResult = meetingOrderTemplate.handle(intent.getDevId(),intent.getContent()); |
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |
|
|
|
if (SkillType.BOOK_MEETING_ROOM.getCode().equals(intent.getSkillCode())) { |
|
|
|
// 获取名称为"meeting-order"的BaseTemplate的实例 |
|
|
|
redisTemplate.opsForValue().increment("dashboard:meeting", 1); |
|
|
|
joResult = meetingOrderTemplate.handle(intent.getDevId(),intent.getContent()); |
|
|
|
} else if (SkillType.CREATE_VISITOR_INFO.getCode().equals(intent.getSkillCode())) { |
|
|
|
// 开门记录 |
|
|
|
redisTemplate.opsForValue().increment("dashboard:create_visitor_info", 1); |
|
|
|
} else if (SkillType.REGISTER_VISITOR.getCode().equals(intent.getSkillCode())) { |
|
|
|
// 开门记录 |
|
|
|
redisTemplate.opsForValue().increment("dashboard:register_visitor", 1); |
|
|
|
} else if (SkillType.BROADCAST_DISPLAY.getCode().equals(intent.getSkillCode())) { |
|
|
|
// 开门记录 |
|
|
|
redisTemplate.opsForValue().increment("dashboard:broadcast_display", 1); |
|
|
|
} else if (SkillType.OPEN_DOOR.getCode().equals(intent.getSkillCode())) { |
|
|
|
// 开门记录 |
|
|
|
redisTemplate.opsForValue().increment("dashboard:open_door", 1); |
|
|
|
} |
|
|
|
return R.ok(joResult); |
|
|
|
} |
|
|
|
|