|
|
@@ -10,15 +10,18 @@ import com.xjrsoft.common.enums.DeleteMark;
|
|
|
import com.xjrsoft.common.model.result.RT;
|
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
|
+import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
|
import com.xjrsoft.module.concat.service.IXjrUserService;
|
|
|
import com.xjrsoft.module.system.dto.AddSystemUpdateMessageDto;
|
|
|
import com.xjrsoft.module.system.dto.SystemUpdateMessagePageDto;
|
|
|
import com.xjrsoft.module.system.dto.SystemUpdateMessageReleaseDto;
|
|
|
import com.xjrsoft.module.system.dto.UpdateSystemUpdateMessageDto;
|
|
|
+import com.xjrsoft.module.system.entity.Subsystem;
|
|
|
import com.xjrsoft.module.system.entity.SystemUpdateMessage;
|
|
|
import com.xjrsoft.module.system.entity.SystemUpdateMessageNotice;
|
|
|
import com.xjrsoft.module.system.service.ISystemUpdateMessageNoticeService;
|
|
|
import com.xjrsoft.module.system.service.ISystemUpdateMessageService;
|
|
|
+import com.xjrsoft.module.system.vo.SubsystemListVo;
|
|
|
import com.xjrsoft.module.system.vo.SystemUpdateMessagePageVo;
|
|
|
import com.xjrsoft.module.system.vo.SystemUpdateMessageVo;
|
|
|
import com.xjrsoft.module.teacher.entity.XjrUser;
|
|
|
@@ -159,6 +162,9 @@ public class SystemUpdateMessageController {
|
|
|
MPJWrappers.<SystemUpdateMessage>lambdaJoin()
|
|
|
.leftJoin(SystemUpdateMessageNotice.class, SystemUpdateMessageNotice::getSystemUpdateMessageId, SystemUpdateMessage::getId)
|
|
|
.eq(SystemUpdateMessageNotice::getUserId, StpUtil.getLoginIdAsLong())
|
|
|
+ .select(SystemUpdateMessage::getId)
|
|
|
+ .select(SystemUpdateMessage.class, x -> VoToColumnUtil.fieldsToColumns(SystemUpdateMessage.class).contains(x.getProperty()))
|
|
|
+ .selectAs(SystemUpdateMessageNotice::getStatus, SystemUpdateMessagePageVo::getIsRead)
|
|
|
.eq(SystemUpdateMessage::getDeleteMark, DeleteMark.NODELETE.getCode())
|
|
|
.eq(SystemUpdateMessage::getStatus, 1)
|
|
|
.orderByDesc(SystemUpdateMessage::getReleaseDate)
|
|
|
@@ -173,7 +179,10 @@ public class SystemUpdateMessageController {
|
|
|
public RT<List<SystemUpdateMessagePageVo>> personalList(@Valid SystemUpdateMessagePageDto dto){
|
|
|
List<SystemUpdateMessagePageVo> systemUpdateMessagePageVos = systemUpdateMessageService.selectJoinList(SystemUpdateMessagePageVo.class,
|
|
|
MPJWrappers.<SystemUpdateMessage>lambdaJoin()
|
|
|
+ .eq(SystemUpdateMessageNotice::getUserId, StpUtil.getLoginIdAsLong())
|
|
|
.select(SystemUpdateMessage::getId)
|
|
|
+ .select(SystemUpdateMessage.class, x -> VoToColumnUtil.fieldsToColumns(SystemUpdateMessage.class).contains(x.getProperty()))
|
|
|
+ .selectAs(SystemUpdateMessageNotice::getStatus, SystemUpdateMessagePageVo::getIsRead)
|
|
|
.leftJoin(SystemUpdateMessageNotice.class, SystemUpdateMessageNotice::getSystemUpdateMessageId, SystemUpdateMessage::getId)
|
|
|
.eq(SystemUpdateMessageNotice::getUserId, StpUtil.getLoginIdAsLong())
|
|
|
.eq(SystemUpdateMessage::getDeleteMark, DeleteMark.NODELETE.getCode())
|