|
|
package com.yoho.unions.channel.service.impl;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import com.yoho.error.ServiceError;
|
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yoho.message.sdk.service.crm.ISendCrmMessage;
|
...
|
...
|
@@ -8,9 +9,13 @@ import com.yoho.service.model.union.request.ChannelGroupRequestBO; |
|
|
import com.yoho.service.model.union.response.ChannelGroupRspBO;
|
|
|
import com.yoho.service.model.union.response.PageChannelGroupRspBO;
|
|
|
import com.yoho.unions.channel.service.ChannelGroupService;
|
|
|
import com.yoho.unions.dal.IChannelGroupConditionDAO;
|
|
|
import com.yoho.unions.dal.IChannelGroupDAO;
|
|
|
import com.yoho.unions.dal.IChannelUserDAO;
|
|
|
import com.yoho.unions.dal.IProfileDAO;
|
|
|
import com.yoho.unions.dal.model.ChannelGroup;
|
|
|
import com.yoho.unions.dal.model.ChannelGroupCondition;
|
|
|
import com.yoho.unions.dal.model.ChannelUser;
|
|
|
import com.yoho.unions.dal.model.Profile;
|
|
|
import com.yoho.unions.utils.DateUtils;
|
|
|
import org.slf4j.Logger;
|
...
|
...
|
@@ -39,7 +44,10 @@ public class ChannelGroupServiceImpl implements ChannelGroupService { |
|
|
private ISendCrmMessage sendCrmMessage;
|
|
|
|
|
|
@Autowired
|
|
|
private IProfileDAO profileDAO;
|
|
|
private IChannelGroupConditionDAO channelGroupConditionDAO;
|
|
|
|
|
|
@Autowired
|
|
|
private IChannelUserDAO channelUserDAO;
|
|
|
|
|
|
@Override
|
|
|
public PageChannelGroupRspBO queryChannelGroupList(ChannelGroupRequestBO channelGroupRequestBO) {
|
...
|
...
|
@@ -69,6 +77,16 @@ public class ChannelGroupServiceImpl implements ChannelGroupService { |
|
|
// SendMessageRspBo sendMessageRspBo = sendCrmMessage.generalSceneMsg("15996238446","测试");
|
|
|
|
|
|
//1.根据groupId重新查询手机号
|
|
|
List<ChannelGroupCondition> conditions = channelGroupConditionDAO.selectByGroupId(groupId);
|
|
|
Map<String, Object> params = Maps.newHashMap();
|
|
|
if(!CollectionUtils.isEmpty(conditions)){
|
|
|
for(ChannelGroupCondition channelGroupCondition:conditions){
|
|
|
params.put(channelGroupCondition.getKey(),channelGroupCondition.getValue());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
List<ChannelUser> channelUsers = channelUserDAO.selectPage(params,0,500);
|
|
|
|
|
|
|
|
|
//2.给手机发送短信
|
|
|
|
...
|
...
|
|