@Override public List<Long> disable(Collection<Long> ids) { List<Friender> list = this.selectBatchIds(ids); if(CollectionUtils.isNotEmpty(list)){ list.stream().forEach(x -> x.setEnabled(EnableEnum.DISABLE.getValue())); this.updateBatchById(list); } return Lists.newArrayList(ids); }
@Override public List<Long> disable(Collection<Long> ids) { List<Resources> list = selectBatchIds(ids); if(CollectionUtils.isNotEmpty(list)){ list.stream().forEach(x -> x.setEnabled(EnableEnum.DISABLE.getValue())); updateBatchById(list); } return Lists.newArrayList(ids); }
@Override public List<Long> disable(Collection<Long> ids) { List<DimTemplet> list = this.selectBatchIds(ids); if(CollectionUtils.isNotEmpty(list)){ list.stream().forEach(x -> x.setEnabled(EnableEnum.DISABLE.getValue())); this.updateBatchById(list); } return Lists.newArrayList(ids); }
@Override public List<Long> disable(Collection<Long> ids) { List<Person> list = selectBatchIds(ids); if(CollectionUtils.isNotEmpty(list)){ list.stream().forEach(x -> x.setEnabled(EnableEnum.DISABLE.getValue())); updateBatchById(list); } return Lists.newArrayList(ids); }
@Override public List<Long> disable(Collection<Long> ids) { List<PersonRole> list = selectBatchIds(ids); if(CollectionUtils.isNotEmpty(list)){ list.stream().forEach(x -> x.setEnabled(EnableEnum.DISABLE.getValue())); updateBatchById(list); } return Lists.newArrayList(ids); }
@Override public List<Long> enable(Collection<Long> ids) { List<Comment> list = this.selectBatchIds(ids); if(CollectionUtils.isNotEmpty(list)){ list.stream().forEach(x -> x.setEnabled(EnableEnum.ENABLED.getValue())); this.updateBatchById(list); } return Lists.newArrayList(ids); }
@Override public List<Long> disable(Collection<Long> ids) { List<Comment> list = this.selectBatchIds(ids); if(CollectionUtils.isNotEmpty(list)){ list.stream().forEach(x -> x.setEnabled(EnableEnum.DISABLE.getValue())); this.updateBatchById(list); } return Lists.newArrayList(ids); }
@Override public List<Long> enable(Collection<Long> ids) { List<Visitor> list = this.selectBatchIds(ids); if(CollectionUtils.isNotEmpty(list)){ list.stream().forEach(x -> x.setEnabled(EnableEnum.ENABLED.getValue())); this.updateBatchById(list); } return Lists.newArrayList(ids); }
@Override public List<Long> disable(Collection<Long> ids) { List<DimCondition> list = this.selectBatchIds(ids); if(CollectionUtils.isNotEmpty(list)){ list.stream().forEach(x -> x.setEnabled(EnableEnum.DISABLE.getValue())); this.updateBatchById(list); } return Lists.newArrayList(ids); }
@Override public List<Long> enable(Collection<Long> ids) { List<Datum> list = this.selectBatchIds(ids); if(CollectionUtils.isNotEmpty(list)){ list.stream().forEach(x -> x.setEnabled(EnableEnum.ENABLED.getValue())); this.updateBatchById(list); } return Lists.newArrayList(ids); }
@Override public List<Long> disable(Collection<Long> ids) { List<DimLocation> list = this.selectBatchIds(ids); if(CollectionUtils.isNotEmpty(list)){ list.stream().forEach(x -> x.setEnabled(EnableEnum.DISABLE.getValue())); this.updateBatchById(list); } return Lists.newArrayList(ids); }
@Override public List<Long> enable(Collection<Long> ids) { List<CouponHandoutConfig> list = this.selectBatchIds(ids); if(CollectionUtils.isNotEmpty(list)){ list.stream().forEach(x -> x.setEnabled(EnableEnum.ENABLED.getValue())); this.updateBatchById(list); } return Lists.newArrayList(ids); }
@Override public List<Long> disable(Collection<Long> ids) { List<CouponHandoutConfig> list = this.selectBatchIds(ids); if(CollectionUtils.isNotEmpty(list)){ list.stream().forEach(x -> x.setEnabled(EnableEnum.DISABLE.getValue())); this.updateBatchById(list); } return Lists.newArrayList(ids); }
@Override public List<Long> enable(Collection<Long> ids) { List<Person> list = selectBatchIds(ids); if(CollectionUtils.isNotEmpty(list)){ list.stream().forEach(x -> x.setEnabled(EnableEnum.ENABLED.getValue())); updateBatchById(list); } return Lists.newArrayList(ids); }
@Override public List<Long> enable(Collection<Long> ids) { List<CouponConfig> list = this.selectBatchIds(ids); if(CollectionUtils.isNotEmpty(list)){ list.stream().forEach(x -> x.setEnabled(EnableEnum.ENABLED.getValue())); this.updateBatchById(list); } return Lists.newArrayList(ids); }
@Override public List<Long> enable(Collection<Long> ids) { List<PersonRole> list = selectBatchIds(ids); if(CollectionUtils.isNotEmpty(list)){ list.stream().forEach(x -> x.setEnabled(EnableEnum.ENABLED.getValue())); updateBatchById(list); } return Lists.newArrayList(ids); }
@Override public List<ZTreeView> selectZTreeByUserId(long userId) { List<Role> role = selectUserRole(userId); List<Long> roleIds = Optional.ofNullable(role).orElse(Lists.newArrayList()) .stream().filter(x -> EnableEnum.ENABLED.getValue() == x.getEnabled()) .map(x -> x.getId()).collect(Collectors.toList()); if(CollectionUtils.isEmpty(roleIds)){ return roleMapper.selectZTree(); } return roleMapper.selectZTreeByUserId(roleIds); }
@Async public Future<Long> selectVisitedTotal(long appId, long targetId, int visitorType) throws Exception { if(appId <=0 || targetId<=0){ throw new IllegalArgumentException("参数错误"); } EntityWrapper<Visitor> wrapper = new EntityWrapper<Visitor>(); wrapper.eq("app_id", appId).eq("target_id", targetId).eq("type", visitorType).eq("enabled", EnableEnum.ENABLED.getValue()); long total = visitorService.selectCount(wrapper); return new AsyncResult<>(total); }
@Async public Future<Pagination<Comment>> selectComments(long appId, long sourceId, int type, int page, int size) throws Exception { if(appId <=0 || sourceId<=0 || page <=0 || size <=0){ throw new IllegalArgumentException("参数错误"); } EntityWrapper<Comment> wp = new EntityWrapper<>(); wp.eq("app_id", appId).eq("source_id", sourceId).eq("type", type).eq("enabled", EnableEnum.ENABLED.getValue()); Pagination<Comment> pagination = commentService.selectPagination(new Page<>(page, size), wp); return new AsyncResult<>(pagination); }
@Async public Future<Pagination<Follower>> getFollowers(long appId, long personId, int pageNum, int size) throws Exception { if(appId <=0 || personId <=0){ throw new ApiException("参数错误"); } EntityWrapper<Follower> wp = new EntityWrapper<Follower>(); wp.eq("app_id", appId).eq("user_id", personId).eq("enabled", EnableEnum.ENABLED.getValue()); Pagination<Follower> pagination = followerService.selectPagination(new Page<Follower>(pageNum, size), wp); return new AsyncResult<>(pagination); }