代码提交

This commit is contained in:
huangzj
2023-10-09 16:05:21 +08:00
parent 1582d55a5c
commit 0ba019fad7
5 changed files with 40 additions and 7 deletions

View File

@@ -8,9 +8,11 @@ import com.njcn.csdevice.api.CsLedgerFeignClient;
import com.njcn.csdevice.pojo.dto.DevDetailDTO;
import com.njcn.csdevice.pojo.vo.CsLedgerVO;
import com.njcn.csharmonic.mapper.CsEventPOMapper;
import com.njcn.csharmonic.param.CsEventUserQueryPage;
import com.njcn.csharmonic.param.CsEventUserQueryParam;
import com.njcn.csharmonic.pojo.vo.EventDetailVO;
import com.njcn.csharmonic.service.CsEventPOService;
import com.njcn.influx.pojo.dto.EventDataSetDTO;
import com.njcn.influx.service.EvtDataService;
import com.njcn.system.api.DicDataFeignClient;
@@ -53,6 +55,7 @@ public class CsEventUserPOServiceImpl extends ServiceImpl<CsEventUserPOMapper, C
private final EvtDataService evtDataService;
private final EpdFeignClient epdFeignClient;
private final EleEvtFeignClient eleEvtFeignClient;
private final CsEventPOMapper csEventPOMapper;
@Override
public Integer queryEventCount(CsEventUserQueryParam csEventUserQueryParam) {
@@ -172,12 +175,21 @@ public class CsEventUserPOServiceImpl extends ServiceImpl<CsEventUserPOMapper, C
csEventUserQueryParam.setUserId(RequestUtil.getUserIndex());
//getEventIds传空一键已读
if(CollectionUtil.isEmpty(csEventUserQueryParam.getEventIds())){
this.lambdaUpdate().eq(CsEventUserPO::getUserId,csEventUserQueryParam.getUserId()).
List<EventDetailVO> list = this.queryUserEventList(csEventUserQueryParam);
if(!CollectionUtils.isEmpty(list)){
List<String> collect = list.stream().map(EventDetailVO::getId).collect(Collectors.toList());
this.lambdaUpdate().in(CsEventUserPO::getEventId,collect).
eq(CsEventUserPO::getUserId,csEventUserQueryParam.getUserId()).
set(CsEventUserPO::getStatus,1).update();
}
}else {
this.lambdaUpdate().in(CsEventUserPO::getEventId,csEventUserQueryParam.getEventIds()).
eq(CsEventUserPO::getUserId,csEventUserQueryParam.getUserId()).
set(CsEventUserPO::getStatus,1).update();
}
this.lambdaUpdate().in(CsEventUserPO::getEventId,csEventUserQueryParam.getEventIds()).
eq(CsEventUserPO::getUserId,csEventUserQueryParam.getUserId()).
set(CsEventUserPO::getStatus,1).update();
}
@Override