1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-05 15:01:23 +08:00

Redesign the page of NoticeView.vue

This commit is contained in:
cccccyb
2023-05-17 03:47:51 +08:00
parent 739971d14b
commit 5afd8ff4e3
11 changed files with 341 additions and 163 deletions

View File

@@ -4,6 +4,8 @@ import com.cfive.pinnacle.entity.NoticeType;
import com.cfive.pinnacle.entity.common.ResponseCode;
import com.cfive.pinnacle.entity.common.ResponseResult;
import com.cfive.pinnacle.service.INoticeTypeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
@@ -22,6 +24,8 @@ import java.util.List;
@RequestMapping("/noticeType")
@CrossOrigin
public class NoticeTypeController {
private final Logger LOGGER = LoggerFactory.getLogger(getClass());
@Autowired
INoticeTypeService noticeTypeService;
@@ -41,11 +45,10 @@ public class NoticeTypeController {
return ResponseResult.build(code, msg, selectTypeList);
}
@PutMapping
@GetMapping("/update")
public ResponseResult updateTypeEnableById(String typeId,Boolean enable){
System.out.println(typeId+'\t'+enable);
Long tid=null;
Integer isEnable=null;
Integer isEnable = null;
if (StringUtils.hasText(typeId)&&null!=enable){
tid = Long.parseLong(typeId);
isEnable = (enable == true ? 1 : 0);

View File

@@ -99,11 +99,14 @@ public class NoticeServiceImpl extends ServiceImpl<NoticeMapper, Notice> impleme
@Override
public Boolean updateNotice(Notice notice) {
noticeMapper.update(null, new UpdateWrapper<Notice>().eq("id", notice.getId()).set("old", 1)); //修改原始数据
LambdaQueryWrapper<NoticeReceive> lqw = new LambdaQueryWrapper<>();
lqw.eq(NoticeReceive::getNoticeId, notice.getId());
noticeReceiveMapper.delete(lqw);
notice.setOriginId(notice.getId());
notice.setId(null); //清除id使新插入的数据id重新生成
notice.setModifyTime(null);
notice.setOld(0);
return noticeMapper.insert(notice) > 0;
return this.addNotice(notice);
}
@Override

View File

@@ -31,7 +31,9 @@
and notice_receive.already_read=#{readStatus}
</if>
and notice_receive.user_id=#{userId}
and notice_receive.deleted=0
</where>
order by n.send_time desc
</select>
<resultMap id="selectAllMap" type="notice" autoMapping="true">
<id property="id" column="nid"/>