Commit c3828e75 by 阮思源

没有可用机器人返回没有可用机器人

parent 995f038b
......@@ -1481,8 +1481,11 @@ public class BookGroupBizImpl implements BookGroupBiz {
}
SelfRobotDTO selfRobotDTO = wechatGroupConsr.getAvailableRobotByBookGroup(availableRobotParamDTO);
if (selfRobotDTO == null) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "未找到机器人!");
//没有可用机器人返回没有可用机器人
ownAltQrcodeInfoDTO.setHasUsedRobot(false);
return ownAltQrcodeInfoDTO;
}
ownAltQrcodeInfoDTO.setHasUsedRobot(true);
ownAltQrcodeInfoDTO.setAltHeadUrl(selfRobotDTO.getHeadPic());
ownAltQrcodeInfoDTO.setAltId(selfRobotDTO.getWxId());
ownAltQrcodeInfoDTO.setAltNickName(selfRobotDTO.getNickName());
......
......@@ -37,6 +37,9 @@ public class OwnAltQrcodeInfoDTO implements Serializable {
@ApiModelProperty("资源是否开启")
private Boolean resourceOpen;
@ApiModelProperty("是否有可用机器人")
private Boolean hasUsedRobot;
public String getAltId() {
return altId;
}
......@@ -101,6 +104,14 @@ public class OwnAltQrcodeInfoDTO implements Serializable {
this.resourceOpen = resourceOpen;
}
public Boolean getHasUsedRobot() {
return hasUsedRobot;
}
public void setHasUsedRobot(Boolean hasUsedRobot) {
this.hasUsedRobot = hasUsedRobot;
}
@Override
public String toString() {
return "OwnAltQrcodeInfoDTO{" +
......@@ -112,6 +123,7 @@ public class OwnAltQrcodeInfoDTO implements Serializable {
", customerServiceName='" + customerServiceName + '\'' +
", addFriendGuide='" + addFriendGuide + '\'' +
", resourceOpen=" + resourceOpen +
", hasUsedRobot=" + hasUsedRobot +
'}';
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment