|
|
|
@@ -15,6 +15,7 @@ import com.xueyi.common.web.utils.DateUtils; |
|
|
|
import com.xueyi.message.api.transfer.domain.vo.DmActiveVo; |
|
|
|
import com.xueyi.message.api.transfer.domain.vo.DmDeviceVo; |
|
|
|
import com.xueyi.message.transfer.service.impl.MessageQueueServiceImpl; |
|
|
|
import com.xueyi.nlt.api.nlt.feign.RemoteSeniverseService; |
|
|
|
import com.xueyi.system.api.authority.feign.RemoteLoginService; |
|
|
|
import com.xueyi.system.api.device.feign.RemoteDeviceTenantMergeService; |
|
|
|
import com.xueyi.system.api.digitalmans.domain.dto.DmManDeviceDto; |
|
|
|
@@ -32,14 +33,9 @@ import com.xueyi.system.api.staff.feign.RemoteStaffService; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate; |
|
|
|
import org.springframework.web.bind.annotation.PathVariable; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestMethod; |
|
|
|
import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
import org.springframework.web.bind.annotation.ResponseBody; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
@@ -91,6 +87,11 @@ public class ApiController { |
|
|
|
@Autowired |
|
|
|
RemoteQuestionanswersService remoteQuestionanswersService; |
|
|
|
|
|
|
|
RemoteSeniverseService remoteSeniverseService; |
|
|
|
|
|
|
|
@Value("${notification.seniverse.key}") |
|
|
|
private String seniverseKey; |
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/heartbeat", method = {RequestMethod.POST}) |
|
|
|
@ResponseBody |
|
|
|
@@ -457,4 +458,19 @@ public class ApiController { |
|
|
|
} |
|
|
|
return AjaxResult.success(listR.getData()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 意图请求 |
|
|
|
列表 |
|
|
|
*/ |
|
|
|
@RequestMapping(value = "/weather",method = {RequestMethod.GET, RequestMethod.POST}) |
|
|
|
@ResponseBody |
|
|
|
public AjaxResult weather(@RequestParam String city, HttpServletRequest request) { |
|
|
|
log.info("weather:{}", city); |
|
|
|
JSONObject result = remoteSeniverseService.now(seniverseKey,city,"zh-Hans","c"); |
|
|
|
log.info("weather:{}", result); |
|
|
|
|
|
|
|
return AjaxResult.success(result.getJSONArray("results")); |
|
|
|
|
|
|
|
} |
|
|
|
} |