feat:机器人注册接口更新到IM

This commit is contained in:
zuoqinbo 2023-10-17 10:24:36 +08:00
parent 726d5a618d
commit f183fab51e
4 changed files with 11 additions and 7 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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);
}

View File

@ -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) {