Commit c3828e75 by 阮思源

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

parent 995f038b
...@@ -1481,8 +1481,11 @@ public class BookGroupBizImpl implements BookGroupBiz { ...@@ -1481,8 +1481,11 @@ public class BookGroupBizImpl implements BookGroupBiz {
} }
SelfRobotDTO selfRobotDTO = wechatGroupConsr.getAvailableRobotByBookGroup(availableRobotParamDTO); SelfRobotDTO selfRobotDTO = wechatGroupConsr.getAvailableRobotByBookGroup(availableRobotParamDTO);
if (selfRobotDTO == null) { if (selfRobotDTO == null) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "未找到机器人!"); //没有可用机器人返回没有可用机器人
ownAltQrcodeInfoDTO.setHasUsedRobot(false);
return ownAltQrcodeInfoDTO;
} }
ownAltQrcodeInfoDTO.setHasUsedRobot(true);
ownAltQrcodeInfoDTO.setAltHeadUrl(selfRobotDTO.getHeadPic()); ownAltQrcodeInfoDTO.setAltHeadUrl(selfRobotDTO.getHeadPic());
ownAltQrcodeInfoDTO.setAltId(selfRobotDTO.getWxId()); ownAltQrcodeInfoDTO.setAltId(selfRobotDTO.getWxId());
ownAltQrcodeInfoDTO.setAltNickName(selfRobotDTO.getNickName()); ownAltQrcodeInfoDTO.setAltNickName(selfRobotDTO.getNickName());
......
...@@ -37,6 +37,9 @@ public class OwnAltQrcodeInfoDTO implements Serializable { ...@@ -37,6 +37,9 @@ public class OwnAltQrcodeInfoDTO implements Serializable {
@ApiModelProperty("资源是否开启") @ApiModelProperty("资源是否开启")
private Boolean resourceOpen; private Boolean resourceOpen;
@ApiModelProperty("是否有可用机器人")
private Boolean hasUsedRobot;
public String getAltId() { public String getAltId() {
return altId; return altId;
} }
...@@ -101,6 +104,14 @@ public class OwnAltQrcodeInfoDTO implements Serializable { ...@@ -101,6 +104,14 @@ public class OwnAltQrcodeInfoDTO implements Serializable {
this.resourceOpen = resourceOpen; this.resourceOpen = resourceOpen;
} }
public Boolean getHasUsedRobot() {
return hasUsedRobot;
}
public void setHasUsedRobot(Boolean hasUsedRobot) {
this.hasUsedRobot = hasUsedRobot;
}
@Override @Override
public String toString() { public String toString() {
return "OwnAltQrcodeInfoDTO{" + return "OwnAltQrcodeInfoDTO{" +
...@@ -112,6 +123,7 @@ public class OwnAltQrcodeInfoDTO implements Serializable { ...@@ -112,6 +123,7 @@ public class OwnAltQrcodeInfoDTO implements Serializable {
", customerServiceName='" + customerServiceName + '\'' + ", customerServiceName='" + customerServiceName + '\'' +
", addFriendGuide='" + addFriendGuide + '\'' + ", addFriendGuide='" + addFriendGuide + '\'' +
", resourceOpen=" + resourceOpen + ", 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