소스 검색

会话用户设备意愿条件

zoujiajian 2 년 전
부모
커밋
cf793c3a67

+ 1 - 1
netflix-dao/src/main/java/com/cyksj/model/manage/views/CorpMsgAuditUserView.java

@@ -16,7 +16,7 @@ import java.util.Date;
         where = " c.id = cu.corp_user_id " +
                 "and cu.external_userid = cr.corp_user_id " +
                 "and f.userid = cr.follow_id " +
-                ":tag:",
+                ":tag: :intention:",
         groupBy = "c.name,cu.external_userid,c.avatar,c.type,c.gender,f.name,f.userid,cr.agree_status,cr.add_created_time"
 )
 public class CorpMsgAuditUserView {

+ 4 - 2
netflix-web/src/main/java/com/cyksj/web/controller/manage/corp/CorpMsgAuditController.java

@@ -12,7 +12,6 @@ import com.cyksj.service.corp.CorpQyMsgContentService;
 import com.ejlchina.searcher.BeanSearcher;
 import com.ejlchina.searcher.SearchResult;
 import com.ejlchina.searcher.operator.InList;
-import com.ejlchina.searcher.param.Operator;
 import com.ejlchina.searcher.util.MapBuilder;
 import com.ejlchina.searcher.util.MapUtils;
 import lombok.RequiredArgsConstructor;
@@ -54,7 +53,7 @@ public class CorpMsgAuditController {
      * @return
      */
     @GetMapping
-    public Result<SearchResult<CorpMsgAuditUserView>> get(String textKey, String tagId) {
+    public Result<SearchResult<CorpMsgAuditUserView>> get(String textKey, String tagId, Integer intention) {
         Set<String> userIds = new HashSet<>();
         if(StringUtils.isNotBlank(textKey)){
             List<QyMsgContent> text = corpQyMsgContentService.list(Wrappers.lambdaQuery(QyMsgContent.class).select(QyMsgContent::getFrom, QyMsgContent::getExternalUserid,QyMsgContent::getTolist).like(QyMsgContent::getText, textKey).eq(QyMsgContent::getRoomid,"").eq(QyMsgContent::getMsgtype, "text"));
@@ -68,6 +67,9 @@ public class CorpMsgAuditController {
             builder.put("tag", String.format( "and cr.id = t.relation_id and t.tag_id = '%s'", tagId));
             builder.put("tagTable", ",corp_user_tag t");
         }
+        if (intention != null) {
+            builder.put("intention", String.format("and exists (select 1 from corp_user_pay_intention cup where cup.union_id = c.unionid and intention = %s limit 1)", intention));
+        }
         SearchResult<CorpMsgAuditUserView> search = beanSearcher.search(CorpMsgAuditUserView.class, builder.build());
         return GatewayResponse.SUCCESS.newBuilder().toResult(search);