feat:机器人注册接口更新到IM
This commit is contained in:
parent
726d5a618d
commit
f183fab51e
@ -44,11 +44,11 @@ public interface RobotInfoApi {
|
||||
|
||||
/**
|
||||
* 查询机器人信息
|
||||
* @param robotId 机器人id
|
||||
* @param robotId 机器人主键id
|
||||
* @return 机器人信息
|
||||
*/
|
||||
@GetMapping("api/im/robot/basic/{robotId}")
|
||||
ApiResult<RobotInfoResp> queryRobotInfo(@PathVariable("robotId") Long robotId);
|
||||
ApiResult<RobotInfoResp> queryRobotInfo(@PathVariable("robotId") String robotId);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -7,8 +7,6 @@ import cn.axzo.im.center.api.vo.req.RobotMsgTemplateReq;
|
||||
import cn.axzo.im.center.api.vo.resp.RobotMsgTemplateResp;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ public class RobotInfoController implements RobotInfoApi {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResult<RobotInfoResp> queryRobotInfo(Long robotId) {
|
||||
public ApiResult<RobotInfoResp> queryRobotInfo(String robotId) {
|
||||
RobotInfoResp robotTagResp = infoService.queryRobotInfo(robotId);
|
||||
return ApiResult.ok(robotTagResp);
|
||||
}
|
||||
|
||||
@ -132,8 +132,14 @@ public class RobotInfoService {
|
||||
return robotInfoResp;
|
||||
}
|
||||
|
||||
public RobotInfoResp queryRobotInfo(Long robotInfoId) {
|
||||
return findRobotInfoById(robotInfoId);
|
||||
public RobotInfoResp queryRobotInfo(String robotInfoId) {
|
||||
|
||||
RobotInfo robotInfo = robotInfoDao.lambdaQuery().eq(RobotInfo::getIsDelete, 0)
|
||||
.eq(RobotInfo::getRobotId, robotInfoId).one();
|
||||
if (robotInfo == null) {
|
||||
return null;
|
||||
}
|
||||
return findRobotInfoById(robotInfo.getId());
|
||||
}
|
||||
|
||||
public PageResp<RobotInfoResp> queryRobotInfoList(RobotPageQuery robotInfoQuery) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user