Commit 587fc5dd by 徐高华

Merge branch 'feature/社群' into 'developer'

Feature/社群

See merge request !654
parents 0084c14f b5c1c40e
......@@ -4,9 +4,11 @@ import java.util.List;
import java.util.stream.Collectors;
import org.apache.commons.collections.CollectionUtils;
import org.apache.logging.log4j.LogManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSON;
import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.commons.util.EntityUtil;
......@@ -22,6 +24,7 @@ import com.github.pagehelper.PageHelper;
@Service("hmLinkChatService")
public class HmLinkChatServiceImpl implements HmLinkChatService {
private static org.apache.logging.log4j.Logger log = LogManager.getLogger(HmLinkChatService.class);
@Autowired
private HmLinkChatMapper hmLinkChatMapper;
......@@ -32,6 +35,7 @@ public class HmLinkChatServiceImpl implements HmLinkChatService {
@Override
public int save(Long linkId, List<HmLinkChatDTO> list) {
log.info("保存群链接={}",JSON.toJSONString(list));
List<HmLinkChatDTO> updateList = list.stream().filter(dto -> null != dto.getLinkChatId())
.collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(updateList)) {
......@@ -47,6 +51,7 @@ public class HmLinkChatServiceImpl implements HmLinkChatService {
if (CollectionUtils.isNotEmpty(addList)) {
for (HmLinkChatDTO dto : addList) {
TabHmLinkChat entity = EntityUtil.changeEntityByJSON(TabHmLinkChat.class, dto);
entity.setLinkChatId(UniqueIdUtils.uniqueLong());
entity.setChatHmId(UniqueIdUtils.uniqueLong());
entity.setLinkId(linkId);
this.hmLinkChatMapper.insert(entity);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment