Commit f14fee10 by danmo Committed by linkwechat8856@163.com

消息群发任务重构

1 parent 32c3ecf2
...@@ -2,6 +2,7 @@ package com.linkwechat.web.controller.wecom; ...@@ -2,6 +2,7 @@ package com.linkwechat.web.controller.wecom;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.collection.ListUtil; import cn.hutool.core.collection.ListUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.linkwechat.common.annotation.Log; import com.linkwechat.common.annotation.Log;
import com.linkwechat.common.constant.Constants; import com.linkwechat.common.constant.Constants;
...@@ -245,5 +246,16 @@ public class WeCustomerController extends BaseController ...@@ -245,5 +246,16 @@ public class WeCustomerController extends BaseController
); );
} }
/**
* 客户条件检索
* @param params 检索条件
* @return
*/
@ApiOperation(value = "客户条件检索",httpMethod = "POST")
@PostMapping(value = "/getCustomerByCondition")
public AjaxResult getCustomerByCondition(@RequestBody JSONObject params){
weCustomerService.getCustomerByCondition(params);
return AjaxResult.success("");
}
} }
package com.linkwechat.wecom.domain.query; package com.linkwechat.wecom.domain.query;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.linkwechat.common.enums.MessageType; import com.linkwechat.common.enums.MessageType;
import com.linkwechat.common.exception.wecom.WeComException; import com.linkwechat.common.exception.wecom.WeComException;
...@@ -49,9 +50,9 @@ public class WeAddMsgTemplateQuery { ...@@ -49,9 +50,9 @@ public class WeAddMsgTemplateQuery {
} }
public void setAttachments(List<WeMessageTemplate> messageTemplates) { public void setAttachments(List<WeMessageTemplate> messageTemplates) {
final int size = 9; final int size = 10;
this.attachments = new ArrayList<>(16); this.attachments = new ArrayList<>(16);
if (messageTemplates != null && messageTemplates.size() <= size) { if (CollectionUtil.isNotEmpty(messageTemplates) && messageTemplates.size() < size) {
messageTemplates.forEach(messageTemplate -> { messageTemplates.forEach(messageTemplate -> {
if (ObjectUtil.equal(MessageType.IMAGE.getMessageType(), messageTemplate.getMsgType())) { if (ObjectUtil.equal(MessageType.IMAGE.getMessageType(), messageTemplate.getMsgType())) {
Attachments images = new Images(messageTemplate.getMsgType(), messageTemplate.getMediaId(), Attachments images = new Images(messageTemplate.getMsgType(), messageTemplate.getMediaId(),
......
...@@ -5,6 +5,7 @@ import cn.hutool.core.collection.ListUtil; ...@@ -5,6 +5,7 @@ import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.linkwechat.common.constant.Constants; import com.linkwechat.common.constant.Constants;
...@@ -895,5 +896,10 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto ...@@ -895,5 +896,10 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
return weCustomerDetailVo; return weCustomerDetailVo;
} }
@Override
public void getCustomerByCondition(JSONObject params) {
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!