|
|
@@ -17,7 +17,7 @@ import com.cyksj.model.manage.views.UserView;
|
|
|
import com.cyksj.model.request.UserFuncPropertyReq;
|
|
|
import com.cyksj.model.views.*;
|
|
|
import com.cyksj.service.relation.GroupRelationClearService;
|
|
|
-import com.cyksj.service.relation.GroupRelationFrontService;
|
|
|
+import com.cyksj.service.user.UserBindRelationService;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
|
import com.ejlchina.searcher.SearchResult;
|
|
|
import com.ejlchina.searcher.param.Operator;
|
|
|
@@ -56,7 +56,7 @@ public class CmsUserController{
|
|
|
|
|
|
private final GroupsRelationMapper groupsRelationMapper;
|
|
|
|
|
|
- private final GroupRelationFrontService groupRelationFrontService;
|
|
|
+ private final UserBindRelationService userBindRelationService;
|
|
|
|
|
|
private final CorpUserFollowRelationMapper cmsUserFollowRelationMapper;
|
|
|
|
|
|
@@ -108,7 +108,13 @@ public class CmsUserController{
|
|
|
Optional.ofNullable(user).ifPresent(u -> {
|
|
|
u.setIsBlack(!u.getIsBlack());
|
|
|
if (u.getIsBlack()) {
|
|
|
- List<RenewalView> groupsRelations = groupRelationFrontService.getMyTicket(u.getId(), null);
|
|
|
+ List<Long> userIds = userBindRelationService.getRelationUserIdList(id, user);
|
|
|
+ List<RenewalView> groupsRelations = beanSearcher.searchAll(RenewalView.class, MapUtils.builder()
|
|
|
+ .field(RenewalView::getUserId, 0).op(Operator.GreaterThan)
|
|
|
+ .field(RenewalView::getUserId, userIds).op(Operator.InList)
|
|
|
+ .field(RenewalView::getStatus, List.of("validity", "overdue", "outside")).op(Operator.InList)
|
|
|
+ .orderBy(RenewalView::getExpiryTime).asc()
|
|
|
+ .build());
|
|
|
groupsRelations.forEach(ticket -> {
|
|
|
GroupsRelation relation = groupsRelationMapper.selectById(ticket.getRelationId());
|
|
|
groupRelationClearService.clearTicket(relation, UserTicketClearedRecord.Source.black);
|