diff --git a/src/main/java/com/gitlink/softbot/controller/market/MarketController.java b/src/main/java/com/gitlink/softbot/controller/market/MarketController.java index fd9673a..b1efa6e 100644 --- a/src/main/java/com/gitlink/softbot/controller/market/MarketController.java +++ b/src/main/java/com/gitlink/softbot/controller/market/MarketController.java @@ -24,11 +24,6 @@ public class MarketController { IMarketService marketService; - @GetMapping("/tt") - public String tt(){ - return "asd"; - } - /*** * 通过功能类型查询MarketBot * @param func 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 97e0021..d20cfef 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 @@ -261,17 +261,22 @@ public class UserService extends AbstractUserBot implements IUserService { String eventPr = limitVO.getEventPr(); //无权限条件下 if (StringUtils.isBlank(eventCode)&&StringUtils.isBlank(eventPr)){ - throw new BotException("事件不能为空!"); + throw new BotException("订阅事件不能为空!"); } //0:只读1:读写2:无权限 Integer jurisDictionCode = limitVO.getJurisDictionCode(); //0:只读1:读写2:无权限 Integer jurisDictionPr = limitVO.getJurisDictionPr(); - if ((jurisDictionCode!=2&&StringUtils.isBlank(limitVO.getEventCode())) - ||(jurisDictionPr!=2&&StringUtils.isBlank(limitVO.getEventPr()))){ - throw new BotException("事件不能为空!"); + if ((jurisDictionCode == 2) && (jurisDictionPr == 2)){ + throw new BotException("仓库访问权限不能为空!"); } + + if (jurisDictionCode == 2 && !StringUtils.isBlank(eventCode) + || jurisDictionPr == 2 && StringUtils.isBlank(eventPr)) { + throw new BotException("权限&订阅设置错误!"); + } + String[] codeEvents = eventCode.split(","); String[] prEvents = eventPr.split(","); List eventList = new ArrayList<>();