|
|
|
@@ -19,9 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.concurrent.Executors; |
|
|
|
import java.util.concurrent.ScheduledExecutorService; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
|
|
|
|
@Service |
|
|
|
public class WxMsgServiceImpl implements WxMsgService { |
|
|
|
@@ -45,6 +42,18 @@ public class WxMsgServiceImpl implements WxMsgService { |
|
|
|
@Override |
|
|
|
public ResultData saveOrUpdate(WxMsg wxMsg) { |
|
|
|
|
|
|
|
//3种方式得到手机号,三种只能有一种 |
|
|
|
//1通过excel |
|
|
|
//2手机多条以逗号分隔,直接通过实体得到wxmsg.getphones |
|
|
|
//3通过标签 |
|
|
|
String phones=wxMsg.getPhones(); |
|
|
|
if(!phones.equals("")){ |
|
|
|
if(!wxMsg.getExcelpath().equals("")) |
|
|
|
phones=parseexcle(wxMsg.getExcelpath()); |
|
|
|
else |
|
|
|
phones=parselabel(wxMsg.getLabel()); |
|
|
|
} |
|
|
|
|
|
|
|
if (wxMsg.getId() == null) { |
|
|
|
//草稿 |
|
|
|
if (wxMsg.getSendstatus() == 2) { |
|
|
|
@@ -92,6 +101,16 @@ public class WxMsgServiceImpl implements WxMsgService { |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
|
|
|
|
private String parselabel(String label) { |
|
|
|
|
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
private String parseexcle(String excelpath) { |
|
|
|
|
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void deleteById(Long id) { |
|
|
|
wxMsgMapper.deleteByPrimaryKey(id); |
|
|
|
@@ -157,11 +176,11 @@ public class WxMsgServiceImpl implements WxMsgService { |
|
|
|
wxMsg.setSendstatus(0); |
|
|
|
} |
|
|
|
|
|
|
|
if(wxMsg.getId()==null){ |
|
|
|
if (wxMsg.getId() == null) { |
|
|
|
IdWorker idWorker = new IdWorker(0, 0); |
|
|
|
wxMsg.setId(idWorker.nextId()); |
|
|
|
wxMsgMapper.insertSelective(wxMsg); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
wxMsgMapper.updateByPrimaryKeySelective(wxMsg); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -173,6 +192,4 @@ public class WxMsgServiceImpl implements WxMsgService { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |