bot中新增授权回调地址字段

This commit is contained in:
wanjia 2023-03-29 10:53:06 +08:00
parent 4b42fd8c0f
commit c26b555b01
5 changed files with 9 additions and 0 deletions

View File

@ -57,4 +57,6 @@ public class Bot {
@TableField(fill = FieldFill.INSERT)
private Date createTime;
private String oauthCallbackUrl;
}

View File

@ -417,6 +417,7 @@ public class UserService extends AbstractUserBot implements IUserService {
bot.setWebUrl(botVO.getBotUrl());
bot.setLogo(botVO.getLogo());
bot.setState(0);
bot.setOauthCallbackUrl(botVO.getOauthCallbackUrl());
return bot;
}
public List<BotLimitEvent> shiftBotToLimit(BotInputVO botInputVO,Bot bot) throws BotException{
@ -455,6 +456,7 @@ public class UserService extends AbstractUserBot implements IUserService {
botOutputVO.setWebUrl(bot.getWebUrl());;
botOutputVO.setLimitAndEvents(botInputVO.getLimitAndEvents());
botOutputVO.setLogo(bot.getLogo());
botOutputVO.setOauthCallbackUrl(bot.getOauthCallbackUrl());
return botOutputVO;
}

View File

@ -50,6 +50,8 @@ public class BotInputVO implements Serializable {
//TODO 前端改协议
private String botUrl;
private String oauthCallbackUrl;
/**
* 权限与事件
*/

View File

@ -42,6 +42,8 @@ public class BotOutputVO implements Serializable {
*/
private Integer state;
private String OauthCallbackUrl;
/**
* 是否转让 0未转让 1转让
*/

View File

@ -0,0 +1 @@
ALTER TABLE `bot` ADD COLUMN (`oauth_callback_url` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'oauth回调地址');