diff --git a/src/main/java/com/gitlink/softbot/entity/db/Bot.java b/src/main/java/com/gitlink/softbot/entity/db/Bot.java index 66ea7fb..b2448c3 100644 --- a/src/main/java/com/gitlink/softbot/entity/db/Bot.java +++ b/src/main/java/com/gitlink/softbot/entity/db/Bot.java @@ -57,4 +57,6 @@ public class Bot { @TableField(fill = FieldFill.INSERT) private Date createTime; + private String oauthCallbackUrl; + } diff --git a/src/main/java/com/gitlink/softbot/service/user/impl/UserService.java b/src/main/java/com/gitlink/softbot/service/user/impl/UserService.java index ebad95b..1224f4c 100644 --- a/src/main/java/com/gitlink/softbot/service/user/impl/UserService.java +++ b/src/main/java/com/gitlink/softbot/service/user/impl/UserService.java @@ -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 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; } diff --git a/src/main/java/com/gitlink/softbot/vo/BotInputVO.java b/src/main/java/com/gitlink/softbot/vo/BotInputVO.java index b28fd5d..42def8a 100644 --- a/src/main/java/com/gitlink/softbot/vo/BotInputVO.java +++ b/src/main/java/com/gitlink/softbot/vo/BotInputVO.java @@ -50,6 +50,8 @@ public class BotInputVO implements Serializable { //TODO 前端改协议 private String botUrl; + private String oauthCallbackUrl; + /** * 权限与事件 */ diff --git a/src/main/java/com/gitlink/softbot/vo/BotOutputVO.java b/src/main/java/com/gitlink/softbot/vo/BotOutputVO.java index 21e4f0c..d146fe5 100644 --- a/src/main/java/com/gitlink/softbot/vo/BotOutputVO.java +++ b/src/main/java/com/gitlink/softbot/vo/BotOutputVO.java @@ -42,6 +42,8 @@ public class BotOutputVO implements Serializable { */ private Integer state; + private String OauthCallbackUrl; + /** * 是否转让 0未转让 ,1转让 */ diff --git a/src/main/resources/sql/bot_add_column_20230329.sql b/src/main/resources/sql/bot_add_column_20230329.sql new file mode 100644 index 0000000..0269916 --- /dev/null +++ b/src/main/resources/sql/bot_add_column_20230329.sql @@ -0,0 +1 @@ +ALTER TABLE `bot` ADD COLUMN (`oauth_callback_url` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'oauth回调地址'); \ No newline at end of file