|
|
@@ -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);
|
|
|
|