limin 7 년 전
부모
커밋
ecf268e717
1개의 변경된 파일23개의 추가작업 그리고 0개의 파일을 삭제
  1. 23 0
      src/main/java/com/goafanti/message/service/impl/MessageServiceImpl.java

+ 23 - 0
src/main/java/com/goafanti/message/service/impl/MessageServiceImpl.java

@@ -16,10 +16,12 @@ import org.springframework.transaction.annotation.Transactional;
 
 import com.goafanti.app.bo.IndexBo;
 import com.goafanti.common.dao.JpushEasemobAccountMapper;
+import com.goafanti.common.dao.JtMessageProducerMapper;
 import com.goafanti.common.dao.MessageFromSystemMapper;
 import com.goafanti.common.dao.MessageProducerMapper;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.JpushEasemobAccount;
+import com.goafanti.common.model.JtMessageProducer;
 import com.goafanti.common.model.MessageConsumer;
 import com.goafanti.common.model.MessageFromSystem;
 import com.goafanti.common.model.MessageProducer;
@@ -45,6 +47,8 @@ public class MessageServiceImpl  extends BaseMybatisDao<MessageFromSystemMapper>
 	private JpushEasemobAccountMapper jpushEasemobAccountMapper;
 	@Autowired
 	private JGMessageHelper jgMessageHelper;
+	@Autowired
+	private JtMessageProducerMapper jtMessageProducerMapper;
 	@Override
 	public String selectSendUser(Map<Integer, String> selectMap,Integer type) {
 		if(selectMap.containsKey(ConsumerType.PERSON_CUSTOMER_RETAIL.getTypeCode())){ //客户散户
@@ -429,4 +433,23 @@ public class MessageServiceImpl  extends BaseMybatisDao<MessageFromSystemMapper>
 		return jpushEasemobAccountMapper.insert(jea);
 	}
 
+	@Override
+	public int addMessage(JtMessageProducer messageProducer) {
+		//处理消息内容
+		messageProducer.setId(UUID.randomUUID().toString());
+		messageProducer.setCreater(TokenManager.getUserId());
+		if(null != messageProducer.getCreateTime()){
+			messageProducer.setCreateTime(new Date());
+		}
+		return jtMessageProducerMapper.insertSelective(messageProducer);
+	}
+	
+	@Override
+	public int sendMessage(String messageId) {
+		// 获得所有正常使用的注册用户
+		//List<JtMessageProducer> list = 
+		return 0;
+	}
+
+
 }