getInstallBot新加repos参数
This commit is contained in:
parent
f7575b8cde
commit
6c9e0d260b
|
@ -205,8 +205,8 @@ public class UserController {
|
|||
* @return
|
||||
*/
|
||||
@GetMapping("/getInstallBot")
|
||||
public Result<?> getInstallBot(@RequestParam("user_id") Integer userId, @RequestParam("bot_id") Integer botId,@RequestParam("login") String login) throws BotException{
|
||||
GetInstallBotRequest getInstallBotRequest = new GetInstallBotRequest(userId, login,botId);
|
||||
public Result<?> getInstallBot(@RequestParam("user_id") Integer userId, @RequestParam("bot_id") Integer botId,@RequestParam("login") String login, @RequestParam("repos") String repos ) throws BotException{
|
||||
GetInstallBotRequest getInstallBotRequest = new GetInstallBotRequest(userId, login, botId ,repos);
|
||||
Result<?> result = new Result<>();
|
||||
GetInstallBotResponse getInstallBotResponse = userService.getInstallBot(getInstallBotRequest);
|
||||
return result.build(200).build(getInstallBotResponse).build("get installBot success!");
|
||||
|
|
|
@ -894,7 +894,7 @@ public class UserService extends AbstractUserBot implements IUserService {
|
|||
//2.到install_bot表中查看state
|
||||
List<InstallBot> installBots = installMapper.selectList(new QueryWrapper<InstallBot>()
|
||||
.eq("bot_id",getInstallBotRequest.getBotId())
|
||||
.eq("installer_id",getInstallBotRequest.getUserId()));
|
||||
.in("store_repo", Arrays.asList(getInstallBotRequest.getRepos().split(","))));
|
||||
assert installBots.size()>0;
|
||||
getInstallBotResponse.setCreateTime(installBots.get(0).getCreateTime());
|
||||
getInstallBotResponse.setState(installBots.get(0).getState());
|
||||
|
|
|
@ -23,4 +23,6 @@ public class GetInstallBotRequest implements Serializable {
|
|||
private String login;
|
||||
@NotNull(message = "botId is required")
|
||||
private Integer botId;
|
||||
|
||||
private String repos;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue